loading…
Search for a command to run...
loading…
A generic MCP server that exposes local repository checkouts, allowing users to search and read code and documentation through natural language. It supports mul
A generic MCP server that exposes local repository checkouts, allowing users to search and read code and documentation through natural language. It supports multiple instances, enabling seamless interaction with various codebases via configurable tool prefixes and URI schemes.
Generic MCP stdio server that exposes a local repository checkout (docs + code) to any MCP host.
Designed for the “one codebase, many instances” workflow:
Given MCP_TOOL_PREFIX=telegraph, tools are:
telegraph_read_repo_file — read any text file from the repo checkouttelegraph_list_docs — list doc pages as slug -> docs/... (slug is inferred from the docs file path)telegraph_get_doc — read a doc page by slugtelegraph_search_docs — search inside the docs directorytelegraph_search_code — search inside common code directoriestelegraph_refresh_index — rebuild the docs indextelegraph_git_fetch — git fetch --prune --tags for the repo (optional helper)telegraph_info — print server settings (paths, prefixes, etc.)Given MCP_URI_SCHEME=telegraph, resources are:
telegraph://readmetelegraph://contributingtelegraph://doc/{slug}{prefix}_doc_writer — starter workflow for “write a guide / answer about this repo”.bun install
bun run build
MCP_REPO_ROOT=/ABS/PATH/to/repo \
MCP_TOOL_PREFIX=myrepo \
MCP_URI_SCHEME=myrepo \
bun run start
In stdio mode, logs go to stderr on purpose (stdout is reserved for MCP JSON-RPC).
Required:
MCP_REPO_ROOT — absolute path to the local repo checkoutOptional:
MCP_TOOL_PREFIX — tool name prefix (default: repo)MCP_URI_SCHEME — resource URI scheme (default: derived from tool prefix)MCP_REPO_LABEL — text label used in the prompt (default: basename of repo root)MCP_DOCS_DIR — docs directory relative to repo root (default: docs)MCP_DOCS_DISCOVERY_DEPTH — if > 0 and MCP_DOCS_DIR is a plain folder name, auto-discovers matching docs dirs up to this depth (default: 3)MCP_DOCS_EXTS — comma-separated docs extensions (default: .md,.mdx)MCP_CODE_DIRS — comma-separated dirs to search for code (default: src,config,routes,database,resources,tests)MCP_CODE_EXTS — comma-separated extensions for code search (default: .php,.md,.json,.yml,.yaml,.xml,.ts,.js)Limits:
MCP_MAX_FILE_BYTES (default: 512KB)MCP_DEFAULT_MAX_CHARS (default: 50k chars)Git helper:
MCP_GIT_AUTO_FETCH=1 — run git fetch --prune --tags once at server start (default: off)MCP_GIT_FETCH_TIMEOUT_MS — timeout for the fetch command (default: 30000)Compatibility:
MCP_REPO_ROOT is not set, the server will fall back to MCP_TELEGRAPH_ROOT (legacy name).Add this to ~/.codex/config.toml:
[mcp_servers.telegraph_docs]
command = "/ABS/PATH/TO/bun"
cwd = "/ABS/PATH/TO/mcp"
args = ["run", "build/index.js"]
[mcp_servers.telegraph_docs.env]
MCP_REPO_ROOT = "/ABS/PATH/TO/telegraph"
MCP_TOOL_PREFIX = "telegraph"
MCP_URI_SCHEME = "telegraph"
MCP_REPO_LABEL = "defstudio/telegraph"
[mcp_servers.laravel_data_docs]
command = "/ABS/PATH/TO/bun"
cwd = "/ABS/PATH/TO/mcp"
args = ["run", "build/index.js"]
[mcp_servers.laravel_data_docs.env]
MCP_REPO_ROOT = "/ABS/PATH/TO/laravel-data"
MCP_TOOL_PREFIX = "laravel_data"
MCP_URI_SCHEME = "laravel-data"
MCP_REPO_LABEL = "spatie/laravel-data"
See claude_desktop_config.example.json.
01., 01-, 01_ are stripped).index.md inside a folder, the slug is the folder name (e.g. guide/index.md → guide).MCP_DOCS_DISCOVERY_DEPTH > 0, nested docs like packages/*/docs are indexed too, and their slugs get a prefix (e.g. packages/actions/...).Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"repo-docs-mcp": {
"command": "npx",
"args": []
}
}
}