Lorcana MCP Playtest Platform
Enables AI agents to play Disney Lorcana TCG matches over MCP, with tools for card search, deck validation, match creation, state observation, legal actions, and moves. Supports AI-vs-AI play and a live spectator board.
README
Lorcana MCP Playtest Platform
A local platform for AI-vs-AI Disney Lorcana matches. AI players connect over the Model Context Protocol (Streamable HTTP) and play exclusively through JSON tool calls; humans watch a live visual spectator board in the browser.
@lorcana/engine— deterministic TypeScript rules engine + JSON effect DSL (turn structure, inkwell, quest/challenge, all keywords, songs, shift, locations, 20-lore win, deck-out, seeded replay).@lorcana/card-data— normalizes the official bulk dump (lorcana-api.com) into 2,487CardDefinitions and auto-generates DSL scripts for every card (seepackages/card-data/dist-data/coverage.jsonfor the translation-tier report).@lorcana/mcp-server— MCP server (SDK 1.30.0) at/mcp+ spectator REST/SSE API.@lorcana/ui— React spectator app (dark ink theme, live SSE updates, card art).@lorcana/bots— heuristic MCP client that plays both seats (MCP-compliance proof).
Quickstart
npm install # at repo root (requires a filesystem that supports symlinks)
npm run build # builds all packages (card-data → engine → mcp-server → bots → ui)
npm start # serves MCP + API + UI on http://localhost:8787
Run an AI-vs-AI match between two decklists (dreamborn/inktable text format):
npx tsx packages/bots/src/run-match.ts \
--server http://localhost:8787 \
--deckA "$(cat data/acceptance/deck-emerald-sapphire.txt)" \
--deckB "$(cat data/acceptance/deck-amber-emerald.txt)" \
--games 4 --seed 42 --verbose
Then open the printed spectatorUrl (or just http://localhost:8787) to watch live.
Connecting your own AI (MCP)
Point any MCP client at http://localhost:8787/mcp (Streamable HTTP transport).
Typical session:
lorcana_search_cards/lorcana_get_card— explore the card pool (real text + stats).lorcana_validate_deck→lorcana_import_deck— register a 60-card deck (4 Card Name - Subtitletext format; ≤2 inks, ≤4 copies).lorcana_create_match— returnsmatchId+ one seat token per player.- Loop:
lorcana_get_state(fog-of-war view for your seat) →lorcana_get_legal_actions(fully enumerated, ready-to-submit) →lorcana_play_action. Match ends at 20 lore / deck-out /lorcana_concede.
All tool errors use { ok:false, error:{ code, message } }.
State is persisted after every action (data/matches/*.json) — the server resumes
matches across restarts.
Card scripts & the effect DSL
Cards contain no code. Every card has a JSON script (dist-data/scripts.json) of
triggers / activated abilities / continuous effects over a small effect vocabulary
(DRAW, DEAL_DAMAGE, BANISH, ADD_MODIFIER, CHOICE, FOR_EACH, IF, …) with selector-based
targeting. Scripts were auto-generated from printed card text:
- full — every ability sentence translated (1,195 cards)
- partial — keywords + some abilities (428)
- vanilla — stats/keywords only (864; they still play correctly as stat cards)
To regenerate: npm run build-data -w @lorcana/card-data. To hand-improve a card,
edit its entry in scripts.json following packages/engine/src/effects/dsl.ts.
Known rules limitations
- ~32% of ability sentences are not yet translated (see
coverage.jsonhistogram); affected cards play with keywords/stats only. Sets 10–12 are ~72% sentence-matched; set 13 is not in the bulk dump yet. - Boost / put-under / cost reduction are modeled in the engine; remaining exotic triggers still map to the closest available trigger, and some unique effects (discard→under, play-from-under, deck-ordering) remain documented no-ops.
- Core format deck construction only (≤2 inks). Illumineer's Quest cards excluded.
- Bulk playtest datapoints:
run-match.ts --metrics out.jsonlwrites one JSON line per game (winner, turns, lore, eventCounts).
See packages/*/README.md for per-package contracts and deviation logs. SPEC.md is
the architecture source of truth.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。