A Claude Code plugin for building, validating, pricing, and managing Magic: The Gathering Commander/EDH decks. It enforces bracket compliance (power levels 1-5), validates against Scryfall card data, and generates complete deck files with pricing breakdowns.
No API keys or external Python packages required.
/plugin marketplace add TinyCamera/mtg-deckbuilder
/plugin install mtg-deckbuilder
Runs a full 9-step guided deck building workflow:
- Validates the commander on Scryfall
- Researches EDHREC themes and synergies
- Designs the deck around a theme, bracket target, and budget
- Builds the 100-card list with category breakdowns
- Checks bracket compliance against Game Changers rules
- Fetches current prices from Scryfall
- Writes the deck JSON file
- Writes a companion README for the deck
- Runs final verification
/build-deck Omnath, Locus of Rage
/build-deck Atraxa, Praetors' Voice
Each deck produces two files in decks/: a JSON file containing the full card list and metadata, and a Markdown README describing the deck's strategy and breakdown.
Displays all built decks in a table showing each deck's commander, color identity, bracket level, and card count.
/list-decks
Fetches current prices from Scryfall for one or all decks. Shows a total cost, the top 10 most expensive cards, and a per-category price breakdown.
/price-deck omnath-locus-of-rage
/price-deck --all
/price-deck --all --cheapest
The --cheapest flag selects the lowest-cost printing for each card.
Commander decks are assigned a bracket from 1 to 5 indicating power level, following the system defined by the Commander Rules Committee and tracked by EDHREC's Game Changers list:
- Bracket 1-2: No Game Changer cards. No infinite combos. No mass land denial.
- Bracket 3: Up to 3 Game Changer cards. Combos allowed only if they cannot execute before turn 6. No mass land denial.
- Bracket 4-5: Unrestricted.
The plugin enforces these rules automatically. Every time a deck JSON file is written, validation hooks run a 6-check suite covering structure, card existence, color identity, category accuracy, bracket compliance, and commander legality.
Decks are validated against six checks on every write:
- Structure -- Confirms the JSON matches the required schema (100 cards, valid metadata).
- Card existence -- Batch-verifies all cards against Scryfall's database.
- Color identity -- Ensures every card falls within the commander's color identity.
- Category accuracy -- Checks that each card's assigned category (creature, instant, land, etc.) is correct.
- Bracket compliance -- Enforces Game Changer limits, combo restrictions, and mass land denial rules for the target bracket.
- Commander legality -- Confirms the commander is legal in the Commander format.
A deck JSON file cannot be written without a matching README file already in place.
All card data comes from Scryfall, which requires no API key. The plugin respects Scryfall's rate limits (100ms between requests). Theme and synergy research references EDHREC.
- Python 3 (stdlib only, no pip packages)
- Claude Code with plugin support
MIT
- Repository: github.com/TinyCamera/mtg-deckbuilder
- Author: nconroy