tokendiet-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
TokenDiet Open-Core MCP server for auditing MCP JSON Schema token weight, simulating multi-turn O(T^2) prompt-cache TTL cliffs across 9 LLM pricing tiers, computing optimal /compact checkpoints, and catching CLAUDE.md / AGENTS.md / .cursorrules instruction bloat. Start with audit_mcp_schema_tokens or audit_instruction_bloat on workspace configuration files, then run simulate_agent_session_cost and find_optimal_compact_turn to minimize multi-turn spend.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
| prompts | {} |
| resources | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| audit_mcp_schema_tokensB | Break down MCP tools[] or .mcp.json configuration JSON Schema token weight per server and per tool, compute multi-turn cumulative prefix cost, and flag additionalProperties: true schemas, verbose tool descriptions, and wildcard eager mounts. |
| simulate_agent_session_costB | Simulate 1..100 turn O(T^2) coding agent session and monthly token spend across 5m/1h prompt-cache TTLs, pause gaps, and mid-session screenshot cache-bust cliffs across 9 published LLM pricing tiers. |
| find_optimal_compact_turnB | Scan every candidate /compact checkpoint turn across a multi-turn coding session to compute the exact compaction turn that minimizes total session and monthly token spend. |
| audit_instruction_bloatB | Audit CLAUDE.md, AGENTS.md, .cursorrules, .windsurfrules, and optional .mcp.json sections for 30-turn cumulative token cost, embedded code-fence bloat, and cross-file duplicate instructions. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| audit-agent-workspace-tokens | Audit a repository CLAUDE.md, AGENTS.md, and .mcp.json for static prefix bloat, cross-file duplicate instructions, and optimal /compact checkpoints. |
| diagnose-cache-ttl-cliff | Simulate why 5-minute pause gaps and mid-session screenshots inflate multi-turn LLM coding agent bills and recommend an optimal compaction schedule. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| Published LLM Prompt-Cache & Token Pricing Reference (9 Tiers) | Reference pricing table ($ per 1M tokens) covering input, output, warm cache read, 5m cache write, and 1h cache write rates across Anthropic, OpenAI, Google, DeepSeek, and Qwen. |
| GitHub Action Token Budget Gate Setup (z121245017-ai/tokendiet-mcp@v1) | Copy-paste .github/workflows YAML for blocking CLAUDE.md / AGENTS.md / .mcp.json static prefix bloat in pull requests. |
TDQS
Scored across 4 tools
The two audit tools target clearly different artifacts (MCP schema/config vs. instruction files), and the simulation and optimization tools have distinct roles. Minor potential overlap between the audit tools is mitigated by their explicit target names in the descriptions.
All four tools use snake_case with a verb-first pattern (audit_*, simulate_*, find_optimal_*). The variation in verbs is meaningful and consistently applied across the set.
Four tools is a well-scoped set for a token-cost auditing and simulation server. Each tool addresses a distinct stage—schema audit, instruction audit, session simulation, and compaction optimization—with no redundant entries.
The surface covers auditing, simulating, and optimizing token spend across MCP schemas and instruction files, which are the core domain needs. Minor gaps exist, such as no dedicated export/report tool or direct session comparison, but agents can chain the existing tools for most workflows.