gitwtfhub

wtf is budget-aware-mcp?

doorman11991/budget-aware-mcp — explained in plain English

Analysis updated 2026-05-18

19TypeScriptAudience · developerComplexity · 3/5Setup · easy

TL;DR

MCP server that gives AI coding assistants budget-aware code context by walking call and import graphs from an anchor symbol until a token limit is hit, backed by SQLite and tree-sitter.

Mindmap

mindmap
  root((budget-aware-mcp))
    Inputs
      Repo path
      Anchor symbol
      Token budget
    Outputs
      Scoped context
      Call paths
      Impact reports
    Use Cases
      Index a repo for an agent
      Walk graph around a function
      Trace call paths between symbols
      Find dead code
    Tech Stack
      TypeScript
      MCP
      SQLite
      tree-sitter
      CodeGraphContext

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Give Claude Code or Cursor scoped context around a symbol instead of dumping whole files

REASON 2

Trace the call path between two functions across a 155-language codebase

REASON 3

Estimate the blast radius of a refactor before making any LLM call

REASON 4

Find dead code and fuzzy-match symbols across a large repo

What's in the stack?

TypeScriptMCPSQLitetree-sitter

How it stacks up

doorman11991/budget-aware-mcpavacocloud/avaco-denoerickrouss/not-twitter
Stars191919
LanguageTypeScriptTypeScriptTypeScript
Setup difficultyeasymoderatemoderate
Complexity3/53/53/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · easy Time to first run · 5min

Single npm install -g plus a one-shot install command that auto-configures Claude Code, Cursor, VS Code, and other clients.

Wtf does this do

budget-aware-mcp is an MCP server, which is a small program that an AI coding assistant talks to in order to fetch information about a codebase. This one is meant to be a model-agnostic code memory tool: the assistant can ask it questions about your source code and get back a small, structured answer instead of being flooded with raw files. The author builds it on top of an existing project called CodeGraphContext, which already knows how to parse 155 languages using tree-sitter, and replaces the retrieval layer with what they call budget-aware graph walks. The argument for the project is that most code-memory tools just dump everything they find, which fills up the assistant's context window and leads to hallucinations or wasted spend. Here, the agent asks for context around a symbol with a token budget, for example 8000 tokens around AuthService, and the server walks outward from that symbol along real call and import edges, stopping the moment the budget is reached. No embeddings or vector database is used, and there are no API keys to set up. The data is kept in SQLite. The server exposes 22 tools grouped into indexing, retrieval, discovery, context, and management. Examples include index_repo to parse and index a project, graph_walk for hop-limited walks from an anchor symbol, check_scope to ask if a task is feasible without making any LLM call, trace_call_path between two symbols, analyze_impact to estimate the blast radius of a change, fuzzy_find_symbol, find_dead_code, and get_session_stats for cumulative token accounting. Installation is npm install -g budget-aware-mcp followed by budget-aware-mcp install, which auto-configures Kiro, Claude Code, Cursor, VS Code, Windsurf, Zed, Codex CLI, Gemini CLI, Aider, and OpenCode.

Yoink these prompts

Prompt 1
Install budget-aware-mcp and wire it into Claude Code so I can ask for 8000 tokens of context around AuthService
Prompt 2
Use graph_walk to show me everything that touches the login function within 3 hops
Prompt 3
Run analyze_impact on the User model and tell me which files would need tests if I rename a field
Prompt 4
Index this repo with index_repo and then call check_scope to see if refactoring the payment module fits in a 30k token budget
Prompt 5
Run find_dead_code on src/ and list unused exports grouped by file

Frequently asked questions

wtf is budget-aware-mcp?

MCP server that gives AI coding assistants budget-aware code context by walking call and import graphs from an anchor symbol until a token limit is hit, backed by SQLite and tree-sitter.

What language is budget-aware-mcp written in?

Mainly TypeScript. The stack also includes TypeScript, MCP, SQLite.

How hard is budget-aware-mcp to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is budget-aware-mcp for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.