jDocMunch MCP
Indexes documentation by heading so a coding agent can fetch one section instead of a whole file
Local code search, file discovery and symbol summaries for a repository on your machine
By johnhuang316 (individual) Python Local · stdio Developer tools
62 popularity score ★ 1.0k ↓ 2.9k/mo
Opens the app, which asks before it adds the server.
claude mcp add code-index -- uvx code-index-mcp{
"mcpServers": {
"code-index": {
"command": "uvx",
"args": [
"code-index-mcp"
]
}
}
}{
"mcpServers": {
"code-index": {
"command": "uvx",
"args": [
"code-index-mcp"
]
}
}
}{
"servers": {
"code-index": {
"type": "stdio",
"command": "uvx",
"args": [
"code-index-mcp"
]
}
}
}[mcp_servers.code-index]
command = "uvx"
args = ["code-index-mcp"]gemini mcp add --scope user code-index uvx -- code-index-mcpOpens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.
git clone https://github.com/johnhuang316/code-index-mcp.git
cd code-index-mcp
uv syncclaude mcp add code-index -- uv --directory '<ABSOLUTE_PATH_TO_CLONE>' run code-index-mcp{
"mcpServers": {
"code-index": {
"command": "uv",
"args": [
"--directory",
"<ABSOLUTE_PATH_TO_CLONE>",
"run",
"code-index-mcp"
]
}
}
}{
"mcpServers": {
"code-index": {
"command": "uv",
"args": [
"--directory",
"<ABSOLUTE_PATH_TO_CLONE>",
"run",
"code-index-mcp"
]
}
}
}{
"servers": {
"code-index": {
"type": "stdio",
"command": "uv",
"args": [
"--directory",
"<ABSOLUTE_PATH_TO_CLONE>",
"run",
"code-index-mcp"
]
}
}
}[mcp_servers.code-index]
command = "uv"
args = ["--directory", "<ABSOLUTE_PATH_TO_CLONE>", "run", "code-index-mcp"]gemini mcp add --scope user code-index uv -- --directory '<ABSOLUTE_PATH_TO_CLONE>' run code-index-mcpPROJECT_PATH |
Optional: Folder to index at startup when --project-path is not passed; otherwise call set_project_path. |
|---|---|
FILE_WATCHER_ENABLED |
Optional: true or false to turn automatic index refresh on or off at startup. |
ADDITIONAL_EXCLUDE_PATTERNS |
Optional: Comma-separated directory or file patterns to leave out of the index. |
CODE_INDEX_BUILD_TIMEOUT |
Optional: Deep index build timeout in seconds (positive integer). |
Code Index MCP indexes one local project folder and gives an assistant tools to find files by glob, search the code by text, regex or fuzzy pattern, and summarise a file's functions, classes, imports and complexity. You point it at a repository with the set_project_path tool or the --project-path flag, and it keeps a shallow file list that a file watcher refreshes as files change. A separate deep index, built on request with build_deep_index, parses symbols with tree-sitter for Python, JavaScript, TypeScript, Java, Kotlin, C#, Go, Objective-C, Zig and Rust; other file types are indexed only at file level.
Text search shells out to the best grep-style tool it finds on the machine (ugrep, ripgrep, ag or grep) and falls back to a built-in literal search when none is present. Results are paginated, 10 matches per call by default, adjustable with max_results and start_index.
The v2.17.1 source registers 14 tools, one more than the README's table: get_symbol_body returns the code of a single function, method or class along with its signature, docstring and callers, so an assistant can read one symbol without loading the whole file. The same source also reads four environment variables the README does not document: PROJECT_PATH (used when --project-path is not given), FILE_WATCHER_ENABLED, ADDITIONAL_EXCLUDE_PATTERNS (comma-separated) and CODE_INDEX_BUILD_TIMEOUT (seconds). It also exposes each indexed file as a files:// resource.
| Runtime | Python 3.10+ |
|---|
Python 3.10 or later and uv for the uvx command (pip install code-index-mcp also works and puts a code-index-mcp program on PATH). A local repository to index. Regex and fuzzy search need a native search tool on PATH: ugrep, ripgrep, ag or grep for regex, and ugrep for fuzzy matching. On Windows under Codex CLI, the README says HOME, APPDATA, LOCALAPPDATA and SystemRoot must be passed in the env block for uvx to start.
Symbol-level analysis (get_file_summary, get_symbol_body) needs build_deep_index first; the shallow index the watcher keeps current holds file names only. Only the ten tree-sitter languages get symbol extraction; C, C++, Ruby, PHP, Swift and others are indexed at file level. Without a native search tool, search is literal-only, and fuzzy matching needs ugrep. Unless set, the deep build timeout scales at 0.5 s per file between 30 s and 600 s, with min(4, CPU count) workers (server.py). Indexes go under /tmp/code_indexer unless --indexer-path is given. On macOS the kqueue watcher opens one file descriptor per file, so large projects may need a higher ulimit.
Suits developers who want an assistant to navigate a local codebase (find where something is called, list files of a kind, read one function) without sending the code anywhere, and who are happy installing uv and ideally ripgrep or ugrep. It reads source files but has no tool that edits them, so it pairs with an assistant's own editing tools rather than replacing them. It is a community project, not tied to any vendor. For semantic or embedding-based search, or for projects mostly in languages outside its ten tree-sitter languages, look elsewhere: here those files get plain text search and file listing only.
set_project_pathsearch_code_advancedfind_filesget_file_summaryget_symbol_bodyrefresh_indexbuild_deep_indexget_settings_infocreate_temp_directorycheck_temp_directoryclear_settingsrefresh_search_toolsget_file_watcher_statusconfigure_file_watcher