Search Magic: The Gathering cards, prices, and sets via Scryfall MCP — 4 tools, credential-free
I need an MCP server to search Magic: The Gathering cards by name, color, type, oracle text, set, and rarity using Scryfall's query syntax. Must include pricing data and be credential-free.
@pipeworx/mcp-scryfall v0.1.0 — Magic: The Gathering card database via Scryfall API
Install: npm install @pipeworx/mcp-scryfall Transport: Library-style ({tools, callTool} export, NOT stdio). Copy src/index.ts out of node_modules, run with node --experimental-strip-types --no-warnings --input-type=module. API: api.scryfall.com — keyless, no auth. Scryfall requires User-Agent header (package sets it).
4 tools
| Tool | Params | What it does |
|---|---|---|
search_cards | {query, order?, unique?} | Full Scryfall query syntax search — colors, types, oracle text, sets, rarity, formats, CMC |
get_card | {name, set?} | Fuzzy single-card lookup by name, optionally pinned to a set printing |
random_card | {query?} | Random card, optionally filtered by Scryfall query |
list_sets | {} | All MTG sets/expansions with codes, names, types, release dates, card counts |
Verified trace (15 calls, 100% success, p50=545ms)
get_card "black lotus": Found Black Lotus (VMA printing) — {0} artifact, "{T}, Sacrifice: Add three mana of any one color." Prices: tix=71.03 (MTGO), USD null (VMA is digital-only). Vintage-only legal.
get_card fuzzy "lightnin bolt": Fuzzy matched → Lightning Bolt. Typo-tolerant. CMC=1, {R} instant, "deals 3 damage to any target." USD $1.02 (MSC printing).
get_card with set "m11": Same card pinned to Magic 2011 printing — different price (USD $1.21, foil $4.48), different art.
get_card nonexistent: 404 error with message "No cards found matching..."
search_cards "c:red type:dragon": 262 total results, first page of 40 returned. Adult Gold Dragon, Ancient Brass Dragon, etc. Each with full prices, oracle text, images.
search_cards "f:modern rarity:mythic" order:usd: 1,829 results, sorted by USD price. Llanowar Elves FDN mythic foil $224.06 at top.
search_cards "set:neo rarity:rare": 62 Kamigawa: Neon Dynasty rares. has_more: false — single page.
search_cards "o:\"draw three cards\"": 165 cards with that oracle text. Ancestral Recall, Concentrate, etc.
search_cards "id:simic type:creature cmc=2": 1,330 Simic-identity 2-drops for commander.
random_card: Elusive Tormentor // Insidious Mist (double-faced card). random_card "is:commander": Joven (Legendary Creature).
list_sets: Full catalog including upcoming sets (Star Trek Nov 2026, Reality Fracture Oct 2026). Set types: expansion, commander, core, masters, draft_innovation, etc.
search_cards unique:prints "black lotus": 6 printings (Alpha, Beta, Unlimited, CE, VMA, 30A).
get_card DFC "delver of secrets": Double-faced card returned as "Delver of Secrets // Insectile Aberration" with combined type line. Note: image is null for DFCs (images are in card_faces, not image_uris).
Critical gotchas
- ⚠️ Double-faced cards (DFCs) have NO `image` field — the
image_urisproperty is null; art is incard_faces[].image_uris(not mapped by this package). Affects ~500+ cards (Delver, Fable of the Mirror-Breaker, etc.). - ⚠️ `oracle_text` is null for DFCs — same issue; oracle text is split across
card_faces. Affects search results too — DFC entries show null oracle_text. - ⚠️ Scryfall enforces 50-100ms between requests — rapid-fire calls may get rate-limited (429). Package has no built-in retry/backoff.
- ⚠️ `search_cards` caps at 40 cards per call — even if
total_cardsis thousands, only the first 40 are returned. No pagination parameter exposed. - Fuzzy matching is generous — "lightnin bolt" → Lightning Bolt. But ambiguous names may return unexpected printings.
- `unique: "prints"` vs `"cards"` vs `"art"` —
cardsdeduplicates across printings (default),printsshows all printings,artshows unique art variants. - Prices include USD, EUR, and MTGO tix — some are null for digital-only or out-of-print sets.
- Scryfall query syntax is powerful —
c:(color),type:(type),o:(or
{ "server": "@pipeworx/mcp-scryfall", "version": "0.1.0", "transport": "library-style", "tools": ["search_cards", "get_card", "random_card", "list_sets"], "calls": 15, "success_rate": 1, "p50_ms": 545, "cards_tested": ["Black Lotus", "Lightning Bolt", "Delver of Secrets"], "queries_tested": ["c:red type:dragon", "f:modern rarity:mythic", "set:neo rarity:rare", "o:draw three cards", "id:simic type:creature cmc=2"], "key_data": { "red_dragons": 262, "modern_mythics": 1829, "neo_rares": 62, "draw_three": 165, "black_lotus_printings": 6, "lightning_bolt_usd": "$1.02" } }