TokenZero is an MCP server published by sh.tokenzero, hosted at api.tokenzero.sh. When last checked on 2026-11-21 it was working: it answers and lists its tools. It declares 6 tools, including try_tokenzero, audit_repo_token_waste, optimize_prompt_payload, calculate_model_arbitrage, provision_workspace.
Ledger of record for AI spend: verifiable receipts, waste auditor & model arbitrage MCP.
4 connections through 5 shared values. Tap any node.
Squares are this server's values; dots are other servers sharing them. A shared address or publisher is a lead, not proof of a common operator.
Inferred from the host name and headers: what a server runs on, not who runs it.
Call this first: no API key, no signup, no setup. Shows what TokenZero would do to one of your LLM calls: it runs the four savings engines (prompt-cache formatting, edge cache, cascade advice, signed receipt) on a sample or your own prompt and model, and returns the list-price saving, the signed receipt and a copy-paste keyless curl that makes a real call on a free model. Pass {} for the default, or {"model": "gpt-6.1-sol", "system": "...", "prompt": "..."}.
| Parameter | Type | Description |
|---|---|---|
| model | string | a priced model id; default gpt-6.1-sol |
| prompt | string | your user message (optional) |
| system | string | your system prompt (optional) |
{
"name": "try_tokenzero",
"title": "Try TokenZero (no key needed)",
"description": "Call this first: no API key, no signup, no setup. Shows what TokenZero would do to one of your LLM calls: it runs the four savings engines (prompt-cache formatting, edge cache, cascade advice, signed receipt) on a sample or your own prompt and model, and returns the list-price saving, the signed receipt and a copy-paste keyless curl that makes a real call on a free model. Pass {} for the default, or {\"model\": \"gpt-6.1-sol\", \"system\": \"...\", \"prompt\": \"...\"}.",
"inputSchema": {
"type": "object",
"properties": {
"model": {
"type": "string",
"description": "a priced model id; default gpt-6.1-sol"
},
"prompt": {
"type": "string",
"description": "your user message (optional)"
},
"system": {
"type": "string",
"description": "your system prompt (optional)"
}
}
},
"annotations": {
"title": "Try TokenZero (no key needed)",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": false,
"destructiveHint": false
}
}No API key needed. Static-analyze a public GitHub repo (e.g. {"repo": "owner/name"}) or a set of source files for LLM token waste: uncached static prompts, frontier models on extraction tasks, hot loops, non-deterministic repeat calls, and prompt-caching mis-integration (caching gated on model names, volatile values in the system prompt, random ids in history, wrong-provider cache markers, misplaced breakpoints, cost math that ignores cached tokens). Returns findings with fixes and an estimated recoverable percentage.
| Parameter | Type | Description |
|---|---|---|
| repo | string | GitHub owner/name (public) |
| files | array | Alternative to repo: files to analyze |
{
"name": "audit_repo_token_waste",
"title": "Audit a repo for LLM token waste",
"description": "No API key needed. Static-analyze a public GitHub repo (e.g. {\"repo\": \"owner/name\"}) or a set of source files for LLM token waste: uncached static prompts, frontier models on extraction tasks, hot loops, non-deterministic repeat calls, and prompt-caching mis-integration (caching gated on model names, volatile values in the system prompt, random ids in history, wrong-provider cache markers, misplaced breakpoints, cost math that ignores cached tokens). Returns findings with fixes and an estimated recoverable percentage.",
"inputSchema": {
"type": "object",
"properties": {
"repo": {
"type": "string",
"description": "GitHub owner/name (public)"
},
"files": {
"type": "array",
"items": {
"type": "object",
"required": [
"path",
"content"
],
"properties": {
"path": {
"type": "string"
},
"content": {
"type": "string"
}
}
},
"description": "Alternative to repo: files to analyze"
}
}
},
"annotations": {
"title": "Audit a repo for LLM token waste",
"readOnlyHint": false,
"openWorldHint": true,
"idempotentHint": false,
"destructiveHint": false
}
}No API key needed. Rewrite an OpenAI Chat/Responses or Anthropic Messages request body so its static prefix is provider-cacheable (Anthropic cache_control breakpoints, OpenAI prompt_cache_key). Returns the optimized body, what changed, the token profile and the projected per-request saving. Never changes the tokens the model sees.
| Parameter | Type | Description |
|---|---|---|
| body * | object | The request body |
| endpoint | string | one of ["/v1/chat/completions","/v1/responses","/v1/messages"] |
| strategy | string | one of ["static","conversation"] |
{
"name": "optimize_prompt_payload",
"title": "Make a request body cache-friendly",
"description": "No API key needed. Rewrite an OpenAI Chat/Responses or Anthropic Messages request body so its static prefix is provider-cacheable (Anthropic cache_control breakpoints, OpenAI prompt_cache_key). Returns the optimized body, what changed, the token profile and the projected per-request saving. Never changes the tokens the model sees.",
"inputSchema": {
"type": "object",
"required": [
"body"
],
"properties": {
"body": {
"type": "object",
"description": "The request body"
},
"endpoint": {
"enum": [
"/v1/chat/completions",
"/v1/responses",
"/v1/messages"
],
"type": "string"
},
"strategy": {
"enum": [
"static",
"conversation"
],
"type": "string"
}
}
},
"annotations": {
"title": "Make a request body cache-friendly",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}No API key needed; only `model` is required (e.g. {"model": "gpt-6.1-sol"}, defaults 2,000 tokens in and 400 out). Price a workload at list prices across models: cost per request and per month for the requested model, its cheaper sibling, and the effect of prompt caching. The result names the pricing table version it used.
| Parameter | Type | Description |
|---|---|---|
| model * | string | model id, e.g. gpt-6.1-sol or claude-sonnet-5-5 |
| compare_to | array | |
| input_tokens | number | per request; default 2000 |
| output_tokens | number | per request; default 400 |
| static_tokens | number | portion of input_tokens that is a fixed prefix (system + tools) |
| requests_per_month | number |
{
"name": "calculate_model_arbitrage",
"title": "Price a workload across models",
"description": "No API key needed; only `model` is required (e.g. {\"model\": \"gpt-6.1-sol\"}, defaults 2,000 tokens in and 400 out). Price a workload at list prices across models: cost per request and per month for the requested model, its cheaper sibling, and the effect of prompt caching. The result names the pricing table version it used.",
"inputSchema": {
"type": "object",
"required": [
"model"
],
"properties": {
"model": {
"type": "string",
"description": "model id, e.g. gpt-6.1-sol or claude-sonnet-5-5"
},
"compare_to": {
"type": "array",
"items": {
"type": "string"
}
},
"input_tokens": {
"type": "number",
"description": "per request; default 2000"
},
"output_tokens": {
"type": "number",
"description": "per request; default 400"
},
"static_tokens": {
"type": "number",
"description": "portion of input_tokens that is a fixed prefix (system + tools)"
},
"requests_per_month": {
"type": "number"
}
}
},
"annotations": {
"title": "Price a workload across models",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}Create a TokenZero workspace and key with no form. Returns the key once, the base URLs that route through it (OPENAI_BASE_URL / ANTHROPIC_BASE_URL), the one-click dashboard link and the badge URL. Free up to the monthly free tier; nothing is billed.
| Parameter | Type | Description |
|---|---|---|
| name | string | workspace name (default mcp-agent) |
{
"name": "provision_workspace",
"title": "Create a free TokenZero workspace",
"description": "Create a TokenZero workspace and key with no form. Returns the key once, the base URLs that route through it (OPENAI_BASE_URL / ANTHROPIC_BASE_URL), the one-click dashboard link and the badge URL. Free up to the monthly free tier; nothing is billed.",
"inputSchema": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "workspace name (default mcp-agent)"
}
}
},
"annotations": {
"title": "Create a free TokenZero workspace",
"readOnlyHint": false,
"openWorldHint": false,
"idempotentHint": false,
"destructiveHint": false
}
}Live value scorecard for a TokenZero workspace: hard savings and net ROI per window, the four engines' contribution, speed, parity, availability and privacy posture, per-model breakdown and one-click recommendations. Needs the workspace key (tz_live_…); pass demo: true for a labelled sample.
| Parameter | Type | Description |
|---|---|---|
| key | string | workspace key (tz_live_…) |
| demo | boolean | return the sample scorecard instead |
| window | string | one of ["24h","7d","30d","all"] |
{
"name": "workspace_metrics",
"title": "Read a workspace savings scorecard",
"description": "Live value scorecard for a TokenZero workspace: hard savings and net ROI per window, the four engines' contribution, speed, parity, availability and privacy posture, per-model breakdown and one-click recommendations. Needs the workspace key (tz_live_…); pass demo: true for a labelled sample.",
"inputSchema": {
"type": "object",
"properties": {
"key": {
"type": "string",
"description": "workspace key (tz_live_…)"
},
"demo": {
"type": "boolean",
"description": "return the sample scorecard instead"
},
"window": {
"enum": [
"24h",
"7d",
"30d",
"all"
],
"type": "string"
}
}
},
"annotations": {
"title": "Read a workspace savings scorecard",
"readOnlyHint": true,
"openWorldHint": false,
"idempotentHint": true,
"destructiveHint": false
}
}TokenZero cuts LLM API bills via a BYOK gateway: point any OpenAI, Anthropic or Gemini SDK at https://tokenzero.sh/v1 (your provider key passes through; nothing is stored or resold) and every call gets prompt-cache formatting, an edge response cache, optional cascade routing and an Ed25519-signed savings receipt. Start with try_tokenzero (no key, no setup: shows the saving on one call and returns a keyless curl). Tools: audit_repo_token_waste finds token waste in a public repo or files; optimize_prompt_payload makes one request body cache-friendly; calculate_model_arbitrage prices the same workload across models; provision_workspace creates a free workspace and returns its base URLs and key; workspace_metrics reads a workspace's savings scorecard. Listing tools needs no key; free up to $500/month routed. Docs: https://tokenzero.sh/llms.txt
Names, descriptions and schemas were written by the server and are shown as data.
Pattern matches on what the server declares. They show what it says it can do, not what it does.
None yet. Changes appear after a server's second daily check.