# mtg-oracle

mtg-oracle is a Claude Code MCP server that supplies card lookups, comprehensive Magic: The Gathering rules, format legality checks, and deck analysis tools.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 6 repo stars
- Author: gregario
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/gregario/mtg-oracle
- Updated: 2026-05-02
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/mtg-oracle

## What it does

This server equips your assistant with local SQLite storage containing Scryfall card stats, Academy Ruins rules text, and Commander Spellbook combo data. It handles fuzzy card searches, price lookups across paper and digital formats, and legality checks for up to 50 cards at a time.

The package provides 14 tools covering plain-text or MTGO XML deck breakdowns, archetype staples, and synergy discovery. On its initial launch, it pulls card and rule datasets into `~/.mtg-oracle/` for offline processing. Running it requires Node.js 18 or higher.

## Requirements
- Needs: Node.js (commands run via npx)

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add mtg-oracle -- npx -y mtg-oracle
```

### Codex

**Platform CLI**
```bash
codex mcp add mtg-oracle -- npx -y mtg-oracle
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mtg-oracle": {
            "command": "npx",
            "args": [
                "-y",
                "mtg-oracle"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mtg-oracle": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "mtg-oracle"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add mtg-oracle npx -y mtg-oracle
```

## When to use it
- verify format legality for custom Magic decklists
- inspect mana curves and color distribution from MTGO XML files
- look up official rules and keyword definitions by section number
- discover Commander combos and synergies for specific color identities

## Example prompts
- Analyze the decklist in deck.txt and check its Modern format legality
- Find combos for Atraxa with Commander Spellbook interactions
- Look up rule 702.1 and summarize how the mechanic works

## Similar
- [MTG MCP Server](https://affpapa.org/en/nevibecode/mcp/mtg-mcp-server.md) — MCP server · ★ 23 repo stars
- [MTG Chinese Card Database - 大学院废墟(sbwsz.com)](https://affpapa.org/en/nevibecode/mcp/mtg-chinese-card-database-sbwszcom.md) — MCP server · 533 installs
- [iwantmymtg-mcp](https://affpapa.org/en/nevibecode/mcp/iwantmymtg-mcp.md) — MCP server · 746 installs
- [dnd-oracle](https://affpapa.org/en/nevibecode/mcp/dnd-oracle.md) — MCP server · ★ 8 repo stars
- [cli-developer](https://affpapa.org/en/nevibecode/skills/cli-developer.md) — skill · 5300 installs
- [Oracle Database](https://affpapa.org/en/nevibecode/mcp/oracle-database.md) — MCP server

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
