Vizier Yu-Gi-Oh! MCP
MCP server for Yu-Gi-Oh! card data, providing cards, prices, banlists, rules, rulings, relations, and deck tools via a local SQLite database with semantic search.
README
Vizier Yu-Gi-Oh! MCP
A Model Context Protocol server for Yu-Gi-Oh! card data: cards, prices, printings, banlists (historical + cross-format), official rulings, comprehensive rules, card relations, and deck tools. Everything runs locally from a single SQLite database with embedded vector search — no network calls at query time.
Features
- Cards: lookup by exact id or fuzzy-matched name, keyword search with type/ATK filters, semantic (vector) search by effect description, archetype listing.
- Prices & printings: current market prices (cardmarket / tcgplayer / ebay / amazon), full printing history with rarities and prices.
- Banlists: snapshots for
tcg,ocg,ocg-ae,ocg-cn,master-duel,rush,genesys,ocg-genesys,goat,edison; per-card status across all formats, historical diffs between snapshots. - Rules & rulings: semantic search over the official Comprehensive Rulebook (380 sections) and over 2,650 official OCG rulings; per-card ruling lookup with live-fetch fallback.
- Relations: search/summon/destroy/target relations mined from card text, Fusion/Synchro/Xyz/Link/Ritual material requirements, reverse lookups, archetype support detection.
- Decks: validate a decklist against a format's banlist, analyze main/extra composition and archetype mix.
Requirements
- Python 3.11+
- ~1 GB disk for the embedding model download; the built database is ~75 MB
- ~2 GB RAM during the build (embedding model); much less at query time
The database path and data directory can be overridden with VIZIER_DB_PATH and VIZIER_DATA_DIR environment variables (the default is <package root>/data/).
Setup
python -m venv .venv
source .venv/bin/activate
pip install -e .
Building the database
The build ingests cached API data (data/cache/) and the reference projects (ref/, policy/) into data/vizier.db. No network is required unless you pass --fetch.
# full build including embeddings (slow: ~15-20 min CPU for 17.6k vectors)
python scripts/build_db.py
# faster variants
python scripts/build_db.py --no-embed # skip vector embeddings (no semantic search)
python scripts/build_db.py --skip-cards # skip card ingestion, re-embed only
python scripts/build_db.py --fetch # download fresh API payloads first
--fetch downloads the card dump from YGOPRODeck. Note: the live API currently returns HTTP 403, so the cached dump in data/cache/ is authoritative. If the API is unreachable the build uses the cache.
Running the server
python -m vizier_mcp
The server speaks MCP over stdio. There is also a console script:
vizier-mcp
Client configuration
Point any MCP client at the installed command. The server name is vizier-yugioh.
Claude Desktop / Claude Code
{
"mcpServers": {
"vizier-yugioh": {
"command": "/path/to/.venv/bin/python",
"args": ["-m", "vizier_mcp"]
}
}
}
Generic clients
{
"mcpServers": {
"vizier-yugioh": {
"command": "/path/to/.venv/bin/vizier-mcp",
"args": []
}
}
}
Use absolute paths to the venv. The DB path is resolved relative to the package location (or VIZIER_DB_PATH), not the CWD.
Tools
| Tool | Description |
|---|---|
get_card |
One card by name (fuzzy) or id: type line, stats, effect, ban status per format, prices |
search_cards |
Keyword search over names/types/archetypes/effect text with filter_type and min_atk filters |
semantic_card_search |
Vector search by natural-language description of a card's function |
get_archetype |
All cards of an archetype / series |
get_card_prices |
Market prices (cardmarket/tcgplayer/ebay/amazon) + cheapest printing |
get_printings |
Full printing history: sets, rarities, editions, prices |
get_banlist |
Full banlist snapshot for a format and date |
check_card_banlist |
One card's ban status across all formats + history |
banlist_history |
Dates of available banlist snapshots for a format |
compare_banlists |
Diff two snapshots: cards moved between Forbidden/Limited/Semi-Limited |
list_banlist_formats |
Which formats have banlist data |
search_rules |
Semantic search of the official Comprehensive Rulebook |
get_rulings |
Official OCG rulings (Q&A) for one card, live-fetch fallback |
search_rulings |
Semantic search over the rulings corpus |
get_related_cards |
Cards related by effect: searches, summons, destroys, targets, materials |
find_search_targets |
What a card can search/add from deck or grave |
find_summon_targets |
What a card can summon / Special Summon |
find_cards_that_search |
Reverse: which cards search this card |
find_cards_that_summon |
Reverse: which cards summon this card |
get_card_materials |
Fusion/Synchro/Xyz/Link/Ritual material requirements |
find_cards_using_material |
Reverse: monsters that use this card as material |
find_archetype_support |
Support cards whose text names an archetype |
combo_guide |
The built-in combo creation playbook: exact breadth-first process for building combos |
card_combo_profile |
Exhaustive combo profile of one card: summoning, per-effect kind/OPT/actions, locks, relations, materials, material-for |
extra_deck_options |
Every Fusion/Synchro/Xyz/Link/Ritual summon reachable from the current board (best-effort material checks) |
board_options |
EVERY legal next play from the current board: all extra-deck summons, hand plays, search/add effects with ranked targets, pendulum range, active/pending locks. Archetype-agnostic |
line_search |
Bounded breadth-first search over board states: complete multi-step lines from the current board to a goal (field_levels, field_count, no_locks, reach_field, reach_hand) |
validate_deck |
Validate a decklist against a format's banlist |
analyze_deck |
Deck breakdown: main/extra counts, archetype mix, per-card details |
mcp_guide |
Overview of every tool and resource |
database_status |
What data is loaded: counts, build time, formats |
filter_type examples: monster, spell, trap, effect, fusion, link, pendulum, tuner, normal monster, normal spell, quick-play, counter trap, equip, field, ritual. Multi-word filters match the exact subtype.
Combo creation
The server ships a built-in combo-creation playbook that turns line-building into a deterministic breadth-first process: enumerate every possible action, expand, deepen, prune, record, repeat.
combo_guide()— load the playbook (also available as thecomboprompt). It defines a combo-state JSON schema, the 6-step protocol, per-card enumeration checklists, tool routing, hard/soft OPT discipline, lock detection, and termination criteria.card_combo_profile()— for any card you consider: summoning options (normal/tribute/pendulum/self-special), every effect with activation kind + once-per-turn status + action verbs, lock/restriction sentences, its full relation graph (searches/summons/destroys/targets/materials), materials it requires, and monsters it can be material for (named + archetype-wide).board_options()— one call that returns EVERY legal next play from the current board, archetype-agnostic: all extra-deck summons (the full ~2,300-monster pool, not just the deck's archetype), every hand monster's plays (normal summon / self-special / pendulum scale), every search/add effect with its targets (archetype targets list top-ranked members), the pendulum summon range, and active/pending locks. This is the anti-tunnel-vision tool: the model must not restrict itself to in-archetype candidates.line_search()— server-side bounded breadth-first search from the current board to a goal (field_levels,field_count,no_locks,reach_field,reach_hand). Returns complete multi-step lines, so the model plans several steps deep instead of one move at a time.extra_deck_options()— paste your current field (plus hand/graveyard/extra deck and format) and get every Fusion/Synchro/Xyz/Link/Ritual monster whose material requirement is satisfiable, with the exact material reasoning for each candidate.
Example — two Level 4 D/D monsters on field:
extra_deck_options(field=["D/D Savant Copernicus", "D/D Ark"], summon_types="xyz")
→ options include D/D/D Wise King Solomon ("2 Level 4 D/D monsters")
Best-effort material checks are validated against the full relation graph; always confirm borderline candidates with get_card_materials before finalizing a line.
Resources
| URI | Description |
|---|---|
card://{name_or_id} |
Compact card summary as text |
banlist://{format} |
Latest banlist snapshot for a format as text |
rules://{query} |
Top rulebook sections for a question (semantic) |
URL-encode resource parameters containing spaces (rules://damage%20step).
Database layout
data/vizier.db — SQLite with sqlite-vec extension. Key tables:
cards— one row per card with computed type flags (is_monster,is_quickplay_spell, ...)card_sets,card_prices— printings and market pricescard_ban_status,banlist_history— current status per format + historical snapshotsrelations— card-to-card effect relations with typesrulebook_chunks,rulings— rules and rulings textcard_vec,rule_vec,ruling_vec— embedding tables for semantic searchmeta— build timestamp and counts
Data sources
- Cards / prices / banlists: YGOPRODeck bulk API (cached in
data/cache/) - Rules: official Comprehensive Rulebook (
ref/yugioh_comprehensive_rulebook/) - Rulings: official OCG rulings Q&A list + YGOPEDIA fallback
- Policy: tournament policy documents (
policy/)
Tests
python -m pytest tests/ -q
Runs 32 smoke tests against an in-process server client, covering every tool and resource.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。