gitmyhub

codebase-agent-mcp

Python ★ 1 updated 10d ago

A sub-harness (both an MCP server and an MCP client). Delegates documentation and source code analysis, as well as interactions with related context-providing MCP servers, to a local or inexpensive OpenAI-compatible LLM. Drastically reduces token usage and context size for coding agents on the top-tier LLM.

A tool that offloads codebase reading and searching from your AI coding assistant to a cheaper model, cutting token costs.

PythonMCPQdrantOpenAI-compatible APIsetup: hardcomplexity 4/5

CodebaseAgent-MCP is a tool that sits between an AI coding assistant, such as Claude Code or Codex, and a large codebase it needs to understand. Instead of letting the main AI assistant repeatedly read through an entire project's files and documentation every time it needs an answer, this tool hands that reading and searching work off to a separate, cheaper AI model, and only passes back the specific findings the main assistant actually needs.

The problem it solves is that coding assistants can burn through a large number of tokens, which cost money and slow things down, just re-reading a codebase from scratch in every new session, especially when a project changes often or its documentation is incomplete. By delegating that exploration step to a dedicated model, which can be a free model running on your own computer or a low-cost cloud model, the main assistant spends its budget on actual reasoning and writing code instead.

It connects to your development tool as what is called an MCP server, a standard way for AI tools to plug in extra capabilities, and it can in turn connect to your own local AI model or an inexpensive cloud one to do the actual reading. It also supports an optional add-on for caching previous search results so repeated questions are answered faster, and it can connect to other MCP tools of your choosing for extra context.

The project includes a benchmark comparing a coding task done with and without this tool, showing meaningfully fewer tokens used and lower estimated cost across several AI models when the tool is enabled, though the exact savings depend on which model and provider you use.

This is a technical tool meant for developers who already use AI coding assistants and want to control how much those assistants spend on reading code, rather than for non-technical users. Setup involves installing the tool, configuring it with your chosen AI model, and connecting it to your coding assistant.

Where it fits