Claude Cost Audit

io.github.tylerscomic-labPublished by GitHub account tylerscomic-labv1.0.0Updated Oct 24, 2026

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

The publisher's own server: audit.domains - Domain Valuation

VerifiedStreamable HTTPWeb executableFinanceDeveloper Tools

Overview

AI-generated overview

A hosted MCP server that calculates exact Claude API costs, checks prompt-cache break-even, and scans source code for tiktoken misuse.

What you can do
Calculate exact dollar cost of Claude API messages from token counts, using per-model pricing and date-resolved rates, including cache write and read multipliers and minimum cacheable token thresholds for a prefix, and whether caching pays off at 5-minute or 1-hour TTL, and flag source files that estimate Claude tokens with OpenAI tokenizers such as tiktoken or gpt-tokenizer.
When to use it
Useful when you are budgeting or auditing Claude API spend, deciding whether prompt caching is worth it for a repeated prefix, or reviewing a codebase for token-counting mistakes that silently skew cost and context-budget estimates.
Requirements
A remote endpoint reached over streamable HTTP; OAuth authentication is required. No environment variables or headers are declared. The README also describes a self-hosted option via npm install and node server.js.
Before you install
The hosted service requires OAuth sign-in and the README mentions a paid Pro tier, so check pricing before relying on it. The tokenizer audit reads source code, so only point it at code you are comfortable sharing with a third-party service.

Installation

In SourceWeft

  1. Open Claude Cost Audit in the dashboard and add it to a workspace.
  2. Connect the required credentials. They are stored privately and never shown on public pages.
  3. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.tylerscomic-lab%2Fclaude-cost-audit-mcp/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config. The client completes OAuth sign-in on first connect.

{
  "mcpServers": {
    "claude-cost-audit": {
      "type": "http",
      "url": "https://claude-cost-audit-mcp.mcpize.run/mcp"
    }
  }
}

README

claude-cost-audit-mcp

[License: MIT] [Live on MCPize]

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:

bash
npm installnode server.js

Part of a small suite

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

License

MIT

Source: README.md at commit 57ff665

Tools

0
This server asks you to sign in, so SourceWeft could not read its tools without an account and has not indexed them. What a connected account sees can depend on that account and its permissions.

Version history

1
  1. v1.0.0LatestSep 16, 2026

Score

85% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

Other Audit integrations