MTG MCP Server
io.github.j4th由 GitHub 账号 j4th 发布v3.0.0更新于 Oct 25, 2026
Magic: The Gathering card search, combo lookup, draft analytics, and Commander tools.
概览
本地运行的万智牌助手服务器,让 AI 搜索卡牌、查找组合技、分析轮抽与套牌,并查询规则。
- 可以做什么
- 搜索与读取卡牌数据:Scryfall 语法搜索、卡牌详情、价格、裁定、系列信息与新牌,启用后还可做批量数据查询、赛制合法性与相似卡牌。查找组合技并估算指挥官分级。用 17Lands 胜率、色组统计和选牌排序分析轮抽与现开池。查看指挥官与构筑赛环境:常用牌、协同度、原型、赛事结果、牌表和备牌方案。构建与检查套牌:主题搜索、缺口分析、建议剔除、法术力基础、合法性与价格比较。查询完整规则、关键字、互动与战斗场景。
- 适用场景
- 适合希望助手用真实卡牌、轮抽、环境与规则数据回答万智牌问题的玩家和组牌者,从休闲指挥官组牌到竞技备牌规划。
- 运行要求
- 以 Python 包形式通过 uvx 在本地运行,需要 Python 3.12+;也提供托管远程端点。无需 API 密钥。可选后端通过 MTG_MCP_ 环境变量开启,批量数据首次使用约下载 30 MB。
安装
在 SourceWeft 中
- 打开 控制台中的 MTG MCP Server,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
mtg-mcp-server
[CI] [PyPI] [Python 3.12+] [License: MIT] [codecov] [CodeQL] [Smithery] [Dependabot] [uv] [Ruff]
69 tools, 19 prompts, and 21 resources that give AI assistants deep access to Magic: The Gathering -- card data, combos, draft analytics, Commander metagame, competitive constructed, sideboard strategy, deck building, rules engine, and more. Works with Claude Code, Claude Desktop, or any MCP client.
Built on data from Scryfall, Commander Spellbook, 17Lands, EDHREC, Moxfield, Spicerack, and MTGGoldfish. See Data Sources & Attribution for details and usage terms.
Table of Contents
- What You Can Do — example prompts and real tool output
- Install — hosted, Claude Code, Claude Desktop, PyPI, development
- Configuration — environment variables and feature flags
- Tools — all 69 tools across 13 domains
- Architecture — FastMCP 3.x mount system
- Stack — Python 3.12+, FastMCP, httpx, Pydantic
- Development — mise commands for testing, linting, typechecking
- Documentation — cookbook, architecture, tool reference, and more
- Status — current tool/test counts
- Data Sources & Attribution — Scryfall, Spellbook, 17Lands, EDHREC, Moxfield, Spicerack, MTGGoldfish
What You Can Do
Ask your AI assistant questions like these and it will use the MTG tools automatically:
Commander
- "Show me everything about Muldrotha as a commander"
- "What are the best budget upgrades for my Atraxa deck under $5?"
- "Compare Muldrotha vs Meren vs Karador as graveyard commanders"
Draft & Limited
- "What are the best commons in Foundations for draft?"
- "Rank these cards for my draft pack: Bitter Triumph, Monstrous Rage, Torch the Tower"
- "Build a sealed deck from this pool: [list]"
Deck Building
- "Validate my Modern decklist"
- "Suggest a mana base for my 3-color Commander deck"
- "Find cards that synergize with sacrifice themes in Golgari"
Rules
- "How do deathtouch and trample interact?"
- "Resolve this combat scenario: my 3/3 with first strike blocks their 5/5 with trample"
Constructed
- "What does the Modern metagame look like right now?"
- "Show me the stock Boros Energy decklist for Modern"
- "Build me a sideboard for this Pioneer deck"
- "Give me a sideboard guide for my deck against Azorius Control"
See It in Action
"Compare Muldrotha, Meren, and Karador as graveyard commanders"
"What are the best commons in Foundations for draft?"
More examples with real tool output in the Cookbook.
Install
No API keys needed -- all data sources are public.
Hosted (zero setup)
The fastest way to get started. No Python install required. Works on mobile.
Via the UI (Claude Desktop or claude.ai): Settings → Connectors → Add custom connector → paste the URL:
Via config file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):
Claude Code
Or via the UI: Settings → MCP Servers → Add server → enter uvx mtg-mcp-server as the command.
Claude Desktop (local)
Runs on your machine. Requires Python 3.12+.
PyPI
Development
Claude Code config for local development:
Configuration
All settings use MTG_MCP_ environment variables. Everything works out of the box with sensible defaults.
See .env.example for all available options including base URLs, rate limits, and cache settings.
Tools
69 tools across 13 domains. See docs/TOOL_DESIGN.md for full input/output details.
Card Data (scryfall_*)
Bulk Data (bulk_*)
Combos (spellbook_*)
Draft Analytics (draft_*)
Commander Metagame (edhrec_*)
Decklists (moxfield_*)
Tournament Data (spicerack_*)
Metagame (goldfish_*)
Commander Workflows
Deck Building
Draft Workflows
Constructed Workflows
Rules Engine
Architecture
Built on FastMCP 3.x. Each data source is an independent sub-server mounted into a single orchestrator:
Services are pure async API clients. Providers register MCP tools. Workflows compose across services with partial failure tolerance. See docs/ARCHITECTURE.md for the full picture.
Stack
Development
Documentation
Status
69 tools, 19 prompts, 21 resource templates. 1340 tests at 88% coverage.
Data Sources & Attribution
This project composes data from multiple third-party services:
- Scryfall -- Card database, prices, rulings, search, bulk data (API guidelines)
- Commander Spellbook -- Combo search, bracket estimation (MIT license)
- 17Lands -- Draft card ratings, archetype win rates (usage guidelines)
- EDHREC -- Commander staples, synergy scores (undocumented endpoints, behind feature flag)
- Moxfield -- Public decklists and deck search (reverse-engineered API, behind feature flag)
- Spicerack -- Tournament results and standings (documented API)
- MTGGoldfish -- Competitive metagame data, archetypes, format staples (HTML scraping, behind feature flag)
See THIRD_PARTY_NOTICES.md for full license texts and usage terms.
Disclaimer
mtg-mcp-server is unofficial Fan Content permitted under the Fan Content Policy. Not approved/endorsed by Wizards. Portions of the materials used are property of Wizards of the Coast. © Wizards of the Coast LLC.
License
MIT -- see LICENSE
来源:README.md,提交 f1a6140
工具
0版本历史
1- v3.0.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分