Tokendiet MCP — Security skill for Claude Code
Zero-dependency Open-Core MCP server, CLI & GitHub Action to audit MCP JSON Schema token weight, simulate multi-turn prompt-cache TTL cliffs across 9 LLMs, and gate CLAUDE.md/AGENTS.md/.mcp.json bloat.
How to install Tokendiet MCP
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open z121245017-ai/tokendiet-mcp and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
What Tokendiet MCP does
Zero-dependency Open-Core MCP server, CLI & GitHub Action to audit MCP JSON Schema token weight, simulate multi-turn prompt-cache TTL cliffs across 9 LLMs, and gate CLAUDE.md/AGENTS.md/.mcp.json bloat in PRs.
Alternatives in Security
- Security Fundamentals Pack — Core security skills and practices 1.6k ★
- Rolecraft — The security-first skill manager for AI agents — every install runs a security scan 75 ★
- Cache Audit — A Claude Code skill that audits your setup against the 6 prompt caching rules from Anthropic's engineering tea 58 ★
README
tokendiet-mcp
[](https://glama.ai/mcp/servers/z121245017-ai/tokendiet-mcp) [](./LICENSE) [](./package.json)
**Zero-dependency Open-Core MCP Server, CLI, and GitHub Action** for auditing MCP JSON Schema token weight, simulating multi-turn `O(T^2)` prompt-cache TTL cliffs across 9 LLM pricing tiers, computing cost-minimizing `/compact` checkpoints, and blocking `CLAUDE.md` / `AGENTS.md` / `.cursorrules` / `.mcp.json` bloat in pull requests.
- 100% Local & Offline: Zero external runtime dependencies, zero network telemetry, non-root
node:22-alpinecontainer. - Dual MCP Stdio Framing: Supports both newline-delimited JSON (
NDJSON) andContent-Lengthframing out of the box. - Strict Tool Safety: All 4 tools enforce
additionalProperties: falseand explicit read-only safety annotations (readOnlyHint: true,destructiveHint: false,idempotentHint: true,openWorldHint: false).
Exposed MCP Tools
| Tool Name | Purpose |
|---|---|
audit_mcp_schema_tokens |
Breaks down MCP tools[] or .mcp.json JSON Schema token weight per server and per tool, projects 30-turn cumulative cost, and flags additionalProperties: true, verbose descriptions, and wildcard mounts. |
simulate_agent_session_cost |
Simulates 1..100 turn O(T^2) coding session and monthly spend across 5m / 1h prompt-cache TTLs, idle pause gaps, and mid-session screenshot cache-bust cliffs across 9 LLM pricing tiers (Claude Sonnet 4.5, Claude Opus 4.5, GPT-5, OpenAI o3, Gemini 2.5 Pro, Gemini 2.5 Flash, DeepSeek V3, DeepSeek R1, Qwen-Max). |
find_optimal_compact_turn |
Scans every candidate /compact checkpoint turn (4..T-2) to find the exact turn minimizing total session spend. |
| `audit_instruction_bloat |
Related Skills
Module Aeo Audit
Audit whether your Magento 2 store is visible to ChatGPT, Gemini & Perplexity. One CLI command scores every co
Agent Token Audit
Zero-dependency read-only script to audit Claude Code & Codex token burn, latency, and context bloat
AI Jailbreaks
AI jailbreaks: 35 paste-ready AI jailbreak prompts for 25+ frontier and open-weight LLMs - system prompts, per
Cloux SEO
Extension WordPress SEO complète : audit technique, Schema.org JSON-LD, GEO/AEO (llms.txt, robots.txt agents I
Claude Rank
SEO/GEO/AEO audit plugin — tells you why AI won't cite your site, then auto-fixes robots.txt, sitemap.xml, llm
MCP Skills Vault
Offline security check for MCP server configs (.mcp.json, VS Code, Cursor, Claude Code) — GitHub Action, pre-c
Related Agents
Claudehut DB Reviewer
Persistence and data-access performance review — JPA/R2DBC mappings, fetch strategy, transaction boundaries, m
Chain Architect
Combines proven low-severity primitives into high-impact chains (open redirect → OAuth token theft, self-XSS +
Grok Agent 01
ONLY job: find free or freemium AI token/API plans (OpenAI-compatible, Anthropic, Google, open routers, studen