repo-context-mcp

MCP.Pizza Chef: nduc99911

This server helps your AI coding assistants understand your code repository without overwhelming them with everything. It creates a clear map of your project files, lets you quickly search code snippets, and builds focused markdown summaries that fit token limits. It works locally with apps like Claude Desktop, Cursor, and Cline, requiring no cloud or API keys. Setup involves adding a simple config or running a command, making it easy to integrate into your existing AI tools.

Coding
Other

Use This MCP server To

Map my code repository structure for AI understanding Search for specific code snippets in my project Create a focused summary of key repo files for AI prompts Integrate repo context into Claude Desktop or Cursor Avoid overwhelming my AI with irrelevant files Get entrypoints and manifest files highlighted Generate markdown packs to review or share code context

README

repo-context-mcp

MCP server that helps AI coding agents understand a repository — without dumping the entire monorepo into the prompt.

CI License: MIT Node.js >= 18 MCP

Works with Codex, Claude Code, Cursor, Cline, and any client that speaks Model Context Protocol.

Why

AI agents waste tokens re-walking node_modules, missing entrypoints, or pasting random files. repo-context-mcp exposes three focused tools:

Tool Purpose
repo_map Lightweight tree + manifests/entrypoints
search_code Fast substring search with path:line hits
pack_context Token-budgeted markdown pack for LLM prompts

Local-only. No cloud. No telemetry. Stdio transport.

Install

# run from source
git clone https://github.com/nduc99911/repo-context-mcp.git
cd repo-context-mcp
npm install
npm run build

# or via npx (after publish)
npx -y repo-context-mcp

Requires Node.js 18+.

CLI (no MCP client)

npm run build

# repository map
node dist/cli.js map .
node dist/cli.js map examples/sample-repo

# search
node dist/cli.js search login examples/sample-repo

# token-aware pack
node dist/cli.js pack . --focus auth,api --max-tokens 8000

# JSON for scripts / CI
node dist/cli.js map . --json
node dist/cli.js pack . --focus src --json

After global install / npx:

repo-context-mcp FAQ

Can I use this to help my AI assistant understand my code repository?
Yes — it organizes your repo into a clear map, searches code, and creates focused context packs for AI coding agents.
Can I use this with Claude Desktop or Cursor?
Yes — it works with Claude Desktop, Cursor, Cline, and any app supporting the Model Context Protocol.
Do I need an API key or special account to use this?
No — it runs locally without requiring any API keys or cloud accounts.
How hard is it to set up repo-context-mcp?
Setup is copy-paste-config level — you add a small config snippet or run a simple command like npx.
Does it upload my code to the cloud?
No — it runs entirely on your computer and does not send your code anywhere.
Can I search for specific code snippets in my repo using this?
Yes — it provides fast substring search with file and line results.
Can I get a summarized markdown pack of important files for my AI?
Yes — it creates token-budgeted markdown packs focused on key parts of your repo.