Connect the MCP
Give Magic: The Gathering AI Deck Builder to your AI in a few minutes. Streamable HTTP endpoint: https://mcpnest.fr/api/mcp
Auth: Authorization: Bearer mtg_…, X-API-Key, or ?key=mtg_… on the URL (for clients that cannot set headers, e.g. some claude.ai flows). Prefer headers when possible — query keys can leak via logs/history.
Claude Desktop (recommended)
Claude Desktop only launches local MCP processes. Your remote server is reached through the mcp-remote bridge (needs Node.js so npx works).
Prefer this Desktop JSON config (header auth). On claude.ai, use the URL + ?key= flow below instead — web Connectors often cannot set custom headers.
Steps
- Install Node.js LTS if needed. In a terminal, check:
node -vandnpx -v. - In the dashboard, create an API key and copy the
mtg_…secret (shown once). - Quit Claude Desktop completely (macOS: Claude → Quit Claude). The config file is locked while the app runs.
- Open the config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
- Paste the JSON below. Replace
mtg_YOUR_KEYwith your real key. If the file already has other servers, merge themtgentry undermcpServers. - Save the file, then start Claude Desktop again.
- Confirm the MCP is connected (tools / hammer icon). Start a new chat and try: “Search for a one-mana red burn spell using the MTG MCP tools.”
{
"mcpServers": {
"mtg": {
"command": "npx",
"args": [
"-y",
"mcp-remote@latest",
"https://mcpnest.fr/api/mcp",
"--header",
"Authorization:${AUTH_HEADER}"
],
"env": {
"AUTH_HEADER": "Bearer mtg_YOUR_KEY"
}
}
}
}Why this shape?
Authorization:${AUTH_HEADER}must have no space around:.- Put
Bearer mtg_…inenv— Claude Desktop mangles spaces insideargs. - First launch may download
mcp-remotevia npx (needs network).
Troubleshooting
- OAuth / “Discovering OAuth” — Claude Connectors often expect OAuth. Prefer the Desktop JSON + header above, or try
https://mcpnest.fr/api/mcp?key=mtg_YOUR_KEYon claude.ai if the UI only accepts a URL. - Server disconnected — check Node/npx, restart Claude, open MCP logs (Help / Developer). Verify the key still works in the dashboard.
- No tools in chat — fully quit Claude, reopen, start a new conversation.
Claude.ai (web)
Use this when you chat on claude.ai in the browser (no Node.js / Desktop config). The web connector UI usually only asks for a server URL — put the API key in the query string so Magic: The Gathering AI Deck Builder can authenticate.
Steps
- In the dashboard, create an API key and copy the
mtg_…secret (shown once). - Build your MCP URL by appending
?key=and your key (no spaces):
https://mcpnest.fr/api/mcp?key=mtg_YOUR_KEY
- On claude.ai, open Settings → Connectors (wording may vary: Custom connector / Add connector / MCP).
- Add a custom connector. Name it e.g.
mcpnest/MTG. - Paste the full URL including
?key=mtg_…as the remote MCP / server URL. Do not use the barehttps://mcpnest.fr/api/mcpwithout a key unless Claude lets you set anAuthorizationheader. - Save, enable the connector for the chat, start a new conversation, and ask something like: “Use the MTG MCP to search for a one-mana red burn spell.”
Notes
- Card images may render more reliably on claude.ai than in Claude Desktop — still depends on Claude’s client.
- A key in the URL can show up in logs or history. Treat it like a password; revoke and create a new key in the dashboard if it may have leaked.
- Prefer Claude Desktop + header auth when you can avoid putting secrets in URLs.
Troubleshooting
- OAuth / “Discovering OAuth” — Claude may still try OAuth even with
?key=. If it never finishes, use Claude Desktop with the JSON config above instead. - 401 / unauthorized — check the key is exact (
mtg_…), not revoked, and that the URL is URL-encoded if your client mangled characters. - No tools — enable the connector for that chat and start a new conversation after connecting.
Claude Code
If you use the Claude Code CLI:
claude mcp add --transport http mtg https://mcpnest.fr/api/mcp \ --header "Authorization: Bearer mtg_YOUR_KEY"
Cursor
Put this in .cursor/mcp.json, then refresh MCP in Cursor Settings. Prefer a new Agent chat.
{
"mcpServers": {
"mtg": {
"url": "https://mcpnest.fr/api/mcp",
"headers": {
"Authorization": "Bearer mtg_YOUR_KEY"
}
}
}
}ChatGPT Desktop
Connect Magic: The Gathering AI Deck Builder inside the ChatGPT app on your computer (not chatgpt.com in the browser). You need a paid plan that shows Settings → MCP servers.
Option A — in the app
- Get an API key from the dashboard (
mtg_…, copied once when created). - Open ChatGPT Desktop → Settings → MCP servers → Add server.
- Choose Streamable HTTP (or remote URL). Name it
mcpnest. - Server URL:
https://mcpnest.fr/api/mcp - Auth: paste a Bearer / Authorization value
Bearer mtg_YOUR_KEY(with the space after Bearer). If the UI has no header field, use Option B or set the URL tohttps://mcpnest.fr/api/mcp?key=mtg_YOUR_KEY. - Save → Restart when asked. Do not use Authenticate / OAuth.
- Start a new chat, type
/mcpto confirm mcpnest is connected, then ask: “Search for a one-mana red burn spell with the MTG tools.”
Option B — config file (most reliable)
If the in-app form cannot set a header, edit this file on your Mac/PC (create it if missing):
- macOS / Linux:
~/.codex/config.toml - Windows:
%USERPROFILE%\.codex\config.toml
[mcp_servers.mcpnest]
url = "https://mcpnest.fr/api/mcp"
http_headers = { "Authorization" = "Bearer mtg_YOUR_KEY" }- Replace
mtg_YOUR_KEYwith your real key. - Fully quit ChatGPT Desktop and open it again.
- Check Settings → MCP servers —
mcpnestshould be on. Skip OAuth. New chat →/mcp.
Tips
- This is for the desktop app only. chatgpt.com in the browser does not use this config.
- Never click Authenticate / OAuth —Magic: The Gathering AI Deck Builder uses your dashboard API key only.
- Opening the MCP link in a browser shows an error — ignore that; ChatGPT talks to it differently than a normal webpage.
Troubleshooting
- No “MCP servers” in Settings — update ChatGPT Desktop, or your plan may not expose MCP yet.
- Server listed but tools missing — key not sent. Use Option B with
http_headers, or the URL with?key=, then restart. - OAuth errors — remove OAuth and set the Bearer header /
?key=instead.
What you get
- Free — plain-language lookups with
search_cardsandget_card. - Pro — deeper brew tools (
find_synergies,deck_gaps,validate_deck). - Your AI stays in charge of the brew. The MCP returns cards and deck facts — not canned search plans.
- Tools include
markdown/markdownGallery(Scryfall art). Rendering depends on the client (Cursor / claude.ai often show images; Claude Desktop may not).