Documentation

Build with AI

New

Everything an AI coding agent or LLM needs to use JustTCG correctly: Markdown for every docs page, llms.txt, a public docs MCP server, the OpenAPI spec, and changelog feeds.

Markdown for every page

Every docs page is available as clean Markdown, without the navigation and page chrome. Append .md to any docs URL, or send an Accept: text/markdown header to the normal page URL. Each Markdown file starts with front matter (title, description, url, markdown_url).

bash — fetch a page as Markdown
fetch a page as Markdown
# Append .md to any docs URL
curl https://justtcg.com/docs/errors.md

# Or ask for Markdown with the Accept header
curl -H "Accept: text/markdown" https://justtcg.com/docs/errors

Reading in the browser? The Copy page menu at the top of each docs page copies the Markdown or opens the page in your AI assistant of choice.

llms.txt and llms-full.txt

Two plain-text files follow the llms.txt convention. /llms.txt is a short index of the API and its docs pages. /llms-full.txt adds a longer overview (plans, licensing, FAQ) and then the full Markdown of every docs page in one file, for agents that want everything in a single fetch.

Docs MCP server

A public, read-only Model Context Protocol server lets your agent search and read these docs directly. No API key is needed.

POSThttps://justtcg.com/mcp/docs

Tools

ToolWhat it does
search_docsKeyword search across every docs page. Returns the best-matching sections with the page URL, section heading and a snippet.
get_docReturn one docs page as Markdown. Accepts /docs/errors, docs/errors, a full URL, or any of those ending in .md.
list_docsList every docs page with its title, URL, Markdown URL and description.
get_changelogReturn API changelog entries, optionally only those on or after a date (since, YYYY-MM-DD).

Install

bash
Any agent (add-mcp)
npx add-mcp https://justtcg.com/mcp/docs
bash
claude mcp add --transport http justtcg-docs https://justtcg.com/mcp/docs
json
Generic JSON config
{
  "mcpServers": {
    "justtcg-docs": {
      "url": "https://justtcg.com/mcp/docs"
    }
  }
}
Docs, not prices.The docs server only returns documentation. To query live card prices from an agent, use the pricing MCP server below.

Pricing MCP server

To let an agent query card prices, connect the hosted JustTCG pricing MCP server at https://mcp.justtcg.com. It is a separate server from the docs one and needs your API key. Setup and example prompts are on the /mcp page.

OpenAPI spec

The machine-readable definition of the REST API is published at https://justtcg.com/docs/swagger.json (no key needed). Agent frameworks that build tools from OpenAPI can load it directly. See the OpenAPI (Swagger) page for import and client-generation instructions.

Changelog feeds

Useful for agents and scheduled jobs that need to answer "what changed since my last sync?". The same entries are available in three formats, and the docs MCP server's get_changelog tool reads them too.

Add JustTCG to your AGENTS.md or CLAUDE.md

Coding agents work best when your repo tells them how to use an API. Paste this into your AGENTS.md (or CLAUDE.md, .cursorrules, or similar) so the agent authenticates, batches, syncs and handles missing prices the way the API expects.

markdown — AGENTS.md
## JustTCG API (trading card game pricing)

- Base URL: `https://api.justtcg.com/v1`. Authenticate with the `x-api-key` request header.
- Read the key from the `JUSTTCG_API_KEY` environment variable. Never hardcode it or commit it.
- In JavaScript/TypeScript, prefer the official SDK (`npm install justtcg-js`) over hand-written fetch calls. It reads `JUSTTCG_API_KEY` by default.
- Fetch many cards with one `POST /v1/cards` (a JSON array of lookups) instead of looping over `GET /v1/cards`. The array limit depends on the plan: 20 (Free), 100 (Starter, Pro), 200 (Enterprise). Chunk larger lists.
- For incremental sync, pass `updated_after` (Unix seconds) and store the time of your last successful sync, instead of re-fetching everything.
- Respect rate limits (https://justtcg.com/docs/rate-limits). On `429`, back off exponentially with jitter and honor `Retry-After` when present.
- Prices can be `null`. Branch on `priceStatus` (`current`, `expired`, `unpriced`) and use `lastKnownPrice` for expired variants. Never treat `null` as `0`. See https://justtcg.com/docs/thin-markets.
- Read the docs as Markdown: append `.md` to any docs URL (https://justtcg.com/docs/errors.md), or connect the docs MCP server at https://justtcg.com/mcp/docs (no key needed). Page index: https://justtcg.com/llms.txt.
- Before changing integration code, or when behavior changes unexpectedly, check the changelog JSON feed: https://justtcg.com/docs/changelog.json.

Details behind each line: Quickstart, SDK, /cards, Rate limits and Thin markets.