Doorman11991

Model-agnostic code memory MCP server. Budget-aware graph retrieval for AI agents. Sub-millisecond queries, token budgeting, deterministic results. Built on CodeGraphContext.

11
1
85% credibility
Found May 19, 2026 at 14 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
TypeScript
AI Summary

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

1
💬 You hear about smarter code context

A colleague mentions that AI coding assistants often waste context on irrelevant code, and there's a tool that fixes this.

2
📦 You install it in one line

A single install command sets everything up, and the tool automatically detects your coding assistant and configures itself.

3
🔍 Your codebase gets mapped

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.

4
Your AI assistant now has superpowers
🎯
Budget-aware retrieval

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.

📊
Spending tracker

After several queries, you can ask 'how much context have I used?' and get a clear answer with percentages.

⚠️
Reality check

Before generating code, you can ask 'is this task doable?' and get an instant answer about whether the symbols exist.

5
🔗 Change impact becomes clear

Before modifying a file, you can ask 'what else depends on this?' and see a complete blast radius of affected code.

6
🧠 Decisions get remembered

You save important decisions, tricky gotchas, and coding conventions so future sessions know the project history.

Everything just works better

Your AI assistant generates accurate code, stays within budget, and never hallucinates about symbols that don't exist.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 14 to 11 stars Sign Up Free
Repurpose This Repo

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 Repurpose
AI-Generated Review

What is budget-aware-mcp?

budget-aware-mcp is a TypeScript-based MCP server that gives AI coding agents a memory layer for your codebase. Instead of dumping thousands of tokens of irrelevant code into context, it walks a symbol graph outward from your anchor point until it hits your token budget exactly. Built on CodeGraphContext for tree-sitter parsing across 155 languages, it runs without embeddings, vector databases, or API keys.

The core problem it solves: agents ask for context and get flooded with everything, leading to context overflow, hallucinations, and wasted money. budget-aware-mcp flips this with budget-aware retrieval. You say "give me context for AuthService, max 8000 tokens" and you get exactly 8000 tokens of the most structurally-connected code.

Why is it gaining traction?

The hook is token budgeting per query combined with deterministic results. Every other code retrieval tool returns variable amounts based on keyword relevance. This one respects your budget and returns the same results for the same query every time.

The session token accounting is a standout feature. Agents can ask "how much context have I consumed?" and get a running total. This lets them make informed decisions about whether they need more context before generating code.

The scope check tool answers "is this task doable?" without calling any LLM. It extracts symbol names from your task description and checks which exist in the graph. If PaymentProcessor doesn't exist, the agent knows before it hallucinates code.

Who should use this?

AI coding agent power users who want precise context control. Claude Code, Cursor, and VS Code users who install via the auto-config command. Developers working with large codebases where naive context retrieval causes hallucinations or context overflow. Teams building custom agents that need to track and budget token consumption across sessions.

Verdict

budget-aware-mcp solves a real problem with a thoughtful approach, but at 11 stars it is early-stage software. The feature set is compelling and the 0.85 credibility score reflects solid engineering, but test coverage and documentation need growth before production deployment. Worth trying in a non-critical project to evaluate whether the token budgeting and deterministic retrieval fit your agent workflow.

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.