MTGDecks Metagame MCP Server
MTGDecks メタゲーム MCP
MTGDecks.net の公開ページを読み取り、メタゲームとデッキ情報を一貫したJSON形式に正規化するPython/MCP PoCです。
文書化された公開APIが確認できないため、サイトの公開HTMLとURLベースのフィルタを使用します。ブラウザのログインやクッキーは不要です。
提供機能
get_metagame(
format: str,
source: str = "all",
)
get_recent_decks(
format: str,
platform: str | None = None,
game_type: str | None = None,
max_pages: int = 3,
)
get_archetype_decks(
format: str,
archetype: str,
limit: int = 20,
)
get_top_performing_decks(
format: str,
platform: str | None = None,
min_players: int | None = None,
limit: int = 20,
)各機能はPython関数とMCPツールの両方で提供されます。
Related MCP server: Mystic Forge
要件
Python 3.10以上
uv推奨
インストール
git clone <repository-url>
cd Metagame-MCP
uv sync開発およびテスト依存関係までインストールするには、次のコマンドを使用します。
uv sync --extra devMCPサーバーの実行
サーバーはデフォルトでstdio転送方式で実行されます。
uv run mtgdecks-mcpMCPホスト設定の例は次のとおりです。cwd はこのリポジトリの実際の絶対パスに変更する必要があります。
{
"mcpServers": {
"mtgdecks": {
"command": "uv",
"args": ["run", "mtgdecks-mcp"],
"cwd": "C:\\path\\to\\Metagame-MCP"
}
}
}登録されるMCPツールは次の4つです。
get_metagameget_recent_decksget_archetype_decksget_top_performing_decks
Pythonでの使用
from mtgdecks_mcp import (
get_archetype_decks,
get_metagame,
get_recent_decks,
get_top_performing_decks,
)
metagame = get_metagame("Modern", source="mtgo")
recent = get_recent_decks(
"Modern",
platform="mtgo",
game_type="BO3",
max_pages=1,
)
archetype = get_archetype_decks(
"Modern",
"Boros Energy",
limit=5,
)
top = get_top_performing_decks(
"Modern",
platform="mtgo",
min_players=64,
limit=10,
)複数回照会する場合は、HTTP接続を再利用できるようにクライアントを直接使用する方が効率的です。
from mtgdecks_mcp import MTGDecksClient
with MTGDecksClient() as client:
modern = client.get_metagame("Modern")
pioneer = client.get_metagame("Pioneer")引数
format
MTGDecks.netで使用するフォーマット名です。例: Standard、Pioneer、Modern、Legacy、Pauper、Commander、Duel-Commander。
source
値 | 意味 |
| 全体メタゲーム |
| MTGOイベントメタゲーム |
| 最近の主要イベントメタゲーム |
mtgo-events、major-events、recent-major-events もエイリアスとして使用できます。
platform
mtgoarenatabletop
大文字と小文字は区別されません。
game_type
BO1BO3
大文字と小文字は区別されません。
照会範囲の制限
max_pages:1〜10limit:1〜100min_players: 正の整数
レスポンス構造
メタゲーム
{
"format": "Modern",
"source": "all",
"url": "https://mtgdecks.net/Modern",
"selected_deck_count": 10994,
"updated_at": "2026-08-21 06:47:39",
"archetypes": [
{
"name": "Boros Energy",
"url": "https://mtgdecks.net/Modern/boros-energy",
"meta_share_percent": 7.98,
"trend_percent": -2.85,
"tier": "A",
"win_rate_percent": 49.0,
"top_25_conversion": 0.95,
"deck_count": 877,
"price_usd": 1109.0
}
]
}デッキリスト
デッキ照会機能は共通して pages と decks を返します。pages には実際に照会した元のページURLが入ります。
{
"format": "Modern",
"pages": ["https://mtgdecks.net/Modern/decklists/page:1"],
"decks": [
{
"name": "deck",
"url": "https://mtgdecks.net/Modern/example-decklist-123",
"author": "Player",
"archetype": "Boros Energy",
"game_type": "BO3",
"platform": "mtgo",
"event": "MTGO Modern Challenge",
"event_level": 3,
"players": 94,
"spiciness_percent": 30.0,
"date": "2026-08-20",
"price_usd": 1112.0,
"placement": "1st",
"wins": 5,
"losses": 0,
"draws": 0,
"win_rate_percent": 100.0
}
]
}MTGDecksページで値を提供しないフィールドは null になる場合があります。価格はページのPaper/TCGPlayer基準のUSD値です。
get_top_performing_decks は独自のパフォーマンススコアを計算せず、MTGDecksの rank 昇順ソートを使用します。したがって、優勝、準優勝、Top 8などのイベント成績が良いデッキから返されます。
テスト
uv run pytestテストは外部サイトに接続せず、保存済みのHTMLサンプルと httpx.MockTransport を使用します。
プロジェクト構造
src/mtgdecks_mcp/
├── __init__.py # 공개 Python API
├── parsers.py # MTGDecks HTML 정규화
├── server.py # MCP 도구 등록과 stdio 서버
└── service.py # URL 구성, HTTP 클라이언트, 네 가지 기능
tests/
├── test_parsers.py
└── test_service.py制限事項と利用条件
このプロジェクトは公開HTML構造に依存するため、MTGDecks.netのマークアップやパスが変更されるとパーサーの修正が必要になる場合があります。
大量クローリング、並列収集、キャッシュ/データベースの永続化はPoCの範囲に含まれていません。
元データの正確性と可用性はMTGDecks.netに依存します。
すべての正規化結果には追跡可能な元のURLを含めます。
MTGDecksの利用規約は、コンテンツを個人・非商用目的に制限しています。商用サービスや継続的な大量収集に拡張する前に、MTGDecks側の許可またはAPIパートナーシップを確認してください。
関連ドキュメント: MTGDecks利用規約
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceProvides AI assistants with 69 tools, 19 prompts, and 21 resources for deep access to Magic: The Gathering, including card data, combos, draft analytics, Commander metagame, competitive constructed, sideboard strategy, deck building, and rules engine, working with any MCP client.5616MIT
- AlicenseNot gradedqualityBmaintenanceUnified MCP server for Magic: The Gathering, combining Scryfall card search and pricing, EDHRec commander recommendations, Archidekt deck reading, and decklist validation into a single service.MIT
- FlicenseNot gradedqualityBmaintenanceProvides access to Magic: The Gathering card data via Scryfall API, including search, rulings, sets, and local deck management with multi-owner support.
- AlicenseAqualityBmaintenanceProvides AI assistants with comprehensive Magic: The Gathering data including card info, combos, draft analytics, Commander metagame, constructed formats, sideboard strategy, deck building, and rules.74MIT
Related MCP Connectors
Scryfall MCP — Magic: The Gathering card database.
Crypto intelligence MCP for market data, DeFi, wallets, security, DEX, NFTs, and Solana.
BGG MCP provides access to the BoardGameGeek API through the Model Context Protocol, enabling retr…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/mingun-kim/MTG-Metagame-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server