# TokenZero

> TokenZero is a freemium MCP server for ai models and llm tooling. MCP server for AI spend: signed receipts, token-waste audits and model cost comparison. It can run locally on your machine or as a hosted remote server.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Platforms:** API, CLI, Web
- **Website:** https://tokenzero.sh
- **Repository:** https://github.com/tokenzero-ai/tokenzero
- **MCP Registry name:** sh.tokenzero/mcp
- **Categories:** AI models and LLM tooling, analytics and data
- **Listing updated:** 2026-11-14

## About

The MCP server is the agent-facing part of a ledger that records every model call. The gateway issues one signed, chained receipt per call that anyone can verify, and you can either point your SDK's base URL at it or push usage you already log. You bring your own provider keys and pay providers directly.

Four named tools: audit_repo_token_waste looks for wasted tokens in a repository, optimize_prompt_payload makes a prompt cache-friendly, calculate_model_arbitrage compares model costs, and workspace_metrics reads a workspace using a tz_live_ key. The site gives example prompts such as audit this repo for token waste.

It supports OpenAI, Anthropic and Google SDK styles, plus LangChain and the Vercel AI SDK. A free sandbox endpoint answers without a key.

## Features

- **Signed receipts:** Issues a verifiable receipt for each call.
- **Waste audit:** Scans a repository for token waste.
- **Model arbitrage:** Compares model options by cost.
- **Cache-friendly prompts:** Rewrites prompt payloads for caching.
- **Record-only mode:** Accepts logged usage without proxying calls.

## Good for

- Audit a codebase for wasteful prompts
- Attribute AI spend by workspace
- Verify billing records independently
- Compare models before switching

## Install

### Claude Code (Terminal)

```sh
claude mcp add --transport http mcp https://api.tokenzero.sh/mcp
```

### Claude Desktop (Settings → Connectors → Add custom connector)

```sh
https://api.tokenzero.sh/mcp
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mcp": {
      "url": "https://api.tokenzero.sh/mcp"
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "mcp": {
      "type": "http",
      "url": "https://api.tokenzero.sh/mcp"
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp": {
      "serverUrl": "https://api.tokenzero.sh/mcp"
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcp": {
      "type": "http",
      "url": "https://api.tokenzero.sh/mcp"
    }
  }
}
```

## Tools

- `audit_repo_token_waste`: Audits a repository for wasted tokens.
- `optimize_prompt_payload`: Makes a prompt payload cache-friendly.
- `calculate_model_arbitrage`: Compares model costs.
- `workspace_metrics`: Reads metrics for a workspace.

## FAQ

### Does it hold my provider keys?

No. You bring your own keys and pay providers directly.

### Is there a free option?

The site says BYOK and free to start.

### Which transports are available?

stdio via npm or streamable HTTP at api.tokenzero.sh/mcp.

### Is TokenZero free?

TokenZero has a free plan, with paid plans for more usage or features.

### How do I add TokenZero to Claude Code?

Run this command in your terminal: claude mcp add --transport http mcp https://api.tokenzero.sh/mcp

### What are the best alternatives to TokenZero?

The closest alternatives to TokenZero are Agent-Native Analytics, Claude Code Ultimate Guide, Google Ads + Meta Ads + SEO/GEO MCP, Tapetide - Indian Stock Market MCP and World Monitor.

## Alternatives

- [Agent-Native Analytics](https://ai-powered.com/mcp/agent-native-analytics): Agent-Native Analytics is an open-source MCP server for analytics and data.
- [Claude Code Ultimate Guide](https://ai-powered.com/mcp/claude-code-ultimate-guide): Claude Code Ultimate Guide is an open-source MCP server for ai models and llm tooling.
- [Google Ads + Meta Ads + SEO/GEO MCP](https://ai-powered.com/mcp/google-ads-meta-ads-seo-geo-mcp): Google Ads + Meta Ads + SEO/GEO MCP is a freemium MCP server for marketing and seo.
- [Tapetide - Indian Stock Market MCP](https://ai-powered.com/mcp/tapetide-indian-stock-market-mcp): Tapetide - Indian Stock Market MCP is a freemium MCP server for finance and payments.
- [World Monitor](https://ai-powered.com/mcp/world-monitor): World Monitor is a freemium MCP server for analytics and data.
- [CompanyData](https://ai-powered.com/mcp/companydata): CompanyData is a paid MCP server for analytics and data.
- [ChartAnt](https://ai-powered.com/mcp/chartant): ChartAnt is a freemium MCP server for design and media.
- [Quantivex Research](https://ai-powered.com/mcp/quantivex-research): Quantivex Research is a free MCP server for finance and payments.

---
Source: https://ai-powered.com/mcp/tokenzero-2
