# MTG MCP Server

Magic: The Gathering card search, combo lookup, draft analytics, and Commander tools.

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y @smithery/cli@latest mcp add j4th/mtg-mcp-server

# Browse available tools
npx -y @smithery/cli@latest tool list j4th/mtg-mcp-server

# Get full schema for a tool
npx -y @smithery/cli@latest tool get j4th/mtg-mcp-server ping

# Call a tool
npx -y @smithery/cli@latest tool call j4th/mtg-mcp-server ping '{}'
```

## Direct MCP Connection

Endpoint: `https://mtg-mcp-server--j4th.run.tools`

**Optional config:**
- `MTG_MCP_ENABLE_17LANDS` (query) — Enable 17Lands draft analytics backend for card ratings and archetype stats
- `MTG_MCP_ENABLE_EDHREC` (query) — Enable EDHREC commander metagame backend (uses undocumented endpoints)
- `MTG_MCP_ENABLE_BULK_DATA` (query) — Enable Scryfall bulk card data for rate-limit-free lookups (~80 MB download on first use)
- `MTG_MCP_LOG_LEVEL` (query) — Server logging level
- `MTG_MCP_SCRYFALL_RATE_LIMIT_MS` (query) — Minimum delay between Scryfall API calls in milliseconds
- `MTG_MCP_BULK_DATA_REFRESH_HOURS` (query) — Hours between Scryfall bulk data refreshes

## Tools (69)

- `ping` — Health check — returns 'pong'.
- `scryfall_search_cards` — Search for Magic cards using Scryfall syntax.
- `scryfall_card_details` — Get full details for a Magic card by exact or fuzzy name.
- `scryfall_card_price` — Get current prices for a Magic card. Prices update once per day.
- `scryfall_card_rulings` — Get official rulings and clarifications for a Magic card.
- `scryfall_set_info` — Get metadata for a Magic set by its code.
- `scryfall_whats_new` — Find recently printed or released Magic cards.
- `spellbook_find_combos` — Search for known combos involving a specific card.
- `spellbook_combo_details` — Get detailed steps for a specific combo by its Spellbook ID.
- `spellbook_find_decklist_combos` — Find combos present in (or nearly present in) a Commander decklist.
- `spellbook_estimate_bracket` — Estimate the Commander bracket (power level) for a decklist.
- `draft_card_ratings` — Get win rate and draft performance data for cards in a set.
- `draft_archetype_stats` — Get win rates by color pair/archetype for a draft set.
- `edhrec_commander_staples` — Get the most-played cards for a commander with synergy scores and inclusion rates.
- `edhrec_card_synergy` — Get synergy data for a specific card with a specific commander.
- `moxfield_decklist` — Fetch a full decklist from Moxfield by deck ID or URL.
- `moxfield_deck_info` — Get metadata for a Moxfield deck (name, format, author, dates).
- `moxfield_search_decks` — Search public Moxfield decks by format, keyword, or sort order.
- `moxfield_user_decks` — List a user's public decks on Moxfield.
- `bulk_card_lookup` — Look up a Magic card by exact name using Scryfall bulk data.
- `bulk_card_search` — Search for Magic cards in Scryfall bulk data.
- `bulk_format_legality` — Batch legality check for cards in a specific format.
- `bulk_format_search` — Search for legal cards in a specific format using natural language.
- `bulk_format_staples` — Find the most popular (staple) cards legal in a format.
- `bulk_similar_cards` — Find cards similar to a given card.
- `bulk_random_card` — Get a random Magic card, optionally filtered by format, color, type, and rarity.
- `bulk_ban_list` — Get the banned and restricted cards for a format.
- `bulk_card_in_formats` — Show a card's legality across all Magic formats.
- `spicerack_recent_tournaments` — List recent tournaments for a format with dates, player counts, and IDs.
- `spicerack_tournament_results` — Get full standings and decklists for a specific tournament.
- `spicerack_format_decklists` — Find top-performing decklists across recent tournaments for a format.
- `goldfish_metagame` — Get the current metagame breakdown for a competitive format.
- `goldfish_archetype_list` — Get a sample decklist for an archetype in a format.
- `goldfish_format_staples` — Get the most-played cards in a format with deck inclusion percentages.
- `goldfish_deck_price` — Get the estimated paper price for an archetype deck.
- `commander_overview` — Comprehensive commander profile combining data from all available sources.
- `evaluate_upgrade` — Assess whether a card is worth adding to a specific commander deck.
- `draft_pack_pick` — Rank cards in a draft pack using 17Lands win rate data.
- `suggest_cuts` — Identify the weakest cards to cut from a commander decklist.
- `card_comparison` — Compare 2-5 cards side-by-side for a specific commander deck.
- `budget_upgrade` — Suggest budget-friendly upgrades for a commander deck.
- `deck_analysis` — Full decklist health check — mana curve, colors, combos, bracket, budget, synergy.
- `set_overview` — Draft format overview — top commons/uncommons and trap rares.
- `theme_search` — Find cards matching a theme — mechanical, tribal, or abstract/flavorful.
- `build_around` — Find synergistic cards for 1-5 build-around cards in any format.
- `complete_deck` — Identify gaps in a partial decklist and suggest cards to fill them.
- `commander_comparison` — Compare 2-5 commanders head-to-head: stats, combos, staples, popularity.
- `tribal_staples` — Best cards for a creature type — lords, synergy pieces, and top members.
- `precon_upgrade` — Analyze and upgrade a Commander precon — identify weakest cards, suggest replacements.
- `color_identity_staples` — Top cards across ALL commanders in a color identity.
- `sealed_pool_build` — Build 1-3 decks from a sealed pool using card quality and color pair analysis.
- `draft_signal_read` — Analyze draft picks and recommend a direction based on color signals.
- `draft_log_review` — Review a completed draft — pick-by-pick GIH WR analysis and key decision points.
- `rotation_check` — Check Standard rotation status and identify which cards are rotating.
- `metagame_snapshot` — Get the current metagame breakdown for a competitive format.
- `archetype_decklist` — Get the stock decklist for a competitive archetype.
- `archetype_comparison` — Compare 2-4 competitive archetypes side-by-side.
- `format_entry_guide` — Get a beginner-oriented guide for entering a competitive format.
- `suggest_sideboard` — Suggest a 15-card sideboard for a competitive deck.
- `sideboard_guide` — Get a specific sideboard in/out plan for a named matchup.
- `sideboard_matrix` — Generate a sideboard matrix for a deck across common matchups.
- `deck_validate` — Validate a decklist against a format's construction rules.
- `suggest_mana_base` — Suggest a mana base for a decklist based on color pip distribution.
- `price_comparison` — Compare prices across multiple cards using Scryfall bulk data.
- `rules_lookup` — Look up MTG Comprehensive Rules by number or keyword search.
- `keyword_explain` — Explain an MTG keyword with rules text, examples, and interactions.
- `rules_interaction` — Explain how two mechanics or cards interact under MTG rules.
- `rules_scenario` — Resolve a game scenario step-by-step using MTG rules.
- `combat_calculator` — Calculate combat step-by-step with keyword interactions.

```bash
# Get full input/output schema for a tool
npx -y @smithery/cli@latest tool get j4th/mtg-mcp-server <tool-name>
```

## Resources

- `mtg://rules/keywords` — All keywords with brief definitions.
- `mtg://rules/sections` — Section index for the Comprehensive Rules.

## Prompts (19)

- `evaluate_commander_swap` (commander, adding, cutting) — Evaluate swapping a card in a Commander deck.
- `deck_health_check` (commander) — Guide a comprehensive deck health assessment.
- `draft_strategy` (set_code) — Guide a draft format preparation session.
- `find_upgrades` (commander, budget) — Guide a budget upgrade session for a Commander deck.
- `build_deck` (concept, format, budget) — Guide building a deck from scratch for any format.
- `evaluate_collection` (cards) — Evaluate a collection of cards across formats.

---
*Response truncated. Use `npx -y @smithery/cli@latest` for complete data.*
