MTG MCP Server — Claude Code MCP server: features and install
Connect an AI assistant to Magic: The Gathering card data, combo searches, draft analysis, and Commander tools. Use it to inspect decks or work through game rules.
claude mcp add --env MTG_MCP_TRANSPORT=<MTG_MCP_TRANSPORT> --env MTG_MCP_HTTP_PORT=<MTG_MCP_HTTP_PORT> --env MTG_MCP_LOG_LEVEL=<MTG_MCP_LOG_LEVEL> --env MTG_MCP_ENABLE_17LANDS=<MTG_MCP_ENABLE_17LANDS> --env MTG_MCP_ENABLE_EDHREC=<MTG_MCP_ENABLE_EDHREC> --transport stdio mtg-mcp-server -- uvx mtg-mcp-serverWhat MTG MCP Server does
The server provides tools for finding cards and combos, reviewing draft data, exploring the Commander metagame, and building decks. It can help check a Modern list, plan a sideboard, or reason through a rules interaction. The project also includes prompts and resources for working with Magic: The Gathering data.
Its data sources include Scryfall, Commander Spellbook, 17Lands, EDHREC, Moxfield, Spicerack, and MTGGoldfish. No API keys are needed. A local Claude Desktop setup requires Python 3.12+, so connecting to the hosted server avoids that local runtime requirement.
For Claude Code, run the server through uvx. Environment variables let you set the transport, HTTP port, logging level, and whether 17Lands and EDHREC are enabled. The server also works with Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, and Gemini CLI.
What it helps with
- search for cards matching deck criteria
- check a Modern decklist
- choose a sideboard for a deck
- compare Commander options
- resolve interactions between game rules
Example prompts for the agent
- Compare Muldrotha, Meren, and Karador as graveyard-focused commanders.
- Check my Modern decklist and suggest a sideboard.
- Explain how deathtouch interacts with trample.
How to install MTG MCP Server
Platform CLI
claude mcp add --env MTG_MCP_TRANSPORT=<MTG_MCP_TRANSPORT> --env MTG_MCP_HTTP_PORT=<MTG_MCP_HTTP_PORT> --env MTG_MCP_LOG_LEVEL=<MTG_MCP_LOG_LEVEL> --env MTG_MCP_ENABLE_17LANDS=<MTG_MCP_ENABLE_17LANDS> --env MTG_MCP_ENABLE_EDHREC=<MTG_MCP_ENABLE_EDHREC> --transport stdio mtg-mcp-server -- uvx mtg-mcp-serverReplace <…> with your own values. 8 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from mtg-mcp-server <command>
Platform CLI
codex mcp add mtg-mcp-server --env MTG_MCP_TRANSPORT=<MTG_MCP_TRANSPORT> --env MTG_MCP_HTTP_PORT=<MTG_MCP_HTTP_PORT> --env MTG_MCP_LOG_LEVEL=<MTG_MCP_LOG_LEVEL> --env MTG_MCP_ENABLE_17LANDS=<MTG_MCP_ENABLE_17LANDS> --env MTG_MCP_ENABLE_EDHREC=<MTG_MCP_ENABLE_EDHREC> -- uvx mtg-mcp-serverReplace <…> with your own values. 8 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from mtg-mcp-server <command>
Config file
{
"mcpServers": {
"mtg-mcp-server": {
"command": "uvx",
"args": [
"mtg-mcp-server"
],
"env": {
"MTG_MCP_TRANSPORT": "<MTG_MCP_TRANSPORT>",
"MTG_MCP_HTTP_PORT": "<MTG_MCP_HTTP_PORT>",
"MTG_MCP_LOG_LEVEL": "<MTG_MCP_LOG_LEVEL>",
"MTG_MCP_ENABLE_17LANDS": "<MTG_MCP_ENABLE_17LANDS>",
"MTG_MCP_ENABLE_EDHREC": "<MTG_MCP_ENABLE_EDHREC>"
}
}
}
}Replace <…> with your own values. 8 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from mtg-mcp-server <command>
Config file
{
"servers": {
"mtg-mcp-server": {
"type": "stdio",
"command": "uvx",
"args": [
"mtg-mcp-server"
],
"env": {
"MTG_MCP_TRANSPORT": "<MTG_MCP_TRANSPORT>",
"MTG_MCP_HTTP_PORT": "<MTG_MCP_HTTP_PORT>",
"MTG_MCP_LOG_LEVEL": "<MTG_MCP_LOG_LEVEL>",
"MTG_MCP_ENABLE_17LANDS": "<MTG_MCP_ENABLE_17LANDS>",
"MTG_MCP_ENABLE_EDHREC": "<MTG_MCP_ENABLE_EDHREC>"
}
}
}
}Replace <…> with your own values. 8 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from mtg-mcp-server <command>
Platform CLI
gemini mcp add -e MTG_MCP_TRANSPORT=<MTG_MCP_TRANSPORT> -e MTG_MCP_HTTP_PORT=<MTG_MCP_HTTP_PORT> -e MTG_MCP_LOG_LEVEL=<MTG_MCP_LOG_LEVEL> -e MTG_MCP_ENABLE_17LANDS=<MTG_MCP_ENABLE_17LANDS> -e MTG_MCP_ENABLE_EDHREC=<MTG_MCP_ENABLE_EDHREC> mtg-mcp-server uvx mtg-mcp-serverReplace <…> with your own values. 8 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from mtg-mcp-server <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about MTG MCP Server
How do I install MTG MCP Server in Claude Code?
Run claude mcp add mtg-mcp-server -- uvx mtg-mcp-server. To configure environment variables, use `claude mcp add --env MTG_MCP_TRANSPORT=<MTG_MCP_TRANSPORT> --env MTG_MCP_HTTP_PORT=<MTG_MCP_HTTP_PORT> --env MTG_MCP_LOG_LEVEL=<MTG_MCP_LOG_LEVEL> --env MTG_MCP_ENABLE_17LANDS=<MTG_MCP_ENABLE_17LANDS> --env MTG_MCP_ENABLE_EDHREC=<MTG_MCP_ENABLE_EDHREC> --transport stdio mtg-mcp-server -- uvx mtg-mcp-server`.
What does MTG MCP Server do?
It gives an AI assistant tools for card and combo searches, draft and Commander analysis, deck building, and rules questions.
Does MTG MCP Server need an API key?
No API keys are needed. A local Claude Desktop setup requires Python 3.12+.