MCP server that helps AI coding agents understand a repository — without dumping the entire monorepo into the prompt.
Works with Codex, Claude Code, Cursor, Cline, and any client that speaks Model Context Protocol.
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.
# 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-mcpRequires Node.js 18+.
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 --jsonAfter global install / npx: