Metadata-Version: 2.4
Name: lorcana-mcp
Version: 0.1.0
Summary: MCP server for enriching Disney Lorcana TCG card collections from TCGPlayer exports
Project-URL: Homepage, https://github.com/IcaroBichir/lorcana-mcp
Project-URL: Issues, https://github.com/IcaroBichir/lorcana-mcp/issues
Project-URL: Changelog, https://github.com/IcaroBichir/lorcana-mcp/blob/main/CHANGELOG.md
Author-email: Icaro Bichir <icbichir1@gmail.com>
License: MIT License
        
        Copyright (c) 2026 Icaro Bichir
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: card-game,claude,disney,lorcana,mcp,tcg
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.11
Requires-Dist: click>=8.1.0
Requires-Dist: mcp[cli]>=1.0.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# lorcana-mcp

[![PyPI](https://img.shields.io/pypi/v/lorcana-mcp)](https://pypi.org/project/lorcana-mcp/)
[![Python](https://img.shields.io/pypi/pyversions/lorcana-mcp)](https://pypi.org/project/lorcana-mcp/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)

MCP server that connects Claude to Disney Lorcana card data. Give Claude your TCGPlayer collection export and it will enrich it with ink cost, stats, keywords, and abilities fetched from [LorcanaJSON](https://lorcanajson.org) and [lorcana-api.com](https://lorcana-api.com).

## What it does

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

| Tool          | What it does                                                                                                                                                 |
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `enrich_csv`  | Takes a raw TCGPlayer export and adds Ink, Cost, Type, Subtypes, STR/WIL/Lore, Inkable, Keywords, Abilities. Also outputs a dreamborn.ink-ready import file. |
| `lookup_card` | Look up any card by name — returns full stats and ability text.                                                                                              |
| `audit_csv`   | Compare an enriched collection CSV against live API data and report stale or wrong fields.                                                                   |

## Install

```bash
pip install lorcana-mcp
```

Or from source:

```bash
git clone https://github.com/IcaroBichir/lorcana-claude-tools
cd lorcana-claude-tools
pip install .
```

## Add to Claude

**Claude Code (CLI):**

```bash
claude mcp add lorcana -- lorcana-mcp serve
```

**Claude Desktop** — add to `claude_desktop_config.json`:

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

## Usage

Once added, just talk to Claude naturally:

> "Enrich my collection at /Users/me/Downloads/Lorcana_export.csv"

> "Look up Will o' the Wisp - Forest Spirit"

> "Audit my collection at /Users/me/lorcana/enriched_collection.csv and tell me what's wrong"

## Data sources

- **LorcanaJSON** (`lorcanajson.org`) — all sets including Set 12+
- **lorcana-api.com** — Sets 1–11 (preferred for those sets; better body text formatting)

Card data is cached locally for 24 hours (`~/.cache/lorcana-mcp/`). Force a refresh:

```bash
lorcana-mcp cache clear
```

## Supported sets

The First Chapter · Rise of the Floodborn · Into the Inklands · Ursula's Return · Shimmering Skies · Azurite Sea · Archazia's Island · Reign of Jafar · Fabled · Whispers in the Well · Winterspell · **Wilds Unknown** · Attack of the Vine! · Hyperia City

## TCGPlayer export format

Export your collection from [TCGPlayer](https://www.tcgplayer.com) → My Collection → Export. The raw export has columns like Product Name, Set Name, Number, Rarity, Condition, Printing, Add to Quantity. The enricher adds 10 card-data columns and also outputs a dreamborn.ink-compatible CSV.

> **Note:** Promo cards are skipped in the dreamborn output since they use internal promo numbers that don't match TCGPlayer's format. Add them manually via dreamborn.ink's card search.
