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 產生的概覽

在本機執行的魔法風雲會助理伺服器,讓 AI 搜尋卡牌、查找組合技、分析輪抽與套牌,並查詢規則。

可以做什麼
搜尋與讀取卡牌資料:Scryfall 語法搜尋、卡牌詳情、價格、裁定、系列資訊與新牌,啟用後還可做批次資料查詢、賽制合法性與相似卡牌。查找組合技並估算指揮官分級。用 17Lands 勝率、色組統計和選牌排序分析輪抽與現開池。查看指揮官與構築賽環境:常用牌、協同度、原型、賽事結果、牌表和備牌方案。建構與檢查套牌:主題搜尋、缺口分析、建議剔除、法力基礎、合法性與價格比較。查詢完整規則、關鍵字、互動與戰鬥情境。
適用情境
適合希望助理用真實卡牌、輪抽、環境與規則資料回答魔法風雲會問題的玩家和組牌者,從休閒指揮官組牌到競技備牌規劃。
執行需求
以 Python 套件形式透過 uvx 在本機執行,需要 Python 3.12+;也提供託管遠端端點。無需 API 金鑰。選用後端透過 MTG_MCP_ 環境變數開啟,批次資料首次使用約下載 30 MB。
安裝前請注意
選用後端依賴未公開或逆向的介面及網頁擷取(EDHREC、Moxfield、MTGGoldfish),可能失效或違反使用條款。啟用批次資料會下載約 30 MB。資料會傳送給 Scryfall、17Lands、Spicerack 等第三方服務。屬非官方粉絲內容,未獲威世智背書。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 MTG MCP Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

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"

                     Muldrotha            Meren               KaradorMana Cost            {3}{B}{G}{U}         {2}{B}{G}           {5}{W}{B}{G}Color Identity       BGU (Sultai)         BG (Golgari)        BGW (Abzan)Stats                6/6                  3/4                  3/4EDHREC Rank          #1,137               #1,476              #9,894Total Decks          22,460               19,919              6,305Combo Count          10                   1                   10
Top Staples:  Muldrotha           Spore Frog (+53%), Sakura-Tribe Elder (+36%), Eternal Witness (+27%)  Meren               Spore Frog (+70%), Sakura-Tribe Elder (+55%), Viscera Seer (+52%)  Karador             Karmic Guide (+51%), Satyr Wayfinder (+49%), Sun Titan (+48%)

"What are the best commons in Foundations for draft?"

Foundations (FDN) — PremierDraft · Median GIH WR: 54.7%
Rank  Card               Color  GIH WR   ALSA   IWD      Games1     Bake into a Pie    B      58.4%    3.1    +5.3%    354,7412     Burst Lightning    R      58.2%    3.3    +3.0%    338,8883     Refute             U      58.1%    5.3    +4.3%    321,2804     Stab               B      57.9%    3.4    +4.5%    376,5695     Dazzling Angel     W      57.8%    3.2    +2.4%    317,648
Trap rares: Doubling Season (39.4%), Thousand-Year Storm (35.2%) ...

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:

https://mtg-mcp-server.fastmcp.app/mcp

Via config file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):

json
{  "mcpServers": {    "mtg": {      "type": "url",      "url": "https://mtg-mcp-server.fastmcp.app/mcp"    }  }}

Claude Code

bash
claude mcp add mtg -- uvx mtg-mcp-server

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+.

json
{  "mcpServers": {    "mtg": {      "command": "uvx",      "args": ["mtg-mcp-server"]    }  }}

PyPI

bash
# Run directly (no install)uvx mtg-mcp-server
# Install globallyuv tool install mtg-mcp-server
# Add to a projectuv add mtg-mcp-server

Development

bash
git clone https://github.com/j4th/mtg-mcp-server.gitcd mtg-mcp-servermise install          # Installs Python 3.12, uv, ruff, tymise run setup        # Creates venv, installs dependencies
uv run mtg-mcp-server # Run the server

Claude Code config for local development:

json
{  "mcpServers": {    "mtg": {      "command": "uv",      "args": ["run", "--directory", "/path/to/mtg-mcp-server", "mtg-mcp-server"]    }  }}

Configuration

All settings use MTG_MCP_ environment variables. Everything works out of the box with sensible defaults.

bash
# Feature flags for optional backendsMTG_MCP_ENABLE_EDHREC=false       # EDHREC (scrapes undocumented endpoints)MTG_MCP_ENABLE_17LANDS=false      # 17Lands (rate-limits aggressively)MTG_MCP_ENABLE_BULK_DATA=false    # Scryfall bulk data (~30MB download on first use)MTG_MCP_ENABLE_RULES=false        # Comprehensive Rules engine
# Pass env vars through uvxuvx --env MTG_MCP_ENABLE_EDHREC=false mtg-mcp-server

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_*)

ToolDescription
search_cardsSearch using full Scryfall syntax (f:commander id:sultai t:creature)
card_detailsFull card data by exact or fuzzy name
card_priceCurrent USD, EUR, and foil prices
card_rulingsOfficial rulings and clarifications
set_infoSet metadata by code
whats_newRecently released or previewed cards

Bulk Data (bulk_*)

ToolDescription
card_lookupRate-limit-free card lookup by exact name
card_searchSearch by name, type, or oracle text
format_legalityCheck if a card is legal in a format
format_searchSearch for cards legal in a specific format
format_staplesTop-played cards in a format by EDHREC rank
ban_listBanned and restricted cards for a format
card_in_formatsCard legality across all formats
random_cardRandom card, optionally filtered by format or type
similar_cardsFind cards similar by type, keywords, or mana cost

Combos (spellbook_*)

ToolDescription
find_combosSearch for combos by card name and color identity
combo_detailsStep-by-step combo instructions by ID
find_decklist_combosFind combos present in a decklist
estimate_bracketEstimate Commander bracket for a decklist

Draft Analytics (draft_*)

ToolDescription
card_ratingsWin rates and draft data for cards in a set (17Lands)
archetype_statsWin rates by color pair for a set

Commander Metagame (edhrec_*)

ToolDescription
commander_staplesMost-played cards for a commander with synergy scores
card_synergySynergy data for a card with a specific commander

Decklists (moxfield_*)

ToolDescription
decklistFetch a full decklist by deck ID or URL
deck_infoDeck metadata (name, format, author, dates)
search_decksSearch public decks by format, keyword, or sort order
user_decksList a user's public decks

Tournament Data (spicerack_*)

ToolDescription
recent_tournamentsRecent tournaments for a competitive format
tournament_resultsFull standings for a specific tournament
format_decklistsTop-finishing decklists across recent tournaments

Metagame (goldfish_*)

ToolDescription
metagameCurrent metagame breakdown for a competitive format
archetype_listSample decklist for an archetype
format_staplesMost-played cards in a format with deck inclusion %
deck_priceEstimated paper price for an archetype deck

Commander Workflows

ToolDescription
commander_overviewFull commander profile from all sources
evaluate_upgradeAssess whether a card is worth adding to a deck
card_comparisonCompare 2-5 cards side-by-side for a commander
budget_upgradeBudget-constrained upgrade suggestions ranked by synergy/$
commander_comparisonCompare 2-5 commanders head-to-head
color_identity_staplesTop-played cards across all commanders in a color identity

Deck Building

ToolDescription
theme_searchFind cards matching a mechanical or tribal theme
build_aroundDetect synergies from key cards and find complements
complete_deckGap analysis and suggestions for a partial decklist
tribal_staplesBest cards for a creature type in a color identity
precon_upgradeAnalyze a precon and suggest swap pairs
suggest_cutsIdentify the weakest cards to cut from a decklist
deck_analysisFull decklist health check (curve, colors, combos, budget)
deck_validateValidate a decklist against format construction rules
suggest_mana_baseSuggest lands based on color pip distribution
price_comparisonCompare prices across multiple cards

Draft Workflows

ToolDescription
draft_pack_pickRank cards in a draft pack using 17Lands data
set_overviewTop commons/uncommons and trap rares for a format
sealed_pool_buildSuggest the best 40-card builds from a sealed pool
draft_signal_readDetect open colors from draft picks
draft_log_reviewPick-by-pick review of a completed draft with grade

Constructed Workflows

ToolDescription
rotation_checkStandard rotation status and rotating cards
metagame_snapshotTiered metagame breakdown with prices
archetype_decklistStock decklist for a competitive archetype
archetype_comparisonCompare 2-4 archetypes side-by-side
format_entry_guideBeginner guide for entering a competitive format
suggest_sideboard15-card sideboard suggestions for a deck
sideboard_guideIn/out plan for a specific matchup
sideboard_matrixSideboard matrix across common matchups

Rules Engine

ToolDescription
rules_lookupLook up rules by number or keyword
keyword_explainExplain a keyword with rules and example cards
rules_interactionHow two mechanics interact with rule citations
rules_scenarioRules framework for a game scenario
combat_calculatorStep-by-step combat phases with keyword interactions

Architecture

Built on FastMCP 3.x. Each data source is an independent sub-server mounted into a single orchestrator:

MTG (orchestrator)├── scryfall (namespace: scryfall_)     -> Scryfall REST API├── spellbook (namespace: spellbook_)   -> Commander Spellbook API├── draft (namespace: draft_)           -> 17Lands data├── edhrec (namespace: edhrec_)         -> EDHREC (scraped, feature-flagged)├── bulk (namespace: bulk_)             -> Scryfall Oracle Cards bulk data├── moxfield (namespace: moxfield_)     -> Moxfield (reverse-engineered, feature-flagged)├── spicerack (namespace: spicerack_)   -> Spicerack tournament API├── goldfish (namespace: goldfish_)     -> MTGGoldfish (scraped, feature-flagged)└── workflows (no namespace)            -> 36 tools (31 composed + 5 rules)

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

RuntimePython 3.12+, uv
MCPFastMCP 3.2.x
HTTPhttpx (async)
ValidationPydantic v2
Loggingstructlog
Toolingmise, ruff, ty (Astral)
Testingpytest, respx, pytest-asyncio
HTML parsingselectolax

Development

bash
git clone https://github.com/j4th/mtg-mcp-server.gitcd mtg-mcp-servermise install          # Installs Python, uv, ruff, tymise run setup        # Creates venv, installs dependencies
mise run check        # Full quality gate: lint + typecheck + testsmise run check:quick  # Fast gate: lint + typecheck + affected tests onlymise run test         # All tests with coveragemise run test:quick   # Only tests affected by recent changesmise run lint         # ruff check + format checkmise run typecheck    # ty checkmise run dev          # MCP Inspector for interactive testingmise run fix          # Auto-fix lint and format issues

Documentation

DocWhat it covers
COOKBOOK.mdUsage recipes -- Commander, draft, deck building, rules workflows
TOOL_DESIGN.mdFull reference for all 69 tools, 19 prompts, 21 resources
ARCHITECTURE.mdTechnical architecture, FastMCP patterns, design decisions
SERVICE_CONTRACTS.mdAPI endpoints, rate limits, response shapes per backend
DATA_SOURCES.mdAll data sources with auth, stability, and access patterns
CACHING_DESIGN.mdTTL cache strategy and Scryfall bulk data design
CONTRIBUTING.mdDevelopment setup, TDD workflow, code style, PR process
CHANGELOG.mdVersion history in Keep a Changelog format

Status

69 tools, 19 prompts, 21 resource templates. 1340 tests at 88% coverage.

PhaseWhatStatus
0Project scaffoldDone
1Scryfall backend (4 tools)Done
2Spellbook + 17Lands + EDHREC backends (9 tools)Done
3Workflow tools -- commander, draft, deck (4 tools)Done
4TTL caching + Scryfall bulk data provider (2 tools)Done
5Analysis & comparison workflows, prompts, resources (4 tools)Done
Branch AStructured output, rules engine, validation tools (17 tools)Done
Branch BFormat workflows -- deck building, commander depth, limited, constructed (11 tools)Done
MoxfieldMoxfield decklist provider (4 tools)Done
SpicerackTournament results provider (3 tools)Done
MTGGoldfishMetagame data provider (4 tools)Done
v2.3.0Metagame workflows, sideboard tools, Moxfield search (9 tools)Done

Data Sources & Attribution

This project composes data from multiple third-party services:

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
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v3.0.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分