card-forge-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| MCP_TOKEN | No | Bearer token used to authenticate MCP clients when running the server over Streamable HTTP. | |
| CARDFORGE_HOME | No | Root directory for the Card-Forge installation. | ~/.local/share/card-forge |
| CARDFORGE_JAVA | No | Java executable. | java |
| CARDFORGE_VERSION | No | Card-Forge version to use. | 2.0.16 |
| CARDFORGE_JAVA_OPTS | No | JVM flags. | -Xmx2g |
| CARDFORGE_BRIDGE_JAR | No | Path to forge-bridge.jar. | |
| CARDFORGE_AUTOINSTALL | No | Download the engine automatically if missing. | 1 |
| CARDFORGE_GAME_CLOCK_S | No | Seconds before declaring a draw. | 120 |
| CARDFORGE_JAVA_HEADLESS | No | Run without a display. | 1 |
| CARDFORGE_SIM_TIMEOUT_S | No | Timeout for the simulation process. | 3600 |
| CARDFORGE_BRIDGE_JAR_URL | No | URL from which to download the bridge JAR. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Engine de regras de Magic: The Gathering (Card-Forge/forge) rodando local.
Diferente de um catálogo de cartas, aqui a engine EXECUTA as regras: ela roda partidas de verdade (IA x IA), monta o tabuleiro, resolve a stack e aplica a identidade de cor.
Use forge_simulate_match para medir a performance de um deck (win rate contra
outro deck) e forge_simulate_tournament para uma mesa com vários decks.
IMPORTANTE — leia antes de reportar win rate: a IA do Forge é heurística, boa com Aggro e midrange, fraca com control e ruim com combo (documentação da própria engine, docs/AI.md). Um win rate medido contra a IA não é previsão de resultado contra um humano. Apresente sempre como "simulação da engine", nunca como "força do deck".
forge_deck_check confere legalidade (tamanho, singleton, banidos, identidade de
cor). O flag -f da engine escolhe a variante de jogo, não a lista de banidos —
a checagem de banidos é feita aqui, lendo os arquivos de formato do engine.
forge_card_script devolve o script real que a engine usa para implementar a carta
(é o comportamento real, não o texto Oracle).
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| logging | {} |
| prompts | {
"listChanged": true
} |
| resources | {
"subscribe": false,
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| forge_engine_statusB | Estado da engine Card-Forge: instalação, catálogo, formatos e perfis de IA. |
| forge_card_lookupB | Ficha de uma carta no catálogo da engine: implementada? tipos, mana, oracle. |
| forge_card_scriptC | O script real da carta: como a engine implementa o comportamento dela. |
| forge_deck_checkC | Checa a legalidade de um deck no formato pedido. |
| forge_deck_from_listC | Converte uma lista de texto no formato ".dck" que a engine lê. |
| forge_simulate_matchC | Simula N partidas IA x IA entre dois decks e mede a performance. |
| forge_simulate_tournamentB | Mesa com vários decks: round-robin (cada par se enfrenta N vezes). |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 7 tools
Each tool maps to a distinct operation: engine status, card lookup, card script, deck legality, deck conversion, match simulation, and tournament simulation. The only mild overlap is forge_card_lookup vs forge_card_script, both targeting a single card, but the descriptions clearly separate catalog metadata from engine implementation code.
All tools share the forge_ prefix and snake_case, making the family immediately recognizable. The internal ordering varies (card_lookup vs simulate_match, plus noun-only names like card_script and deck_from_list), but the pattern remains readable and predictable.
Seven tools is well within the sweet spot and each one covers a distinct capability of the Card-Forge workflow. Nothing feels redundant or padded.
The surface covers the core loop: inspect the engine, look up cards, validate and convert decks, then simulate matches and tournaments. Minor gaps exist, such as no card search/listing by criteria and no way to persist or edit a deck beyond converting a text list, but agents can work around these.