Exact Claude API cost + prompt-cache economics calculator MCP server, plus a tiktoken-misuse scanner
git clone https://github.com/tylerscomic-lab/claude-cost-audit-mcp{
"mcpServers": {
"claude-cost-audit-mcp": {
"command": "node",
"args": ["/path/to/claude-cost-audit-mcp/dist/index.js"]
}
}
}MCP Servers overview
# claude-cost-audit-mcp [](LICENSE) [](https://mcpize.com/mcp/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](https://mcpize.com/mcp/claude-cost-audit-mcp) — free tier, $7/mo Pro. **Self-host:** ```bash npm install node server.js ``` ## Part of a small suite [mcp-schema-audit-mcp](https://github.com/tylerscomic-lab/mcp-schema-audit-mcp), [cron-schedule-audit-mcp](https://github.com/tylerscomic-lab/cron-schedule-audit-mcp), [regex-safety-audit-mcp](https://github.com/tylerscomic-lab/regex-safety-audit-mcp). ## License MIT
What people ask about claude-cost-audit-mcp
What is tylerscomic-lab/claude-cost-audit-mcp?
+
tylerscomic-lab/claude-cost-audit-mcp is mcp servers for the Claude AI ecosystem. Exact Claude API cost + prompt-cache economics calculator MCP server, plus a tiktoken-misuse scanner It has 0 GitHub stars and was last updated today.
How do I install claude-cost-audit-mcp?
+
You can install claude-cost-audit-mcp by cloning the repository (https://github.com/tylerscomic-lab/claude-cost-audit-mcp) or following the README instructions on GitHub. ClaudeWave also provides quick install blocks on this page.
Is tylerscomic-lab/claude-cost-audit-mcp safe to use?
+
tylerscomic-lab/claude-cost-audit-mcp has not been audited yet by our security agent. Review the original repository on GitHub before using it in production.
Who maintains tylerscomic-lab/claude-cost-audit-mcp?
+
tylerscomic-lab/claude-cost-audit-mcp is maintained by tylerscomic-lab. The last recorded GitHub activity is from today, with 0 open issues.
Are there alternatives to claude-cost-audit-mcp?
+
Yes. On ClaudeWave you can browse similar mcp servers at /categories/mcp, sorted by popularity or recent activity.
Deploy claude-cost-audit-mcp to your cloud
Ship this repo to production in minutes. Each platform spins up its own environment with editable env vars.
Maintain this repo? Add a badge to your README
Drop the badge into your GitHub README to show it's tracked on ClaudeWave. Each badge links back to this page and reflects the live Trust Score.
[](https://claudewave.com/repo/tylerscomic-lab-claude-cost-audit-mcp)<a href="https://claudewave.com/repo/tylerscomic-lab-claude-cost-audit-mcp"><img src="https://claudewave.com/api/badge/tylerscomic-lab-claude-cost-audit-mcp" alt="Featured on ClaudeWave: tylerscomic-lab/claude-cost-audit-mcp" width="320" height="64" /></a>More MCP Servers
Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.
User-friendly AI Interface (Supports Ollama, OpenAI API, ...)
An open-source AI agent that brings the power of Gemini directly into your terminal.
The fastest path to AI-powered full stack observability, even for lean teams.
Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface
🕷️ An adaptive Web Scraping framework that handles everything from a single request to a full-scale crawl!