Docs / API reference
MCP server
Give an AI agent live card prices through the Model Context Protocol.
Endpoint
https://tcgpriceapi.com/mcpStreamable HTTP with JSON-RPC 2.0. Send your API key in the X-API-Key header, or as a Bearer token. Each tool call counts the same as the endpoint it uses: one request, or one per card for history of 3 months or more. get_usage is free.
Set up your client
Run this in your terminal. Add --scope user to use it in every project.
claude mcp add --transport http tcgpriceapi https://tcgpriceapi.com/mcp \ --header "X-API-Key: YOUR_API_KEY"
In claude.ai or Claude Desktop: Customize, then Connectors, then Add custom connector. Enter the details below. Custom request headers are still a beta that Anthropic is rolling out; if you don't see a Request headers section yet, use Claude Code, or Claude Desktop with the community mcp-remote bridge (needs Node.js).
Name: TCGPriceAPI Remote server URL: https://tcgpriceapi.com/mcp Authentication: No sign-in Request header: x-api-key = YOUR_API_KEY
Add this to ~/.codex/config.toml, then set TCGPRICEAPI_KEY in your environment. Codex sends it as a Bearer token, which the server accepts.
[mcp_servers.tcgpriceapi] url = "https://tcgpriceapi.com/mcp" bearer_token_env_var = "TCGPRICEAPI_KEY"
Add this to .cursor/mcp.json in your project, or to ~/.cursor/mcp.json for every project. Set TCGPRICEAPI_KEY in your environment.
{
"mcpServers": {
"tcgpriceapi": {
"url": "https://tcgpriceapi.com/mcp",
"headers": { "X-API-Key": "${env:TCGPRICEAPI_KEY}" }
}
}
}Add this to .vscode/mcp.json. VS Code asks for your key once and stores it securely.
{
"inputs": [
{ "type": "promptString", "id": "tcgpriceapi-key", "description": "TCGPriceAPI key", "password": true }
],
"servers": {
"tcgpriceapi": {
"type": "http",
"url": "https://tcgpriceapi.com/mcp",
"headers": { "X-API-Key": "${input:tcgpriceapi-key}" }
}
}
}Run this in your terminal.
gemini mcp add --transport http --header "X-API-Key: YOUR_API_KEY" \ tcgpriceapi https://tcgpriceapi.com/mcp
Add this to your Windsurf (Devin Desktop) mcp_config.json and set TCGPRICEAPI_KEY in your environment.
{
"mcpServers": {
"tcgpriceapi": {
"serverUrl": "https://tcgpriceapi.com/mcp",
"headers": { "X-API-Key": "${env:TCGPRICEAPI_KEY}" }
}
}
}Building your own agent? Pass the server as a remote MCP tool. OpenAI's Responses API and xAI's Grok API take a headers field; the Claude API's MCP connector takes authorization_token, sent as a Bearer token.
// OpenAI Responses API and xAI Grok API: one entry in "tools"
{ "type": "mcp", "server_label": "tcgpriceapi", "server_url": "https://tcgpriceapi.com/mcp",
"headers": { "X-API-Key": "YOUR_API_KEY" } }
// Claude API (MCP connector): one entry in "mcp_servers"
{ "type": "url", "name": "tcgpriceapi", "url": "https://tcgpriceapi.com/mcp",
"authorization_token": "YOUR_API_KEY" }Any client that supports Streamable HTTP can connect. Send your key in the X-API-Key header, or as a Bearer token. ChatGPT needs a sign-in flow we're still building, so it can't connect yet.
URL: https://tcgpriceapi.com/mcp
Header: X-API-Key: YOUR_API_KEY
(or Authorization: Bearer YOUR_API_KEY)
Transport: Streamable HTTP, JSON-RPC 2.0
Versions: 2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05Tools
| Tool | What it does |
|---|---|
list_sets | Lists every game and set, or the sets of one game. Use the exact names it returns in search_cards. |
search_cards | Finds cards by part of their name, set or game. Returns card_id, name, set, number, rarity, game and image, without prices. Pass the card_id values to get_card_prices. |
get_card_prices | Current prices for one or more cards, per SKU (printing, condition and language): market price, cheapest and highest listings with shipping, recent sold low and high, and how many copies and sellers are listed. |
get_price_history | Daily or weekly sold history for one card: market price, low and high sale prices, and quantity sold per date. |
most_valuable_cards | The cards with the highest Near Mint market price in a game, or in one set of it. |
identify_card | Use this after reading a trading card from a photo or scan. Pass what is printed on the card: its name and collector number (such as "4/102", "OP01-001" or "025/165"), and the set or game if you know them. Returns the best candidate cards with their current prices in one call, best first. Each candidate has a match label: "exact" (same name and number), "number" (same number, longer name) or "name" (name only). Ask the user to confirm anything but "exact". |
get_usage | The plan's limits and how many requests have been used today and this month. Free: it does not count. |