commander-deck-assistant-mcp

CarpioCarpio/commander-deck-assistant-mcp

3.2

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.

Tools
8
Resources
0
Prompts
0

🎯 Commander Deck Assistant MCP Server

MCP server that helps build Commander format decks using The Command Zone's deck building template

TypeScript Node.js MCP License: MIT

πŸš€ 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

  1. Clone & Install
git clone https://github.com/CarpioCarpio/commander-deck-assistant-mcp.git
cd commander-deck-assistant-mcp
npm install
  1. Setup Database
npm run setup

Downloads Scryfall data (~400MB) and initializes SQLite database

  1. Build the Server
npm run build
  1. 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"]
    }
  }
}
  1. 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

ToolPurposeExample Use
search_cardsFind cards by name/colorSearch removal in Boros colors
get_commandersList potential commandersFind all Simic commanders
analyze_commanderDeep commander analysisUnderstand Atraxa's potential
get_cards_by_categoryCards by template categoryGet all ramp options
classify_card_multi_categoryAdvanced card analysisHow versatile is Sol Ring?
recommend_cards_by_versatilityMulti-role optimizationFind cards serving 2+ roles
analyze_deck_optimizationFull deck analysisOptimize existing 100-card list
get_performance_statsSystem monitoringCheck classification performance

πŸ“š

🎯 The Science Behind It

Command Zone Template Methodology

Built on the proven deck building framework from The Command Zone podcast:

CategoryCardsPurpose
Lands38Reliable mana base
Ramp10Mana acceleration
Card Advantage12Card draw and value
Targeted Disruption12Spot removal
Mass Disruption6Board wipes
Plan30Win conditions
Total108β†’ 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

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Merge Request

See for detailed guidelines.

πŸ“œ Data Sources & Attribution

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