home / mcp / magic: the gathering mcp tool server
Provides fast access to MTG card data, rulings, sets, and images through an MCP server.
Configuration
View docs{
"mcpServers": {
"james2037-mcp-gatherer": {
"command": "php",
"args": [
"path/to/mcp_server.php"
]
}
}
}You can run a dedicated MCP server that gives you fast access to Magic: The Gathering card data, rulings, and set information. This server lets your MCP client query cards by name, color, type, or other criteria and view card details, rulings, foreign language versions, comprehensive rules, and card images when available.
Start the server locally and connect your MCP client to it. You will use a local stdio connection via your PHP runtime, which lets the client send requests to the server and receive MTG data, rulings, and set information. Use the client to search for cards, view card details, browse sets, and access the Comprehensive Rules as needed.
Typical usage patterns include starting the server once on your machine and then keeping it running while you perform searches, card lookups, and set explorations from your MCP client. If you need to run multiple MCP servers for testing, use separate configurations for each server and ensure ports or stdio transports do not conflict.
Prerequisites you need before installing are PHP 8.1 or higher and Composer, PHP’s dependency manager.
Check your PHP version to ensure it meets the minimum requirement.
php --versionInstall Composer to manage PHP dependencies.
# Follow the installation instructions from getcomposer.org
php -v
composer --versionClone the project repository to your local machine, navigate into the project directory, and install dependencies.
git clone https://github.com/james2037/mcp-gatherer.git
cd mcp-gatherer
composer installStart the MCP server using PHP. This runs the server so your MCP client can communicate with it via STDIO.
php path/to/mcp_server.phpExample configuration for a Windows client to connect to the local server using the STDIO transport.
{
"mcpServers": {
"mcp_gatherer": {
"command": "php",
"args": ["C:\\mcp-gatherer\\mcp_server.php"],
"disabled": false,
"alwaysAllow": []
}
}
}Search MTG cards by name, color, type, and other criteria to locate cards quickly.
Retrieve detailed information for a specific card, including rulings and foreign language versions.
Access individual card rulings and rule references to understand interactions and edge cases.
Browse the full Magic: The Gathering Comprehensive Rules through the MCP interface.
Explore set information and related card listings to navigate card collections.
View available card images to help with quick identification and verification.