Magic the Gathering

v1.0.0APIsstable

Model Context Protocol (MCP) servers for searching for cards with the Scryfall API, and managing the LLM's decklist and hand when playing

mtg-mcp-serversmcpai-integration
Share:
14
Stars
0
Downloads
0
Weekly
0/5

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

Search Magic cards using the Scryfall API from Claude.
Manage decklistsand hand during gameplay with AI assistance.
artillect

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mtg-mcp-servers

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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-servers
2

Create 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/activate
3

Install 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 httpx
4

Configure 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"]
    }
  }
}
5

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.

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.

Quick Config Preview

{ "mcpServers": { "mtg-mcp-servers": { "command": "npx", "args": ["-y", "mtg-mcp-servers"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides