repomcp
Generates Hermes harness configuration for exposing repository-derived MCP tools over stdio.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
repomcp
Universal repo-to-MCP bridge: introspect a repository, expose guarded MCP tools over stdio, generate multi-harness configs (Pi, OMP, Hermes, cc-switch, Claude Code, Kilo Code, Roo Code, Cursor, Cline, OpenCode), normalize embeddings for code indexers, and adapt tool-calling for Chinese providers and raw local checkpoints.
Install
bunx @kanchingyg/repomcp init --target all
npx @kanchingyg/repomcp init --target all
# or install in your project / globally
bun add -d @kanchingyg/repomcp
npm i -D @kanchingyg/repomcpJSR:
bunx jsr add @kanchingyg/repomcp
npx jsr add @kanchingyg/repomcpRelated MCP server: AI Knowledge Center MCP
Quick start
bunx @kanchingyg/repomcp init --target all
npx @kanchingyg/repomcp --mcp
npx @kanchingyg/repomcp embed --port 11435Architecture
+--------+ +-------------+ +------------------+
| repo |--->| introspect |--->| MCP tools (stdio)|
+--------+ +-------------+ +------------------+
| | |
v v v
+--------+ +-------------+ +------------------+
| harness| | dirty-parser| | embed normalizer |
| configs| | checkpoints | | (Kilo/Roo dims) |
+--------+ +-------------+ +------------------+
| | |
v v v
Pi OMP Hermes Chinese providers LanceDB/Qdrant
Cursor Kilo raw checkpoint EOSFlags
Flag | Purpose |
| Run stdio MCP server (stdout JSON-RPC guard enabled) |
| Enable mutating tools (read-only by default) |
| Simulate tool calls without side effects |
Programmatic API
The package exports the runtime from repomcp, repomcp/bridge, and repomcp/runtime (also available on JSR as @kanchingyg/repomcp): MCP server, harness generators, provider/checkpoint helpers, dirty tool-call parser, and embedding normalizer.
MCP Tools Reference
Tool | Mutates | Description |
|
| Inspect repository git status, tracked languages, and detected scripts. |
|
| Run a package.json, Cargo, or Makefile script inside the workspace (requires |
|
| Search repository source files with context-window budget truncation. |
Editor and Agent Integration
Cursor (.cursor/mcp.json)
{
"mcpServers": {
"repomcp": {
"command": "npx",
"args": ["-y", "@kanchingyg/repomcp", "--mcp"]
}
}
}Claude Code CLI
claude mcp add repomcp -- npx -y @kanchingyg/repomcp --mcpProgrammatic Usage (JSR / TypeScript)
import * as bridge from "jsr:@kanchingyg/repomcp/bridge";Runtime Safety and Guardrails
Stdio frame isolation: When
--mcpis active,hijackStdoutForMcp()redirects accidentalconsole.logcalls tostderrso JSON-RPC 2.0 frames onstdoutnever corrupt.Read-only by default: Mutating tools (
mutates: true) are blocked in--dry-runmode and require explicit--allow-writeauthorization.Loop breaker: Repeated identical
(toolName, args)invocations are hashed with SHA-256 and halted after 3 consecutive repeats to prevent runaway agent loops.Context budget truncation: Tool outputs are middle-truncated (
60%head /40%tail) scaled to the probed local modeln_ctx(Ollama/api/show, llama.cpp/props, vLLM/v1/models).Secret redaction and path normalization: AWS keys (
AKIA*,ASIA*), bearer tokens, andsk-*keys are scrubbed before returning tool output, and Windows drive paths (C:\...) translate cleanly to/mnt/c/...when WSL mode is enabled.
License
This server cannot be deployed
Maintenance
Related MCP Connectors
Repository knowledge graph MCP server for codebase understanding and debugging.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
MCP server for StyleKit styles, tokens, recipes, lint and repair over stdio or HTTP.
Ovanek MCP: Model Context Protocol server for Ovanek platform tools; writes are dry-run by default.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceExposes Language Server Protocol (LSP) tools such as diagnostics, goto definition, find references, symbols, and rename as a stdio MCP server.8MIT
- AlicenseNot gradedqualityCmaintenanceLocal-first MCP server that provides project context, verification gates, and structured tools for coding agents to discover knowledge, run diagnostics, and execute allowlisted commands within a repository.10 npmMIT
- AlicenseAqualityCmaintenanceA read-only MCP server that lets AI assistants inspect local workspace files, search context, view git diffs, and fetch a fixed GitHub profile, all within a sandboxed stdio transport.5ISC
- AlicenseNot gradedqualityAmaintenanceServes a repository's code knowledge graph over stdio (MCP) so coding agents can look up symbols, trace callers and callees, compute blast radius, list file symbols, run hybrid lexical-plus-graph search, and get citation-grounded answers from file:line evidence instead of guessing from text chunks. All tools work offline straight from the graph, with prose synthesis only when an OpenAI-compatible LLM endpoint is configured.15MIT