I built a small open source tool for a problem I kept running into with coding agents using MCP:
tool surface area quietly becomes context debt.
Connect enough MCP servers and the tool definitions alone can consume thousands of tokens before the agent starts the actual task. Then tool responses create a second layer of context pressure.
MCP Context Budget treats that like build infrastructure instead of a runtime surprise.
It can:
scan MCP tool definitions
estimate schema-token and response-token cost separately
select a smaller task-relevant tool set
write a budget lockfile
fail CI when the MCP surface regresses
It is local-first, MIT licensed, and has a dependency-free core. No hosted service, no proxy, nothing leaves your machine.
The goal is not to replace MCP gateways, routing layers, or tool search. It is a measurement/enforcement layer so teams can see when their MCP context footprint changed before the agent starts burning context mid-task.
Curious how others are handling MCP context budgets today: manual pruning, gateways, per-task configs, dynamic routing, or just letting the client load everything?

Top comments (0)