Doorman11991 / budget-aware-mcp
PublicModel-agnostic code memory MCP server. Budget-aware graph retrieval for AI agents. Sub-millisecond queries, token budgeting, deterministic results. Built on CodeGraphContext.
budget-aware-mcp is an open-source tool that helps AI coding assistants understand code more efficiently. Instead of dumping all found code into context (wasting the context window and money), it walks through code connections hop-by-hop and stops when a token budget is reached. It provides features like per-query token budgets, session-level spending tracking, feasibility checks before code generation, and blast-radius impact analysis. The tool integrates with popular AI coding assistants (Claude Code, Cursor, VS Code, etc.) and supports 155 programming languages for code indexing.
How It Works
A colleague mentions that AI coding assistants often waste context on irrelevant code, and there's a tool that fixes this.
A single install command sets everything up, and the tool automatically detects your coding assistant and configures itself.
The tool reads through your code, building a map of every function, class, and their connections—like a detailed table of contents for your project.
You say 'show me context for AuthService, max 8000 tokens' and get exactly 8000 tokens of the most connected code—not 50,000 tokens of everything.
After several queries, you can ask 'how much context have I used?' and get a clear answer with percentages.
Before generating code, you can ask 'is this task doable?' and get an instant answer about whether the symbols exist.
Before modifying a file, you can ask 'what else depends on this?' and see a complete blast radius of affected code.
You save important decisions, tricky gotchas, and coding conventions so future sessions know the project history.
Your AI assistant generates accurate code, stays within budget, and never hallucinates about symbols that don't exist.
Star Growth
Repurpose is a Pro feature
Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.
Unlock RepurposeSimilar repos coming soon.