Claude Cost Audit

Official registry Marketing and sales

Exact Claude API cost calc with real cache economics, plus a tiktoken-misuse scanner.

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

Remote (streamable-http)
Claude Code
claude mcp add --transport http claude-cost-audit 'https://claude-cost-audit-mcp.mcpize.run/mcp'
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "claude-cost-audit": {
            "type": "http",
            "url": "https://claude-cost-audit-mcp.mcpize.run/mcp"
        }
    }
}

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. claude-cost-audit-mcp
  2. The mistake this catches
  3. Cache economics people get wrong
  4. Tools
  5. Use it
  6. Part of a small suite
  7. License

claude-cost-audit-mcp

An MCP server for exact Claude API cost calculation — correct prompt-cache economics (write 1.25x at 5-minute TTL / 2x at 1-hour TTL, read 0.1x), cache break-even analysis, and a scanner for the single most common Claude-cost mistake: estimating tokens with OpenAI's tiktoken.

The mistake this catches

Per Anthropic's own documentation: "Do not use tiktoken. It's OpenAI's tokenizer. It undercounts Claude tokens by ~15-20% on typical text, and by much more on code or non-English input." Any cost estimate or context-budget check built on tiktoken for a Claude model is silently wrong — this scans source for that exact pattern (foreign tokenizer + Claude/Anthropic usage in the same file) and points to the fix (messages.count_tokens).

Cache economics people get wrong

Caching doesn't pay off starting from the second request the way most people assume. The real break-even is 2 reuses at 5-minute TTL, but 3 reuses at 1-hour TTL — because the 1-hour write costs more (2x vs 1.25x). check_cache_breakeven computes this from Anthropic's real multipliers instead of a guessed rule of thumb, and flags prefixes below the model's own minimum-cacheable-token threshold (which is not monotonic across model generations — 512 tokens on the newest models, 4096 on some older ones).

Tools

calculate_message_cost

Exact $ cost from token counts, using Anthropic's real current per-model pricing (including Claude Sonnet 5's time-limited introductory rate, resolved automatically from the date you pass).

check_cache_breakeven

Given expected request volume reusing the same prefix, tells you whether caching saves money and at which TTL.

audit_tokenizer_usage

Scans source for tiktoken/gpt-tokenizer/etc. alongside Claude API usage.

Use it

Hosted (recommended): MCPize — free tier, $7/mo Pro.

Self-host:

npm install
node server.js

Part of a small suite

mcp-schema-audit-mcp, cron-schedule-audit-mcp, regex-safety-audit-mcp.

License

MIT

Frequently asked questions

What is Claude Cost Audit?

Exact Claude API cost calc with real cache economics, plus a tiktoken-misuse scanner.

How do I install Claude Cost Audit?

It runs as a remote server. In Claude Code: claude mcp add --transport http claude-cost-audit 'https://claude-cost-audit-mcp.mcpize.run/mcp'. For other clients, paste the JSON configuration from this page into their MCP settings.

Does Claude Cost Audit need an API key?

Its registry entry lists no required key or secret. Some features may still need an account with the service it connects to.

Is Claude Cost Audit open source?

Yes. Its code is on GitHub under the MIT license.

Who maintains Claude Cost Audit?

It is published by tylerscomic-lab. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.