CarpioCarpio/commander-deck-assistant-mcp
If you are the rightful owner of commander-deck-assistant-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
Commander Deck Assistant MCP Server is a tool designed to assist in building Commander format decks using The Command Zone's deck building template.
π― Commander Deck Assistant MCP Server
MCP server that helps build Commander format decks using The Command Zone's deck building template
π Overview
An MCP server that integrates with Claude Desktop to help build Commander format decks. Uses The Command Zone's deck building template to categorize cards and suggest improvements.
β¨ Key Features
- π― Deck Template: Uses The Command Zone's 108β100 card optimization approach
- π§ Card Classification: Automatically categorizes cards into template roles
- π Commander Database: Searchable database of commander-legal cards
- ποΈ Archetype Support: Recognizes common Commander deck strategies
- π Claude Integration: Works as an MCP server with Claude Desktop
π² What It Does
Here's how it helps with deck building:
π€ "Help me build a Kess, Dissident Mage spellslinger deck"
β
Analyzes commander β Suggests spellslinger/control archetype
β
Recommends cards by category β Smart ramp/card advantage options
β
Finds multi-role cards β Smothering Tithe (ramp + card advantage, 90% versatility)
β
Optimizes 108β100 β Helps trim down to final 100 cards
π¦ Quick Start
Prerequisites
- Node.js 18+
- Claude Desktop with MCP support
- 4GB+ RAM (for card database)
Installation
- Clone & Install
git clone https://github.com/CarpioCarpio/commander-deck-assistant-mcp.git
cd commander-deck-assistant-mcp
npm install
- Setup Database
npm run setup
Downloads Scryfall data (~400MB) and initializes SQLite database
- Build the Server
npm run build
- Configure Claude Desktop
Add to your Claude Desktop MCP settings (~/Library/Application Support/Claude/claude_desktop_config.json
):
{
"mcpServers": {
"commander-deck-assistant": {
"command": "node",
"args": ["/absolute/path/to/commander-deck-assistant-mcp/dist/server/index.js"]
}
}
}
- Start Building Decks!
Open Claude Desktop and try:
"Help me analyze Atraxa, Praetors' Voice as a commander"
"Find ramp cards that work well with artifacts"
"Optimize this deck list for better performance"
π οΈ Tools Available
Tool | Purpose | Example Use |
---|---|---|
search_cards | Find cards by name/color | Search removal in Boros colors |
get_commanders | List potential commanders | Find all Simic commanders |
analyze_commander | Deep commander analysis | Understand Atraxa's potential |
get_cards_by_category | Cards by template category | Get all ramp options |
classify_card_multi_category | Advanced card analysis | How versatile is Sol Ring? |
recommend_cards_by_versatility | Multi-role optimization | Find cards serving 2+ roles |
analyze_deck_optimization | Full deck analysis | Optimize existing 100-card list |
get_performance_stats | System monitoring | Check classification performance |
π
π― The Science Behind It
Command Zone Template Methodology
Built on the proven deck building framework from The Command Zone podcast:
Category | Cards | Purpose |
---|---|---|
Lands | 38 | Reliable mana base |
Ramp | 10 | Mana acceleration |
Card Advantage | 12 | Card draw and value |
Targeted Disruption | 12 | Spot removal |
Mass Disruption | 6 | Board wipes |
Plan | 30 | Win conditions |
Total | 108 | β Optimize to 100 |
Multi-Category Intelligence
Cards often serve multiple roles. Our classifier identifies these overlaps:
{
"card": "Smothering Tithe",
"categories": [
{"category": "ramp", "confidence": 0.95},
{"category": "card_advantage", "confidence": 0.75}
],
"versatilityScore": 90,
"reasoning": "Creates treasure tokens for ramp while providing resource advantage"
}
π― How It Works
The server uses The Command Zone's deck building template to categorize cards:
- Lands (38): Your mana base
- Ramp (10): Mana acceleration
- Card Advantage (12): Card draw and value engines
- Targeted Disruption (12): Spot removal
- Mass Disruption (6): Board wipes
- Plan (30): Your win conditions and strategy
Start with 108 cards, then optimize down to 100 by finding cards that serve multiple roles.
β οΈ Important Limitations
Templates are starting points, not final answers. As The Command Zone notes in their "Problems with Templates" episode:
- Not one size fits all: Korvold wants different cards than Atraxa, even with the same template
- Your deck teaches you more: Play your deck, then adjust based on what actually works
- Archetype matters: Stax, Combo, and Aggro decks may need very different ratios
- Meta dependent: Casual vs competitive playgroups need different approaches
This tool helps with: β Getting to a playable first draft β Identifying card roles and overlaps β Finding cards you might have missed
This tool can't: β Know your specific playgroup's meta β Understand your personal playstyle preferences β Replace testing and iteration
Use this as a starting point, then tune based on actual play experience!
ποΈ Architecture
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Claude ββββββ MCP Server ββββββ SQLite DB β
β Desktop β β (8 tools) β β (92k cards) β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β
βββββββββ΄ββββββββ
β Classificationβ
β Engine β
β (27archetypes)β
βββββββββββββββββ
Key Components:
- π§ Classification Engine: Pattern-based card analysis
- ποΈ Card Database: Optimized SQLite with Scryfall data
- β‘ Caching Layer: High-performance result storage
- π Performance Monitor: Real-time metrics and benchmarks
π¬ Advanced Features
Archetype-Aware Classification
Supports 27 Commander archetypes based on common strategies:
- Aggro & Tempo: Aggro, Infect, Voltron, Counters (+1/+1)
- Value & Control: Control, Mill, Spellslinger, Superfriends, Theft
- Synergy-Based: Affinity, Aristocrats, Blink, Enchantress, Landfall, Lifegain, Typal, Tokens/Go-Wide
- Combo & Engine: Cascade, Paradox, Graveyard, Wheel
- Political & Disruptive: Chaos, Group Hug, Group Slug, Stax
- Ramp & Big Mana: Ramp
- Tribal: Legends Matter
Multi-Role Optimization
Identifies cards serving multiple template categories:
π― Multi-Role Examples:
β’ Sol Ring: Ramp that goes in every deck
β’ Rhystic Study: Card advantage with political elements
β’ Beast Within: Removal that works on any permanent
β’ Cultivate: Ramp that also thins your deck
π§ͺ Development
Project Structure
commander-deck-assistant-mcp/
βββ π README.md # This file
βββ π CLAUDE.md # Development status
βββ π― IMPLEMENTATION_PLAN.md
βββ π docs/ # Documentation
β βββ api-documentation.md
β βββ reference/ # MTG rules & templates
βββ ποΈ database/ # Card data & setup
βββ π§ src/ # TypeScript source
β βββ server/ # MCP server
β βββ utils/ # Classification engine
β βββ data/ # Database layer
β βββ types/ # Type definitions
βββ ποΈ dist/ # Built JavaScript
βββ π§ͺ tests/ # Test suites
Building from Source
# Install dependencies
npm install
# Build TypeScript
npm run build
# Run tests (optional)
npm test
# Start MCP server (for testing)
npm start
π Development & CI/CD
Quality Assurance Pipeline: This project uses comprehensive CI/CD to prevent breaking changes on main branch.
Local Development Protection
# Set up pre-commit hooks (run once)
chmod +x setup-dev-tools.sh
./setup-dev-tools.sh
# Pre-commit hooks will automatically run on every commit:
# β
TypeScript compilation verification
# β
Build process validation
# β
Test suite execution
# β
File formatting checks
GitHub Actions CI/CD
Automated checks run on every push to main:
- π‘οΈ Security: Attribution verification, dependency audit
- π¨ Build: Multi-node testing (18.x, 20.x), TypeScript compilation
- π§ͺ Test: Testing, integration checks
- π Quality: Code formatting, merge conflict detection
Result: Cannot push broken code to main branch! π―
Contributing
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature
) - Commit changes (
git commit -m 'Add amazing feature'
) - Push to branch (
git push origin feature/amazing-feature
) - Open a Merge Request
See for detailed guidelines.
π Data Sources & Attribution
- Card Data: Scryfall API (used with permission)
- Deck Template: The Command Zone methodology
- MTG Rules: Wizards of the Coast Comprehensive Rules
- Classification: Original pattern-based analysis
Magic: The Gathering is a trademark of Wizards of the Coast LLC.
π€ Community
- π Issues: Found a bug? Report it
- π‘ Features: Have an idea? Suggest it
- π£οΈ Discussions: Join the conversation in Issues
- π§ Contact: Create an issue for questions
π Recognition
This project demonstrates:
- β MCP server implementation with multiple tools
- β Card classification using pattern matching
- β Database integration with SQLite
- β Commander format knowledge built-in
Useful for:
- π― Commander Players: Building better decks
- π€ MCP Developers: Learning server implementation
- π² Developers: Understanding card game data structures
π Roadmap
- Web Interface: Browser-based deck builder
- More Formats: Legacy, Modern, Pioneer support
- AI Recommendations: GPT-powered synergy suggestions
- Community Features: Deck sharing and rating
- Performance: Sub-millisecond classification times
π License
MIT License - see file for details.
Built with β€οΈ for the Commander community