Directory · Hooks
Token Optimizer MCP
Hooks, proxy and MCP server that compress context to cut token costs for Claude Code, Codex, Copilot, Gemini and other agents.
★ 577 stars · last updated 2026-11-11 · Free, open source · View on GitHub
Best for
- Reducing token spend in long Claude Code sessions
- Compressing tool output like logs, grep results and search results
- Teams wanting a local ledger of per-agent token savings
- Comparing compression approaches with reproducible benchmarks
Our take
MIT-licensed Node.js (22.14+) package published on npm as @ooples/token-optimizer-mcp, with hooks, a proxy mode and MCP tools, plus a local dashboard. It optimizes for prompt-cache billing rather than raw bytes removed, and the README includes extensive reproducible benchmarks against an unnamed alternative, including rows where that alternative wins. The truncated README did not show an install command, and the roughly 30% cost reduction claim comes from the project's own measurements.
Similar hooks
- Claude Code Ultimate Guide: Large open guide to Claude Code covering agent workflows, hooks, skills, MCP, security, and team adoption, with reusable templates.
- dcg (Destructive Command Guard): Rust pre-execution hook that blocks destructive shell, git, filesystem, database, and cloud commands run by AI coding agents.
- Claude Code Showcase: Example Claude Code project config with hooks, skills, agents, slash commands, MCP setup, and GitHub Actions workflows to copy from.
- Claude Code Hooks Mastery: Reference project implementing all 13 Claude Code hook events as UV Python scripts, plus sub-agents, status lines, and output styles.
- Continuous Claude v3: Hooks, skills, and agents that keep Claude Code context across sessions via YAML handoffs, ledgers, and a PostgreSQL memory store.
- Build with Claude: Plugin marketplace and discovery hub of agents, commands, hooks, and skills for Claude Code users extending their workflows.