Iwantmymtg Mcp

io.github.matthewdtowles由 GitHub 帳號 matthewdtowles 發布v0.7.5更新於 Nov 6, 2026

Query Magic: The Gathering cards, sets, and prices and manage your I Want My MTG collection.

概覽

AI 產生的概覽

查詢魔法風雲會卡牌、系列、密封產品與價格,並管理 I Want My MTG 收藏、購買清單、交易紀錄與投資組合。

可以做什麼
  • 搜尋與查詢卡牌、版本及系列,含價格與 30 天價格歷史
  • 列出系列密封產品與系列價格歷史,並依版本比較收購報價
  • 讀取與修改使用者的卡牌及密封產品庫存,支援 CSV 匯入匯出
  • 管理購買清單(想要清單),記錄、修改或刪除買入/賣出交易
  • 查看投資組合總值、成本基礎、已實現收益、現金流、表現與組成
  • 估算整套收藏的出售市值,並比較現金與店家購物金
適用情境
適合想用對話方式查詢魔法風雲會卡牌與系列價格,或已在 I Want My MTG 維護收藏、希望由助理更新庫存、記錄交易、檢視投資組合表現的玩家與收藏者。
執行需求
以 Node.js 套件形式在本機執行(需 Node 20 以上),透過 npx 或全域 npm 安裝後在 MCP 用戶端設定。唯讀的卡牌、系列與價格工具不需帳號;收藏相關工具需要 IWMM_API_KEY 環境變數,須在 I Want My MTG 帳號中建立。可用 IWMM_BASE_URL 覆寫 API 位址。需要能連線至 IWMM API 的網路。
安裝前請注意
IWMM_API_KEY 是個人憑證,可存取使用者的收藏與交易資料,請勿放入共用設定。許多工具會寫入資料:新增、修改或移除庫存與購買清單項目、記錄交易(預設同時調整庫存)、刪除交易。部分功能為 Premium 專屬,免費版會回傳錯誤。卡牌、價格與收藏資料會傳送至 IWMM 服務。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

iwantmymtg-mcp

[npm version] [License: MIT] [LightNow]

An MCP server for I Want My MTG. Exposes IWMM's API as tools so Claude Desktop, Claude Code, Cursor, and other MCP clients can search Magic: The Gathering cards/sets and manage a user's collection conversationally.

Published on npm, the MCP Registry, and Smithery. Coverage expands to match the API; see docs/TOOLS.md for the full, always-current tool list.

[Demo: Claude Code answering four collection queries via the iwmm MCP server]

What you can do

  • Anonymous (no key): search cards, look up a card by set+number, get current prices and 30-day price history, get a card's buylist (sell-to-vendor) offers, list sets and their cards, list sealed products.
  • Authenticated (with an IWMM API key): manage your inventory and transactions; build and manage decks (create, import from a decklist, edit cards, add the cards you're missing to your buy-list); view portfolio summaries, history, performance, cash flow, realized gains, and breakdowns (including by color, with per-slice drill-down); manage price alerts and notifications.
  • Sell tools (with a key): see your collection's market sell value (best buylist offer per card, grouped by vendor), manage a buy-list (want-list), and get a cash-vs-store-credit recommendation for selling toward your buy list.

See the project roadmap for what's next.

Install

Requires Node 20+.

bash
npx iwantmymtg-mcp

Or install globally if you prefer:

bash
npm install -g iwantmymtg-mcpiwantmymtg-mcp

Claude Desktop

Add to claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json; Windows: %APPDATA%\Claude\claude_desktop_config.json):

json
{  "mcpServers": {    "iwmm": {      "command": "npx",      "args": ["-y", "iwantmymtg-mcp"],      "env": {        "IWMM_API_KEY": "iwm_live_..."      }    }  }}

IWMM_API_KEY is optional - read-only tools work without it. Create a key at https://iwantmymtg.net/user/api-keys.

Claude Code

Add to .mcp.json in your project (or ~/.claude/.mcp.json globally):

json
{  "mcpServers": {    "iwmm": {      "command": "npx",      "args": ["-y", "iwantmymtg-mcp"],      "env": { "IWMM_API_KEY": "iwm_live_..." }    }  }}

Cursor

Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json in your project:

json
{  "mcpServers": {    "iwmm": {      "command": "npx",      "args": ["-y", "iwantmymtg-mcp"],      "env": { "IWMM_API_KEY": "iwm_live_..." }    }  }}

After saving, restart Cursor and confirm iwmm appears under Settings -> Features -> MCP Servers.

Example prompts

  • "Search for Lightning Bolt printings and show me the cheapest one."
  • "What's the price history of Bloodbraid Elf from Modern Horizons 3?"
  • "Add 4 copies of Lightning Bolt LEA to my inventory."
  • "What sealed products are available for MH3?"
  • "What's my collection worth to sell right now, and which vendor pays most?"
  • "Add these cards to my buy list, then tell me whether cash or store credit is the better deal."

See examples/ for walkthroughs of common flows, and docs/TOOLS.md for the full tool reference.

Configuration

Env varDefaultPurpose
IWMM_API_KEY(unset)Personal API key. Required only for authenticated tools.
IWMM_BASE_URLhttps://iwantmymtg.netOverride for self-hosted or local-dev IWMM instances.

Local development

bash
npm installnpm run buildnode dist/index.js

Or with tsx for live reload:

bash
npm installnpx tsx src/index.ts

License

This project is licensed under the MIT License — see the LICENSE file for details.

來源:README.md,提交 117fcbf

工具

60

search_cards

Search Magic: The Gathering cards by name (substring), set code, rarity, type, or format legality. Returns a paginated list with prices and basic metadata. Use this for catalog lookups; for a specific printing prefer get_card with set+number.

輸入參數qpagetypelimitformatraritysetCodelegality

get_card

Look up a specific card printing by set code and collector number. Returns full card detail including current prices, rarity, type, and flavor name. For broader catalog search use search_cards.

輸入參數setCode必填setNumber必填

get_card_prices

Get current normal and foil prices for a specific card printing.

輸入參數setCode必填setNumber必填

get_card_price_history

Get the 30-day price history for a card printing (normal + foil). Older data is retained on a weekly/monthly cadence beyond 30 days.

輸入參數setCode必填setNumber必填

get_card_printings

List every printing of the card at this set code and collector number, most valuable first. Use this to compare what the same card costs across sets, or to find a cheaper printing. Prefer it over search_cards for that: search_cards matches names by substring, so it also returns unrelated cards whose names merely contain the term. The addressed printing is included in the results.

輸入參數pagelimitsetCode必填setNumber必填

search_sets

List Magic: The Gathering sets, optionally paginated. Returns set code, name, release date, type, and aggregate prices.

輸入參數pagelimit

get_set

Get detail for a single set by code (e.g. 'lea', 'mh3').

輸入參數code必填

list_set_cards

List all cards in a set, paginated. Supports the same filters as search_cards (rarity, type, format, legality).

輸入參數code必填pagetypelimitformatraritylegality

get_sealed_products

List sealed products (booster boxes, bundles, commander decks, etc.) for a set. Each entry includes a TCGPlayer purchase URL.

輸入參數code必填

get_sealed_product

Get detail for a single sealed product by its UUID, including current pricing and a TCGPlayer purchase URL. List a set's sealed products with get_sealed_products.

輸入參數uuid必填

get_set_price_history

Get the price history for a whole set by set code - the set's aggregate value over time. Optionally limit the window with days. For a single card's history use get_card_price_history.

輸入參數code必填days

get_card_buylist

Get current buylist (sell-to-vendor) offers for a card printing, by set code and collector number. Returns offers grouped by finish (normal/foil/etched), best first, with the highest offer per finish marked. NM condition only. Use get_card_prices for retail (buy) prices instead.

輸入參數setCode必填setNumber必填

get_market_sell_value

Market sell value of the authenticated user's whole inventory: matches every owned card against current buylist offers, picks the best offer per item (capped by the vendor's buy quantity), groups by vendor, and totals it. Returns vendor groups with per-item payouts plus overall totals. Requires IWMM_API_KEY.

無需輸入參數。

get_cash_vs_credit

Cash vs. store-credit recommendation for the authenticated user. Compares taking the buylist cash payout for their inventory against taking store credit (worth a bonus %) and spending it on their buy list. Returns the recommendation, the credit advantage, out-of-pocket each way, and the priced buy-list lines. Requires IWMM_API_KEY.

輸入參數bonus

list_buy_list

List the authenticated user's buy-list (want-list): the cards they want to acquire, with quantities, finish, and current prices. Requires IWMM_API_KEY.

無需輸入參數。

add_buy_list

Add a card to the authenticated user's buy-list, incrementing the quantity (creates the row if absent). This is a real write. Use update_buy_list to set an absolute quantity or remove_buy_list to delete a row. Requires IWMM_API_KEY.

輸入參數cardId必填isFoilquantity

update_buy_list

Set the absolute quantity for a buy-list card+finish (not a delta). A quantity of 0 removes the row. Use add_buy_list to increment instead. Requires IWMM_API_KEY.

輸入參數cardId必填isFoilquantity必填

remove_buy_list

Remove a card+finish row from the authenticated user's buy-list entirely. Requires IWMM_API_KEY.

輸入參數cardId必填isFoil

import_buy_list

Bulk-add cards to the authenticated user's buy-list from pasted CSV text. Native format header: name,set_code,number[,quantity][,foil]. External exports (Moxfield, Archidekt, Deckbox, TCGPlayer) are auto-detected. Returns counts and per-row errors. Requires IWMM_API_KEY.

輸入參數text必填

list_inventory

List the authenticated user's card inventory, paginated. Returns cards with quantities, prices, and metadata. Requires IWMM_API_KEY.

輸入參數pagelimit

get_inventory_quantities

Batch lookup: given a list of card UUIDs, return how many of each (normal + foil) the user owns. Useful before recommending adds. Requires IWMM_API_KEY.

輸入參數cardIds必填

add_inventory

Add one or more cards to the authenticated user's inventory. Accepts a batch - pass a single-item array for one card. This is a real write. Use update_inventory to change quantities, remove_inventory to delete a row. Requires IWMM_API_KEY.

輸入參數items必填

update_inventory

Update quantities for one or more existing inventory rows. Accepts a batch. Use remove_inventory to delete a row entirely. Requires IWMM_API_KEY.

輸入參數items必填

remove_inventory

Remove a card+finish row from the authenticated user's inventory. Requires IWMM_API_KEY.

輸入參數cardId必填isFoil必填

import_inventory_cards

Bulk-import cards into the authenticated user's inventory from pasted CSV text. Native header: name,set_code,number[,quantity][,foil]; Moxfield, Archidekt, Deckbox, and TCGPlayer exports are auto-detected. Returns counts of saved/deleted/skipped rows and per-row errors. Requires IWMM_API_KEY.

輸入參數text必填

export_inventory

Export the authenticated user's full card inventory as CSV (columns: id, name, set_code, number, quantity, foil). Reimport-compatible with import_inventory_cards. Requires IWMM_API_KEY.

無需輸入參數。

list_sealed_inventory

List the authenticated user's sealed-product inventory (booster boxes, bundles, precons), paginated, with quantities and prices. For loose cards use list_inventory. Requires IWMM_API_KEY.

輸入參數pagelimit

set_sealed_inventory

Add or update a sealed product in the authenticated user's inventory by setting its absolute quantity (upserts the row for that product). This is a real write and is Premium-gated. Use remove_sealed_inventory to delete a row. Requires IWMM_API_KEY.

輸入參數quantity必填sealedProductUuid必填

remove_sealed_inventory

Remove a sealed product from the authenticated user's inventory entirely. Premium-gated. Requires IWMM_API_KEY.

輸入參數sealedProductUuid必填

list_transactions

List the authenticated user's transactions, paginated. Supports sort/filter query params. Free tier sees the last 30 days only; Premium gets full history. Requires IWMM_API_KEY.

輸入參數pagesorttypelimitascend

record_transaction

Record a buy or sell transaction. By default this also adjusts inventory (BUY adds, SELL subtracts). This is a real write. Requires IWMM_API_KEY.

輸入參數date必填feestype必填notescardId必填isFoil必填sourcequantity必填pricePerUnit必填skipInventorySync

update_transaction

Update an existing transaction by ID. Only the fields supplied are changed. Card identity and type (BUY/SELL) cannot be changed via this endpoint - delete and re-create instead. Requires IWMM_API_KEY.

輸入參數id必填datefeesnotessourcequantitypricePerUnit

delete_transaction

Delete a transaction by ID. Requires IWMM_API_KEY.

輸入參數id必填

get_cost_basis

Get FIFO cost basis for a specific card+finish for the authenticated user. Pass either cardId or (setCode, setNumber). Requires IWMM_API_KEY.

輸入參數cardIdisFoilsetCodesetNumber

get_portfolio_summary

Get the authenticated user's portfolio summary - current value, total invested, unrealized P&L, ROI, card/unit counts. Free tier sees current value + total invested only; Premium gets the full P&L set. Requires IWMM_API_KEY.

無需輸入參數。

get_portfolio_history

Get portfolio value history. Premium-gated - free tier receives 403. Requires IWMM_API_KEY.

輸入參數days

get_card_performance

Get the user's best- or worst-performing cards by P&L. Default: best, top 10. Premium-gated. Requires IWMM_API_KEY.

輸入參數typelimit

get_cash_flow

Get the user's cash flow (money in vs money out from BUY/SELL transactions). Premium-gated. Requires IWMM_API_KEY.

無需輸入參數。

get_realized_gains

Get the user's realized gains from SELL transactions using FIFO cost basis. Premium-gated. Requires IWMM_API_KEY.

無需輸入參數。

get_portfolio_breakdown

Get the user's collection value broken down by a dimension into slices (each with value, count, and share). Premium-gated. Use get_portfolio_breakdown_cards to drill into one slice. Requires IWMM_API_KEY.

輸入參數by必填colors

get_portfolio_breakdown_cards

Get the cards inside one slice of a portfolio breakdown (the drill-down for get_portfolio_breakdown). Premium-gated. Requires IWMM_API_KEY.

輸入參數by必填key必填colors

refresh_portfolio

Recalculate the user's portfolio P&L. Use after recording a batch of transactions if you want immediate fresh numbers. Requires IWMM_API_KEY.

無需輸入參數。

list_decks

List the authenticated user's decks (summaries: id, name, format, card counts). Requires IWMM_API_KEY.

無需輸入參數。

get_deck

Get one deck with its cards (mainboard + sideboard). Requires IWMM_API_KEY.

輸入參數deckId必填

create_deck

Create a new empty deck. This is a real write. Use add_deck_card to fill it, or import_deck to create from pasted text instead. Requires IWMM_API_KEY.

輸入參數name必填format

import_deck

Create a deck from pasted decklist text, one entry per line (e.g. "4 Lightning Bolt"). Returns the new deck id plus any lines that could not be resolved to a card. Requires IWMM_API_KEY.

輸入參數name必填text必填format

update_deck

Rename a deck or change its format. Omitting format clears it. Requires IWMM_API_KEY.

輸入參數name必填deckId必填format

delete_deck

Delete a deck and all of its cards. This is permanent. Requires IWMM_API_KEY.

輸入參數deckId必填

add_deck_card

Add a card to a deck, incrementing its quantity (creates the row if absent). Use set_deck_card_quantity to set an absolute quantity or remove_deck_card to delete a row. Requires IWMM_API_KEY.

輸入參數cardId必填deckId必填quantityisSideboard

set_deck_card_quantity

Set the absolute quantity for a card + board in a deck (not a delta). A quantity of 0 removes the row. Use add_deck_card to increment instead. Requires IWMM_API_KEY.

輸入參數cardId必填deckId必填quantity必填isSideboard必填

remove_deck_card

Remove a card + board row from a deck entirely. Requires IWMM_API_KEY.

輸入參數cardId必填deckId必填isSideboard必填

deck_missing_to_buy_list

Add the deck's missing cards (the shortfall vs. the user's inventory) to their buy-list. Returns the count of distinct cards added. This is a real write to the buy-list. Requires IWMM_API_KEY.

輸入參數deckId必填

list_price_alerts

List the authenticated user's price alerts. Free tier is capped at 5 active alerts and a single threshold direction per alert; Premium removes both limits. Requires IWMM_API_KEY.

無需輸入參數。

create_price_alert

Create a price alert for a card. Supply increasePct, decreasePct, or both (Premium). At least one threshold is required. Requires IWMM_API_KEY.

輸入參數cardId必填decreasePctincreasePct

update_price_alert

Update an existing price alert. Pass null for a threshold to clear it (Premium only - free users must keep exactly one direction). isActive toggles enable/disable without deleting. Requires IWMM_API_KEY.

輸入參數id必填isActivedecreasePctincreasePct

delete_price_alert

Delete a price alert by ID. Requires IWMM_API_KEY.

輸入參數id必填

list_notifications

List the authenticated user's price alert notifications, newest first. Includes both read and unread. Requires IWMM_API_KEY.

無需輸入參數。

get_unread_notification_count

Get the count of unread notifications for the authenticated user. Requires IWMM_API_KEY.

無需輸入參數。

mark_notification_read

Mark a single notification as read. Requires IWMM_API_KEY.

輸入參數id必填

mark_all_notifications_read

Mark every notification for the authenticated user as read. Requires IWMM_API_KEY.

無需輸入參數。

版本歷史

2
  1. v0.7.5最新Oct 30, 2026
  2. v0.7.0Sep 16, 2026

評分

已滿足適用檢查項的 90%

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

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

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

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分