How RepoMesh works · Model Context Protocol

MCP repository context for AI coding agents

RepoMesh is a local-first context and intelligence layer between your software repository and compatible AI coding agents. It is not a coding assistant: your agent still reasons, edits files and runs tests. RepoMesh gives it a focused, reusable map of the codebase.

Why do coding agents keep reading the same files?

When each agent session starts without durable repository context, it may explore directories, inspect imports and rediscover where features live. That exploration can crowd out the task itself. RepoMesh indexes the repository once and makes information available through MCP tools so connected agents can request the files and symbols that matter.

1. Index the repository locally

RepoMesh discovers source files, symbols, import relationships, routes, tests and supported SQL migrations. Its repository index is reused across sessions and checked for freshness.

2. Connect an MCP-compatible client

Configure Claude Code, OpenAI Codex, Cursor or OpenCode to start the local RepoMesh MCP server. The repository remains on your machine; RepoMesh does not require an AI API key.

3. Retrieve relevant context

Tools including prepare_task, get_context, search_symbol and find_tests help agents locate likely files, code relationships and test coverage.

Find code faster. Follow what it connects to.

RepoMesh uses the same local index to narrow a coding task to relevant files, then offers optional read-only tools for deeper investigation. Results are evidence to inspect, not a guarantee of complete runtime behavior.

More precise task context

prepare_task and get_context rank matching code, related tests and useful excerpts within explicit context budgets. The response explains relevance and omitted material.

What could this file affect?

analyze_impact traces indexed imports and downstream files, possible tests, and routes. It is conservative structural impact, not proof that anything will break.

Who calls this function?

get_call_graph shows supported direct JavaScript and TypeScript function invocations, definition lines and call sites. It does not resolve dynamic calls or every form of TypeScript expression.

Choose the right MCP tool catalog

Core exposes six everyday tools; Graph adds structural and function-level investigation tools; Full provides the existing expanded catalog. Set REPOMESH_MCP_PROFILE to core, graph, or full in the MCP server environment. Full is the compatibility default. Smaller catalogs do not yet have independently verified end-to-end token savings.

Frequently asked questions

Does RepoMesh replace Cursor, Claude Code or Codex?

No. RepoMesh is repository infrastructure. Coding agents handle reasoning and changes; RepoMesh supplies indexed context over MCP.

Can RepoMesh actually reduce token use?

Yes, in our controlled Claude Code A/B benchmarks, RepoMesh used about 20% fewer provider-reported tokens on a simple fix (18.67% median) and over 30% fewer on two debugging scenarios. These were three matched, tool-assisted pairs per verified scenario; results depend on task and agent, and no fixed reduction is guaranteed. See the benchmark results and methodology.

Is the entire repository copied into every prompt?

No. RepoMesh delivers bounded, task-relevant context rather than dumping the whole repository.

Is RepoMesh cloud-hosted?

The core and MCP server run locally, and repository context is local-first. Public download and update services serve installers; those are separate from your local repository index.

Can multiple AI agents use the same index?

Yes. Multiple compatible clients can connect to the local RepoMesh MCP server and reuse its repository knowledge rather than rebuilding architectural context independently.