
Ai Optimizer
If your AI coding agent is burning tokens reading generated files, build artifacts, and node_modules every session, this intercepts MCP file operations and strips framework noise before it hits the model. It registers optimized_read_file, optimized_list_files, optimized_grep, and optimized_diagnostics tools that apply framework-aware ignore rules (Python, JS/TS included, with paid packs for React, Flutter, Go, and others). Works with Claude Code, Cursor, Cline, Continue, and anything else speaking stdio MCP. The core is MIT licensed with automatic detection via pyproject.toml or package.json. Pro tier adds LSP integration for read_symbol and history compaction. Install globally with npm, point your agent's config at the ai-optimizer command, and it claims 60-80% token reduction on typical sessions.
- tools
- 7
- auth
- Secret needed
- transport
- STDIO
- env vars
- 3
- last updated
- Jun 6, 2026
Tools
7 toolsPublic tool metadata for what this MCP can expose to an agent.
optimized_read_fileFramework-aware skip + optional line slice
Framework-aware skip + optional line slice
No parameter schema in public metadata yet.
optimized_list_filesWalks the tree applying ignore globs (+ `.gitignore`)
Walks the tree applying ignore globs (+ `.gitignore`)
No parameter schema in public metadata yet.
optimized_grepContent search scoped by ignore filters
Content search scoped by ignore filters
No parameter schema in public metadata yet.
optimized_diagnosticsSpawns the right LSP, returns errors + a narrow code window
Spawns the right LSP, returns errors + a narrow code window
No parameter schema in public metadata yet.
read_symbolLSP `workspace/symbol` slice instead of a full-file read (Pro/LSP)
LSP `workspace/symbol` slice instead of a full-file read (Pro/LSP)
No parameter schema in public metadata yet.
strip_bash_noiseStrips ANSI, npm/maven/gradle progress, JVM warnings
Strips ANSI, npm/maven/gradle progress, JVM warnings
No parameter schema in public metadata yet.
optimizer_statusDetected frameworks, active packs, cumulative tokens saved
Detected frameworks, active packs, cumulative tokens saved
No parameter schema in public metadata yet.
Sponsors
Configuration
AI_OPTIMIZER_LICENSEsecretEd25519 JWT license key. Unlocks Pro/Team packs; free tier needs no key.
AI_OPTIMIZER_LSPSet to 0 to disable the LSP bridge (optimized_diagnostics).
AI_OPTIMIZER_TELEMETRYSet to 'on' to enable anonymous opt-in telemetry. Off by default.
Readme
AI Token Optimizer
An MCP server that cuts AI coding-agent token usage by 60–80% via framework-aware context optimization.
AI coding agents read whole files when they need 15 lines. They load *.g.dart,
R.java, node_modules/, and dist/ into context — then do it again next turn.
AI Token Optimizer is a Model Context Protocol
server that intercepts those tool calls and strips framework noise before it
reaches the model.
Details
- Repository
- github.com/shivam-app-developers/ai-optimizer
- Category
- AI & LLM Tools
- Package
@ai-optimizer/core- Transport
- STDIO
- Auth
- Required
- Registry
- MCP registry, active