MTG AI Deck Builder

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.

Need a key? Sign up or open the dashboard.

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

  1. Install Node.js LTS if needed. In a terminal, check: node -v and npx -v.
  2. In the dashboard, create an API key and copy the mtg_… secret (shown once).
  3. Quit Claude Desktop completely (macOS: Claude → Quit Claude). The config file is locked while the app runs.
  4. Open the config file:
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    Or: Claude → Settings → Developer → Edit Config.
  5. Paste the JSON below. Replace mtg_YOUR_KEY with your real key. If the file already has other servers, merge the mtg entry under mcpServers.
  6. Save the file, then start Claude Desktop again.
  7. 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_… in env — Claude Desktop mangles spaces inside args.
  • First launch may download mcp-remote via 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_KEY on 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

  1. In the dashboard, create an API key and copy the mtg_… secret (shown once).
  2. Build your MCP URL by appending ?key= and your key (no spaces):
https://mcpnest.fr/api/mcp?key=mtg_YOUR_KEY
  1. On claude.ai, open Settings → Connectors (wording may vary: Custom connector / Add connector / MCP).
  2. Add a custom connector. Name it e.g. mcpnest / MTG.
  3. Paste the full URL including ?key=mtg_… as the remote MCP / server URL. Do not use the bare https://mcpnest.fr/api/mcp without a key unless Claude lets you set an Authorization header.
  4. 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

  1. Get an API key from the dashboard (mtg_…, copied once when created).
  2. Open ChatGPT Desktop → Settings → MCP servers → Add server.
  3. Choose Streamable HTTP (or remote URL). Name it mcpnest.
  4. Server URL: https://mcpnest.fr/api/mcp
  5. 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 to https://mcpnest.fr/api/mcp?key=mtg_YOUR_KEY.
  6. Save → Restart when asked. Do not use Authenticate / OAuth.
  7. Start a new chat, type /mcp to 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" }
  1. Replace mtg_YOUR_KEY with your real key.
  2. Fully quit ChatGPT Desktop and open it again.
  3. Check Settings → MCP servers — mcpnest should 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_cards and get_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).