Simple MCP server for the Scryfall API to assist with card data and deck building.
984
This is a simple MCP server for the Scryfall to assist with card data and deck building. This allows clients such as Claude Desktop to search for Magic: The Gathering card details using the Scryfall API.
This server exposes a number of MCP tools to assist with MTG card search and deck building. The tools and their purposes are listed below.
search_card_by_nameThis tool takes a card name as input, queries the Scryfall API for cards matching that exact name, and returns the details of the found card(s) in a structured format.
search_card_by_colorThis tool takes a card color as input, queries the Scryfall API for cards with that color, and returns the details of the found card(s) in a structured format.
search_card_by_textThis tool takes a card's text as input, queries the Scryfall API for cards with that text or similar text, and returns the details of the found card(s) in a structured format.
find_related_cardsThis tool finds cards related to a specified card through various relationship types:
find_card_synergiesThis advanced tool analyzes a card and finds synergistic cards for deck building:
The tool automatically extracts themes from card text.
Pre-built binaries are available for Windows, Linux on the Releases page.
mtg-mcp-windows-amd64.zip (x64) / mtg-mcp-windows-arm64.zip (ARM64)mtg-mcp-linux-amd64.tar.gz (x64) / mtg-mcp-linux-arm64.tar.gz (ARM64)Windows:
.zip file for your architectureLinux:
.tar.gz file for your architecturetar -xzf mtg-mcp-*.tar.gzchmod +x mtg-mcp-*go-sdk)src/ directory:
cd src
go mod tidy
go build .
Warning This server does not have built-in authentication. As such, it should not be used in any sensitive environments or exposed to the public internet.
The server supports two communication transports:
Execute the compiled binary from your terminal:
.\mtg-mcp-windows-amd64.exe
For remote access over the internet, run with SSE transport:
# Linux
MCP_TRANSPORT=sse MCP_SSE_PORT=3000 ./mtg-mcp-linux-amd64
# Windows
$env:MCP_TRANSPORT="sse"; $env:MCP_SSE_PORT="3000"; .\mtg-mcp-windows-amd64.exe
# Docker
docker run --rm -p 3000:3000 \
-e MCP_TRANSPORT=sse \
-e MCP_SSE_PORT=3000 \
mtg-mcp:latest
The server will start on http://0.0.0.0:3000/sse and be accessible from anywhere.
Update your claude_desktop_config.json to include the following under mcpServers:
"mtg-mcp":{
"command": "docker",
"args": [
"run",
"-i",
"dccoder/mtg-mcp:latest",
"-e MCP_TRANSPORT=stdio"
]
}
Windows:
"mtg-mcp": {
"command": "C:\\path\\to\\mtg-mcp-windows-amd64.exe",
"args": []
}
Linux:
"mtg-mcp": {
"command": "/path/to/mtg-mcp-linux-amd64",
"args": []
}
This configuration file can be found by going to Settings -> Developer -> Edit Config in Claude Desktop.
This server supports the following environment variables:
| Variable | Default | Description |
|---|---|---|
MCP_SERVER_NAME | scryfall-card-search-server | Server identification name |
MCP_SERVER_VERSION | v1.0.0 | Server version string |
MCP_LOG_TO_FILE | true | Enable/disable file logging |
MCP_LOG_FILE | mcp-server.log | Log file path (when logging enabled) |
MCP_TRANSPORT | stdio | Transport type: stdio or sse |
MCP_SSE_HOST | 0.0.0.0 | SSE server bind address (SSE mode only) |
MCP_SSE_PORT | 3000 | SSE server port (SSE mode only) |
MCP_SSE_PATH | /sse | SSE endpoint path (SSE mode only) |
MCP_SSL_CERT_FILE | nil | Path to TLS certificate file (for https) |
MCP_SSL_KEY_FILE | nil | Path to TLS certificate key (for https) |
Example with environment variables:
{
"mcpServers": {
"card_server": {
"command": "/path/to/mtg-mcp-linux-amd64",
"args": [],
"env": {
"MCP_LOG_TO_FILE": "false",
"MCP_SERVER_NAME": "my-mtg-server"
}
}
}
}
Card effects and keywords are from the Magic: The Gathering Comprehensive Rules - September 19, 2025
Content type
Image
Digest
sha256:542e83d5e…
Size
10.3 MB
Last updated
11 months ago
docker pull dccoder/mtg-mcp