MCP Schema Bloat Fixer
Fight the invisible token tax that is killing your AI agents.
Repository: mcp-schema-bloat-fixer
The Problem (explained simply)
Imagine your AI agent is a smart kid trying to do homework. But every time he starts, you force him to read a 200-page phone book of tools first. By the time he finishes reading the phone book, he already forgot the homework question and also spent all his pocket money on “thinking tokens”.
That phone book is the tool schemas coming from MCP servers. Many servers send 40-50% of the entire context window just on tool descriptions.
What This MCP Server Does
It gives your agent (or you) five superpowers:
| Tool | What it does (simple) |
|---|---|
analyze_schema_bloat |
Tells you which tools are the biggest space-wasters |
compress_tool_description |
Makes long tool descriptions short but still clear |
select_relevant_tools |
Picks only the 3-5 tools the agent actually needs right now |
estimate_context_cost |
Shows how many tokens (and dollars) a set of tools will cost |
generate_minimal_schema |
Creates the smallest possible version of a tool schema |
Quick Start
# Install
pip install mcp
# Run (stdio)
python -m src.server
# Or with mcpize (when available)
mcpize run .
Environment
Copy .env.example → .env if you want optional tiktoken for exact counts.
Why This Helps Entrepreneurs
- Save real money on every AI call
- Make your AI products more reliable (agents stop picking wrong tools)
- Ship faster because debugging “why did the agent fail?” becomes easier
License
MIT – build cool stuff with it.
Built as part of the Daily AI Project series for Prevalid.