Are you TokenMaxxing hard enough? Find out in less than a minute β†’

TokenJam for developers

Every programmatic surface TokenJam exposes, in one place. Nothing here needs an account: the CLI runs locally, the SDKs are published packages, and the website content API is public and unauthenticated.

Quickstart

Current release: tokenjam 0.6.11 on PyPI, @tokenjam/sdk 0.6.11 on npm.

# Peek at what your Claude Code sessions already cost β€” no install, nothing written
npx tokenjam

# Install the CLI
pipx install tokenjam

# Wire up Claude Code or Codex with zero code changes
tj onboard --claude-code

# See where the tokens went, and what is recoverable
tj optimize

Full paths for every runtime are in the Quickstart, and the install matrix is in Install & upgrade.

The surfaces

SurfaceWhat it's forStart here
CLI Everything TokenJam does, from a terminal. CLI reference
Python SDK In-process capture from your own agent: @watch() and patch_*(). Python SDK
TypeScript SDK @tokenjam/sdk β€” spans from a Node or edge agent. TypeScript SDK
MCP server TokenJam's own data as tools inside an agent's loop. MCP server
OTLP ingest Any OpenTelemetry emitter, no SDK and no patch. Frameworks
Local REST API Your telemetry, queryable while tj serve runs. Export & integrate
Website content API This site's docs, posts, and analyzer catalog as JSON. API reference

Authentication and keys

There are no API keys to issue, because nothing here is gated. Two different reasons:

There is no hosted sandbox either. The equivalent is tj demo, which seeds a throwaway local store so you can explore every command against realistic data without touching your own sessions.

MCP

tj mcp starts a stdio MCP server exposing status, cost, traces, alerts, drift, budget headroom, and the optimize report as tools. A manifest following the Model Context Protocol registry's server.json schema is published at /.well-known/mcp.json.

It declares a package rather than a remote, because TokenJam runs on your machine and there is no hosted MCP endpoint to point at. Worth reading the cost note in the MCP docs before wiring it into a subscription-billed coding agent.

API versioning and deprecation

The content API is versioned in the URL path, and v1 is current. Breaking changes ship as a new version segment (/api/v2/), never in place. Within a version, fields may be added but existing fields are not removed, renamed, or retyped.

When an endpoint is deprecated, you find out four ways:

The guarantee: a deprecated endpoint keeps responding for at least 90 days after the Deprecation header first appears. Nothing is removed without that notice. The same policy is machine-readable as x-api-lifecycle in the OpenAPI document and as lifecycle in the discovery document.

Machine-readable index

FileFormatWhat it holds
/openapi.jsonOpenAPI 3.1Every operation of the content API.
/api/v1/index.jsonJSONDiscovery: endpoints, auth, lifecycle.
/.well-known/mcp.jsonMCP server.jsonHow to run the MCP server.
/agents.mdMarkdownWhen to use TokenJam, and how to call it.
/llms.txtTextEvery page, with its markdown URL.
/llms-full.txtTextThe whole site as one document.

Source and support

Reading this as an agent? https://tokenjam.dev/agents.md is the same information written for you, and it is the file to fetch first.

Get TokenJam updates