TCG MCP

io.github.seanlok由 GitHub 帳號 seanlok 發布v0.4.0更新於 Oct 24, 2026

Pokemon TCG MCP server: PSA grading, collection management, and multi-provider pricing.

已驗證STDIO僅桌面金融資料與分析

概覽

AI 產生的概覽

一個在本機執行的寶可夢集換式卡牌 MCP 伺服器,讓助理查詢 PSA 鑑定卡、管理卡牌收藏、追蹤觀察清單並查詢市場價格。

可以做什麼
查詢 PSA 證書、取得正反面圖片並隨時間記錄鑑定數量快照,還能在一次呼叫中查詢證書並登記為已擁有(CGC/BGS 僅為佔位)。將裸卡、鑑定卡或密封產品加入本機收藏,列出並篩選、更新成本基礎、標記售出或刪除,並取得成本彙總或即時估值。搜尋價格資料來源,取得含各版本或各鑑定等級的完整報價,批次快照已關聯卡牌並查詢歷史價格序列。管理帶目標買入價、投資理由與持有期間的觀察清單,並以原因關閉項目。列出已啟用的鑑定與價格資料來源及其所需環境變數。
適用情境
適合收藏者與賣家讓助理查詢 PSA 證書資訊、維護含成本基礎的個人卡牌庫存、關注目標買入價,並在聊天用戶端內追蹤裸卡與鑑定卡的市場價格。
執行需求
透過 stdio 在本機執行;需要 Python 3.10 或更新版本(建議 3.13),可用 uvx、pipx 或 pip 安裝,並需要 Claude Desktop、Claude Code 或 Cursor 等 MCP 用戶端。選用憑證:PSA_API_TOKEN 用於 PSA 工具,POKEMONTCG_API_KEY 用於提高速率上限,PRICECHARTING_TOKEN(付費)用於鑑定卡定價。TCG_DB_PATH 指定 SQLite 檔案位置,預設為 ~/.tcg-mcp/tcg.db。需要連線外部 API 的網路存取。
安裝前請注意
收藏、觀察清單與快照資料會寫入本機 SQLite 檔案,刪除工具可軟刪除(標記售出)或硬刪除項目。卡牌資訊與查詢會傳送給第三方 API(PSA、Pokemon TCG API、PriceCharting),各自受其服務條款規範。PRICECHARTING_TOKEN 需要付費訂閱。PSA 免費版速率限制未公開,且 PSA 圖片僅存在於 2021 年 10 月之後鑑定的卡牌。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 TCG MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

tcg-mcp

A Pokemon TCG MCP server. Looks up graded cards (PSA today, CGC/BGS stubbed), manages your owned collection in a local SQLite DB, queries pricing providers (Pokemon TCG API + PriceCharting), tracks a watchlist with target prices, and snapshots PSA pop counts so you can see trends over time.

[PyPI] [Python] [Downloads] [CI] [License: MIT]

tcg-mcp is a Model Context Protocol server. Install it once, wire it into Claude Desktop / Claude Code / Cursor / any MCP client, and your assistant gains 25 tools for working with PSA cert data, your personal collection, and live market prices.


What it does — 25 tools, namespaced

PSA grading (tcg_psa_*) — cert lookup, front/back images, snapshot pop data over time, plus a workflow tool that looks up a cert and records it as owned in one call.

CGC / BGS (tcg_cgc_*, tcg_bgs_*) — stubs in v0.2; no public API exists for either grader. Listed for routing parity; will route cleanly if either grader publishes an API.

Collection (tcg_collection_*) — add raw or graded cards (or sealed products: ETBs, booster boxes, UPCs, tins), list with filters, update cost basis, soft-delete (mark sold) or hard-delete, attach a card to a pricing listing, get a cost-basis summary or a live market valuation that joins against the most recent pricing snapshots.

Pricing (tcg_pricing_*) — search a provider, get a full price quote (top-level market/low/high plus per-variant breakdown for Pokemon TCG API, plus per-grade levels for PriceCharting), persist snapshots into the local DB, bulk-snapshot every attached card in one call with per-provider rate-limit awareness, and query historical snapshots as a time series for trend analysis.

Watchlist (tcg_watchlist_*) — add target buy prices with thesis text, list by horizon (flip / hold / sealed), update, and close with a reason (bought / thesis_invalidated / manual).

Meta (tcg_list_providers) — discovery tool that shows which grading + pricing providers are enabled, what env var each needs, and what tools are in the namespace.

For the full tool list run tcg_list_providers after install or read the architecture doc.


Prerequisites

  1. Python 3.10 or newer (3.13 recommended).
  2. An MCP client — Claude Desktop, Claude Code, Cursor, Continue, etc.
  3. (Optional, for PSA tools only) A PSA Public API token — free, sign up at psacard.com/publicapi.

The server works without any tokens — Pokemon TCG API queries, collection, and watchlist tools all function on a fresh install with zero credentials.


Install

Option A — uvx (recommended, zero install)

bash
# install uv if you don't have itcurl -LsSf https://astral.sh/uv/install.sh | sh
# run the server (auto-installs the package on first use)uvx tcg-mcp --help

Option B — pipx

bash
pipx install tcg-mcptcg-mcp --help

Option C — pip

bash
python3 -m pip install tcg-mcp

Option D — from source (for contributors)

bash
git clone https://github.com/seanlok/tcg-mcp.gitcd tcg-mcppython3 -m venv .venvsource .venv/bin/activatepip install -e ".[dev]"pytest        # run the test suite

Configure

Copy .env.example to .env and fill in any tokens you have:

bash
cp .env.example .env$EDITOR .env

Or set the env vars however your client supports it (most clients let you specify env per MCP server in the config).

Env varRequired forNotes
PSA_API_TOKENPSA toolsGet one — free
POKEMONTCG_API_KEYHigher Pokemon TCG API rate limit (optional)Get one — free
PRICECHARTING_TOKENPriceCharting toolsPaid subscription required
TCG_DB_PATHLocal DB locationDefault ~/.tcg-mcp/tcg.db

Wire it into your MCP client

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS), %APPDATA%\Claude\claude_desktop_config.json (Windows), or ~/.config/Claude/claude_desktop_config.json (Linux):

json
{  "mcpServers": {    "tcg-mcp": {      "command": "uvx",      "args": ["tcg-mcp"],      "env": {        "PSA_API_TOKEN": "your-token-here",        "TCG_DB_PATH": "~/Documents/tcg-mcp.db"      }    }  }}

Quit Claude Desktop fully (⌘Q on macOS — closing the window isn't enough) and relaunch.

Claude Code

bash
claude mcp add tcg-mcp -- uvx tcg-mcp

Then export the tokens you have in the shell that runs claude.

Cursor / Continue / etc.

Same shape — point the client at:

command: uvxargs:    ["tcg-mcp"]env:     PSA_API_TOKEN=...    # optional

Smoke-test it

After wiring up the client, ask it:

"Use tcg-mcp to list providers."

You should see pokemontcg enabled, plus psa enabled if your token is set, and stubs for the others.

Then try a real lookup:

"Search Pokemon TCG API for Charizard ex from Obsidian Flames."

"Add a 1999 Pokemon Base Set Charizard #4 (raw) to my collection — paid $250 on 2026-04-15."

"Add Charizard ex Surging Sparks to my watchlist with a target buy price of $180."

"What's my collection cost basis?"


Architecture, briefly

+----------------------+|     MCP client       |  Claude Desktop, Cursor, etc.+----------+-----------+           | stdio (JSON-RPC)+----------v-----------+|     server.py        |  FastMCP — tool registration, validation+----------+-----------+           |   +-------+-------+----------------+   |               |                |+--v--+         +--v--+        +----v----+| psa |  ...    |pricing|      | storage |  SQLite — collection,+--+--+         +--+----+      +----+----+  watchlist, pop trends,   | httpx         | httpx          |       pricing snapshots+--v---------------v----+      +----v----+|  PSA / Pokemon TCG    |      | tcg.db  ||  API / PriceCharting  |      +---------++-----------------------+

Provider abstractions (providers/base.py, pricing/base.py) make adding a new grader or pricing source a single-file change. See docs/adding-a-provider.md.


Local SQLite database

All your personal data — collection, watchlist, pricing snapshots, pop snapshots — lives in a single SQLite file. Default location is ~/.tcg-mcp/tcg.db. Point TCG_DB_PATH at any path you prefer.

The file format is plain SQLite, so you can inspect or back up the data directly:

bash
sqlite3 ~/.tcg-mcp/tcg.db.tablesSELECT subject, grade, acquisition_price FROM owned_cards WHERE status='owned';

Schema is in src/tcg_mcp/storage/schema.sql. Migrations are forward-only and idempotent (safe to run on every startup).


Known limits

  • PSA images only exist for cards graded after October 2021. Older slabs return an empty image list — that's the upstream API, not a bug.
  • PSA's Brand field is the closest thing to a clean "set name" in their schema. We surface it as set_name; for finer-grained set parsing, reach into the raw payload.
  • CGC / BGS providers are stubs in v0.2. They're listed for discovery but raise NotSupportedError if called. Implementation depends on either grader publishing a public API or an explicit decision to support polite scraping.
  • Rate limits on the PSA free tier aren't publicly documented. If you see "PSA API rate limit exceeded", wait or upgrade your plan.
  • PriceCharting is paid-only. Without a PRICECHARTING_TOKEN the provider is registered as disabled and graded-card prices aren't available — but Pokemon TCG API still gives you raw market prices.

Roadmap

Standing constraint: every milestone below has a free path as the default. Paid providers (GemRate, eBay Marketplace Insights, etc.) stay optional add-ons that activate only when their key is configured.

  • ✅ v0.3 — shipped: tcg_pricing_snapshot_collection, tcg_pricing_get_history, rounded per-item valuation, clearer PSA 429 error message, CHANGELOG.md.
  • ✅ v0.4 — shipped: Catalog tools (tcg_catalog_*) backed by Pokemon TCG API, tcg_collection_set_completion with watchlist intersection, richer tcg_collection_search, smart-routed tcg_pricing_get_card.
  • v0.5 — CGC support (free path: polite scraping; optional paid GemRate).
  • v0.6 — BGS support (free path: polite scraping; optional paid GemRate).
  • v0.7 — eBay sold comps (free path: eBay Browse API + scraping; optional paid Marketplace Insights API).

See CHANGELOG.md for the full version history.


Contributing

Contributions welcome. To add a new grading or pricing provider, see docs/adding-a-provider.md. The contract is intentionally small: implement a Protocol method, register it conditionally based on credentials, write a mock-httpx test.

bash
# Run tests + lint locallypytestruff check .

Disclaimers

This project is independent. It is not affiliated with PSA, CGC, Beckett, The Pokemon Company, Nintendo, TCGPlayer, Cardmarket, PriceCharting, or any other organization. Each external API call is subject to that provider's Terms of Service.


License

MIT — see LICENSE.


Sources / further reading

來源:README.md,提交 8b62789

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.4.0最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分