# TCG API — agent integration

Base URL: https://api.erpclimax.fr

1. Read https://api.erpclimax.fr/openapi.json for the exact contract.
2. Read GET /v1/catalog/status to check available datasets. Do not claim exhaustive coverage.
3. Discover game IDs with GET /v1/games and set IDs with GET /v1/sets.
4. Authenticate card requests with Authorization: Bearer <TCG_API_KEY>. Keep the key in an environment variable; never place it in a URL, source code, logs or a copied prompt.
5. Search GET /v1/cards?q=...&game=...&language=ja&limit=24. Follow pagination.nextCursor with unchanged filters. GET /v1/cards/{id} reads an exact printing.
6. A translated name is not evidence of printing language. language=null means unknown. Variants are distinct; never infer equivalent cards across games/languages.
7. Image paths /images/{id}?face=front|back are relative to the base URL. Missing image returns 404. Preserve source attribution.
8. Free accounts receive 60 requests/minute and 10000/day UTC, shared across all keys and MCP. Honour 429 and Retry-After.

## MCP

Endpoint: https://api.erpclimax.fr/mcp
Transport: Streamable HTTP, stateless JSON-RPC 2.0. Bearer key required. Supported negotiated protocol versions: 2025-03-26, 2025-06-18, 2025-11-25. Send Accept: application/json, text/event-stream.

Tools: search_cards, get_card, list_sets. Documentation resource: https://api.erpclimax.fr/agents.md. These tools read public catalogue data only. Account management uses portal session cookies, not MCP. Every MCP POST including initialization consumes quota.

## Quick REST example

```sh
curl 'https://api.erpclimax.fr/v1/cards?language=ja&limit=3' -H "Authorization: Bearer $TCG_API_KEY"
```

## Start without a key

GET /demo/cards searches public data, max 12 results/page and 30 calls/minute/IP. The demonstration is for evaluation; obtain a key at https://api.erpclimax.fr/dashboard for integrations.

## Catalogue semantics

Stable card IDs are namespaced source-derived identifiers, not sequential ERP IDs. Names and attributes vary by game. No private inventory, orders, customer information, ERP network sales or inferred price estimates are exposed.
