Magic the Gathering
Model Context Protocol (MCP) servers for searching for cards with the Scryfall API, and managing the LLM's decklist and hand when playing
What is Magic the Gathering?
Magic the Gathering is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol (mcp) servers for searching for cards with the scryfall api, and managing the llm's decklist and hand when playing
Model Context Protocol (MCP) servers for searching for cards with the Scryfall API, and managing the LLM's decklist and hand when playing
This server falls under the APIs and Search & Data Extraction categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- Model Context Protocol (MCP) servers for searching for cards
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mtg-mcp-serversConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use Magic the Gathering
The MTG MCP Servers project provides two Python-based MCP servers for Magic: The Gathering players and deck builders. The Scryfall server allows AI assistants to search for cards by name, get random cards, and look up card details using the Scryfall API without an API key. The MTG Deck Manager server handles uploading decks, drawing cards, managing your hand, performing mulligans, and sideboarding — enabling Claude to act as a full game session partner.
Prerequisites
- Python 3.8 or higher installed
- pip packages: fastmcp and httpx (no MTG or Scryfall API key required)
- An MCP-compatible client such as Claude Desktop
- The mtg-mcp-servers repository cloned locally
Clone the repository
Clone the MTG MCP Servers repository to your local machine.
git clone https://github.com/artillect/mtg-mcp-servers.git
cd mtg-mcp-serversCreate a Python virtual environment
Set up and activate a virtual environment to isolate the project's dependencies.
python -m venv .venv
# Windows
.venv\Scripts\activate
# macOS/Linux
source .venv/bin/activateInstall dependencies
Install the required Python packages: fastmcp for the MCP server framework and httpx for making HTTP requests to the Scryfall API.
pip install fastmcp httpxConfigure Claude Desktop with both servers
Add both the MTG deck manager and Scryfall servers to claude_desktop_config.json, pointing to the Python executable inside your virtual environment and the server script files.
{
"mcpServers": {
"mtg-server": {
"command": "/path/to/mtg-mcp-servers/.venv/bin/python",
"args": ["/path/to/mtg-mcp-servers/mtg_server.py"]
},
"scryfall": {
"command": "/path/to/mtg-mcp-servers/.venv/bin/python",
"args": ["/path/to/mtg-mcp-servers/scryfall_server.py"]
}
}
}Restart Claude Desktop and load a deck
Restart Claude Desktop to connect both servers. Then paste or describe your MTG deck list in the chat and ask Claude to upload it to the deck manager to begin a session.
Magic the Gathering Examples
Client configuration
Claude Desktop configuration registering both the MTG Deck Manager and Scryfall search servers, pointing to the virtual environment Python binary.
{
"mcpServers": {
"mtg-server": {
"command": "/path/to/mtg-mcp-servers/.venv/bin/python",
"args": ["/path/to/mtg-mcp-servers/mtg_server.py"]
},
"scryfall": {
"command": "/path/to/mtg-mcp-servers/.venv/bin/python",
"args": ["/path/to/mtg-mcp-servers/scryfall_server.py"]
}
}
}Prompts to try
Example prompts for searching cards via Scryfall and managing a deck and hand during a game session.
- "Search Scryfall for all black instant spells that cost 2 mana or less"
- "Get me a random red creature card from Scryfall"
- "Upload my deck list and draw 7 cards for my opening hand"
- "I want to mulligan — shuffle my hand back and draw 6"
- "Show me all the cards currently in my hand"
- "Look up the card 'Lightning Bolt' and tell me its oracle text"Troubleshooting Magic the Gathering
Scryfall server crashes mid-session
The README notes the Scryfall server is under active development and may crash. Restart Claude Desktop to reconnect it. Check that httpx is installed correctly in your virtual environment with 'pip show httpx'.
Claude cannot find the server scripts after configuration
Use absolute paths in the 'args' array, not relative ones. Also verify the Python path in 'command' points to the .venv binary — on Windows use .venv\Scripts\python.exe, on macOS/Linux use .venv/bin/python.
Deck upload fails or hand draw returns empty
Ensure the deck list is in a standard MTG format (quantity followed by card name, one per line). The mtg_server.py must be running without import errors — test it directly with: python mtg_server.py
Frequently Asked Questions about Magic the Gathering
What is Magic the Gathering?
Magic the Gathering is a Model Context Protocol (MCP) server that model context protocol (mcp) servers for searching for cards with the scryfall api, and managing the llm's decklist and hand when playing It connects AI assistants to external tools and data sources through a standardized interface.
How do I install Magic the Gathering?
Follow the installation instructions on the Magic the Gathering GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with Magic the Gathering?
Magic the Gathering works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is Magic the Gathering free to use?
Yes, Magic the Gathering is open source and available under the MIT license. You can use it freely in both personal and commercial projects.
Magic the Gathering Alternatives — Similar APIs Servers
Looking for alternatives to Magic the Gathering? Here are other popular apis servers you can use with Claude, Cursor, and VS Code.
Kong
★ 43.4k🦍 The API and AI Gateway
API Mega List
★ 5.4kThis GitHub repo is a powerhouse collection of APIs you can start using immediately to build everything from simple automations to full-scale applications. One of the most valuable API lists on GitHub—period. 💪
Fetch
★ 5.4kFetch web content and convert to markdown for AI consumption
Fusio
★ 2.1kSelf-Hosted API Management for Builders
Korean Law
★ 1.8k국가법령정보MCP v4.0 | 법제처 41개 API → 17개 MCP 도구. 법령·판례·조례 검색 + LLM 환각 방지 인용검증 + 조문 영향 그래프(impact_map) + 시점 비교 자동 diff(time_travel) + 시민 5단계 실행 가이드(action_plan) | 41 Korean legal APIs → 17 MCP tools
RuleGo
★ 1.5k⛓️RuleGo is a lightweight, high-performance, embedded, next-generation component orchestration rule engine framework for Go.
Browse More APIs MCP Servers
Explore all apis servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up Magic the Gathering in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use Magic the Gathering?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.