Skip to main content

MCP server for enriching Disney Lorcana TCG card collections from TCGPlayer exports

Project description

lorcana-mcp

PyPI Python License: MIT MCP Registry mcp.so

MCP server that connects Claude to Disney Lorcana card data. Export your collection from TCGPlayer, hand it to Claude, and get it fully enriched with ink cost, stats, keywords, abilities, and format legality — plus a ready-to-import file for dreamborn.ink.


Tools

Four tools are available in Claude once the server is running:

Tool What it does
enrich_csv Enriches a raw TCGPlayer export with Ink, Cost, Type, Subtypes, STR/WIL/Lore, Inkable, Keywords, and Abilities. Writes an enriched CSV and a dreamborn.ink-ready import file next to the input.
lookup_card Looks up any card by name. Returns full stats, ability text, format legality, and card image URL.
filter_collection Filters your collection to cards legal in a given format: core, infinity, core_zh, core_ja, or poorcana.
audit_csv Compares an enriched collection against live API data and reports any stale or wrong fields.

Listed on

Directory Link
MCP Registry (official) registry.modelcontextprotocol.io
mcp.so mcp.so/server/lorcana-mcp
PyPI pypi.org/project/lorcana-mcp

Install

pip install lorcana-mcp

Or from source:

git clone https://github.com/IcaroBichir/lorcana-mcp
cd lorcana-mcp
pip install .

Add to Claude

Claude Code (CLI)

claude mcp add lorcana -- lorcana-mcp serve

Claude Desktop

Find claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\) and add:

{
  "mcpServers": {
    "lorcana": {
      "command": "lorcana-mcp",
      "args": ["serve"]
    }
  }
}

Restart Claude Desktop after saving.

Cursor / other MCP clients

Any client that supports stdio MCP servers can use lorcana-mcp serve as the command.


Usage

Once the server is connected, just talk to Claude naturally. No slash commands needed.

Enrich a collection

Export your collection from TCGPlayer → My Collection → Export CSV, then:

"Enrich my collection at /Users/me/Downloads/Lorcana_063026.csv"

Claude will fetch card data from the APIs and write two files next to your input:

  • enriched_Lorcana_063026.csv — your collection with 10 new columns
  • dreamborn_Lorcana_063026.csv — ready to import at dreamborn.ink

On re-runs, pass the previous enriched file as a cache to skip already-seen cards:

"Enrich /Users/me/Downloads/Lorcana_new.csv using /Users/me/lorcana/enriched_Lorcana_old.csv as cache"

Look up a card

"Look up Mirage - Super Recruiter"

"What are the stats on Alma Madrigal - Heart of the Family?"

"Is Will o' the Wisp legal in Core?"

Returns: ink color, cost, type, subtypes, STR/WIL/Lore, inkable status, keywords, full ability text, format legality, and a card image URL.

Filter your collection by format

"Which of my cards are legal in Core Constructed?"

"Show me my Infinity-legal cards grouped by ink color"

"What Poorcana-legal cards do I have in Amber?"

Valid formats: core, infinity, core_zh, core_ja, poorcana

Poorcana filtering uses the Rarity column in your enriched CSV (Common + Uncommon only) — no API call needed.

Core/Infinity/regional legality comes from duels.ink, which tracks the current rotation for each region.

Audit an existing enriched file

"Audit my collection at /Users/me/lorcana/enriched_collection.csv"

Useful after a new set releases or if a card's data looks wrong. Compares every non-promo card against live API data and reports field-by-field discrepancies.


Enriched columns

The enricher adds these 10 columns to the raw TCGPlayer export:

Column Description
Ink Ink color(s) — dual-ink cards show both, e.g. Amber, Steel
Ink Cost Numeric cost to play (1–12)
Card Type Character / Action / Action - Song / Item / Location
Subtypes e.g. Storyborn, Hero, Toy
Strength ⚔ stat — blank for Actions, Items
Willpower 🛡 stat — blank for Actions, Items
Lore Points ◆ gained per quest — blank for Actions, Items
Inkable Yes / No
Keywords Comma-separated: Evasive, Shift 3, Singer 5, Resist +1, etc.
Abilities Full card text, pipe-separated lines

Data sources

Source Sets Used for
LorcanaJSON All sets (1–14+) Primary source for Set 12+; fallback for 1–11
lorcana-api.com Sets 1–11 Preferred for Sets 1–11 (richer body text)
duels.ink All sets Format legality, card images

Card data is cached locally for 24 hours at ~/.cache/lorcana-mcp/. Manage the cache with the CLI:

lorcana-mcp cache stats   # show entry count, expiry status, and file size
lorcana-mcp cache clear   # delete all cached responses (fresh fetch on next use)

Supported sets

Set Name
1 The First Chapter
2 Rise of the Floodborn
3 Into the Inklands
4 Ursula's Return
5 Shimmering Skies
6 Azurite Sea
7 Archazia's Island
8 Reign of Jafar
9 Fabled
10 Whispers in the Well
11 Winterspell
12 Wilds Unknown
13 Attack of the Vine!
14 Hyperia City

New sets are picked up automatically via LorcanaJSON as long as the set name is added to the internal mapping. Open an issue if a new set isn't resolving.


TCGPlayer export format

Go to TCGPlayerMy Account → My Collection → Export. The raw file has columns like Product Name, Set Name, Number, Rarity, Condition, Printing, and Add to Quantity (this is the real owned-quantity column — Total Quantity is always blank in exports).

Promo cards: skipped in the dreamborn output because dreamborn uses internal promo set numbers that don't match TCGPlayer's format. Add them manually via dreamborn.ink's card search after importing the rest.


CLI reference

lorcana-mcp --version
lorcana-mcp serve          Start the MCP server (stdio)
lorcana-mcp cache stats    Show cache info
lorcana-mcp cache clear    Clear cached API responses

Development

git clone https://github.com/IcaroBichir/lorcana-mcp
cd lorcana-mcp
python -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
pytest

74 tests, no network calls required.


License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lorcana_mcp-0.1.3.tar.gz (20.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lorcana_mcp-0.1.3-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file lorcana_mcp-0.1.3.tar.gz.

File metadata

  • Download URL: lorcana_mcp-0.1.3.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for lorcana_mcp-0.1.3.tar.gz
Algorithm Hash digest
SHA256 1e5c8c8805b7debf7b39a407609f4f0e65975e4b3aaf5990dff21be94b2d8f21
MD5 bbb3fa0dc1e4f5de0d16e2bea0291c08
BLAKE2b-256 382f42e3b1843b84b2a71343f1c298310fef228eda36c6b24cf72523e5711cb3

See more details on using hashes here.

File details

Details for the file lorcana_mcp-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: lorcana_mcp-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for lorcana_mcp-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 281e73fb208e7deac39e3bffbd7bc64a1455619a61bea4c589905669fc3f7210
MD5 1e7aff48378b6debac03a1351f338df4
BLAKE2b-256 36ae237de985291c53f9d9984a2487c5815c91dadf7418da8fac1eb15789d07c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page