MTGDecks Metagame MCP Server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MTGDecks Metagame MCP Server What's the current Modern metagame?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MTGDecks Metagame MCP
A Python/MCP PoC that reads public pages of MTGDecks.net and normalizes metagame and deck information into a consistent JSON format.
Since no documented public API was found, it uses the site's public HTML and URL-based filters. No browser login or cookies are required.
Features Provided
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,
)Each feature is provided both as a Python function and as an MCP tool.
Related MCP server: Mystic Forge
Requirements
Python 3.10 or higher
uvrecommended
Installation
git clone <repository-url>
cd Metagame-MCP
uv syncTo install including development and test dependencies, use the following command.
uv sync --extra devRunning the MCP Server
The server runs with stdio transport by default.
uv run mtgdecks-mcpAn example MCP host configuration is as follows. cwd must be changed to the actual absolute path of this repository.
{
"mcpServers": {
"mtgdecks": {
"command": "uv",
"args": ["run", "mtgdecks-mcp"],
"cwd": "C:\\path\\to\\Metagame-MCP"
}
}
}The following four MCP tools are registered.
get_metagameget_recent_decksget_archetype_decksget_top_performing_decks
Using from 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,
)When querying multiple times, it is more efficient to use the client directly so that HTTP connections can be reused.
from mtgdecks_mcp import MTGDecksClient
with MTGDecksClient() as client:
modern = client.get_metagame("Modern")
pioneer = client.get_metagame("Pioneer")Arguments
format
The format name used on MTGDecks.net. Examples: Standard, Pioneer, Modern, Legacy, Pauper, Commander, Duel-Commander.
source
Value | Meaning |
| Full metagame |
| MTGO event metagame |
| Recent major event metagame |
mtgo-events, major-events, and recent-major-events can also be used as aliases.
platform
mtgoarenatabletop
Case is not distinguished.
game_type
BO1BO3
Case is not distinguished.
Query Range Limits
max_pages:1~10limit:1~100min_players: positive integer
Response Structure
Metagame
{
"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
}
]
}Deck Lists
Deck query functions commonly return pages and decks. pages contains the original page URLs that were actually queried.
{
"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
}
]
}Fields that MTGDecks pages do not provide values for may be null. Prices are USD values based on the page's Paper/TCGPlayer.
get_top_performing_decks does not calculate its own performance score but uses MTGDecks' rank ascending sort. Therefore, decks with better event results such as champion, runner-up, and Top 8 are returned first.
Testing
uv run pytestTests use stored HTML examples and httpx.MockTransport without connecting to external sites.
Project Structure
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.pyLimitations and Terms of Use
This project depends on the public HTML structure, so if MTGDecks.net's markup or paths change, parser updates may be needed.
Mass crawling, parallel collection, and cache/database persistence are not included in the PoC scope.
The accuracy and availability of the original data depend on MTGDecks.net.
All normalized results include traceable original URLs.
MTGDecks' terms of use restrict content to personal, non-commercial use. Before expanding to commercial services or continuous mass collection, confirm permission or an API partnership with MTGDecks.
Related documentation: MTGDecks Terms of Use
Available Tools
4 toolsget_archetype_decksB
Return recent decks belonging to one archetype.
Inputs: format (required), archetype (required), limit. Returns: object
get_metagameA
Return normalized archetype shares for a format (source: all, mtgo, or major).
Inputs: format (required), source. Returns: object
get_recent_decksC
Return recent deck rows, optionally filtered by platform and BO1/BO3 game type.
Inputs: format (required), platform, game_type, max_pages. Returns: object
get_top_performing_decksB
Return decks ordered by best finish, optionally filtered by platform and attendance.
Inputs: format (required), limit, platform, min_players. Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
The tools are mostly distinct: get_metagame provides aggregate archetype shares, get_recent_decks provides unfiltered recent deck lists, get_archetype_decks filters recent decks by a specific archetype, and get_top_performing_decks sorts by finish. However, get_recent_decks and get_archetype_decks both return recent decks and could be confused when a user wants all decks versus a single archetype.
All four tool names follow a consistent get_ prefix with snake_case, and three use the get_<adjective>_decks pattern. get_metagame is the only outlier, but it still shares the verb-first style and is clear and predictable.
Four tools is a well-scoped count for a metagame analysis server. Each tool addresses a distinct query need without unnecessary bloat or minimalism, fitting comfortably within the ideal 3-15 range.
The tool surface covers the core metagame queries: aggregate shares, all recent decks, archetype-filtered decks, and top performers. Minor gaps like deck detail lookup or archetype listing exist, but agents can answer most metagame questions using these four tools.
Related MCP Connectors
Market data tools for the MCP ecosystem: server stats, events, search, leaderboards, package trends.
Magic: The Gathering card roles, synergies, Commander brackets, deck analysis and your own decks.
Organize and track your Magic: The Gathering collection, decks, prices and imports.
MTG market data: search 114K+ cards, price signals, AI analysis. Free tier available.
Related MCP Servers
- AlicenseAqualityCmaintenanceProvides 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.5668 PyPI23MIT
- 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
- AlicenseAqualityDmaintenanceProvides 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
- FlicenseNot gradedqualityBmaintenanceProvides Magic: The Gathering card, deck, provider, and statistical evidence tools for LLMs to make informed deckbuilding decisions.-