Codebase Index MCP server
io.github.MikeRecognex/mcp-codebase-index·v0.2.2·61 starsStructural codebase indexer with 17 query tools. 87% token reduction. Zero dependencies.
61 stars68 downloads/wk
Reviews
Write oneNobody has reviewed Codebase Index yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Codebase Index tools (17)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
find_symbolFind where a symbol (function, method, class) is defined. Returns file path, line number, and type.
get_call_chainFind the shortest dependency path between two symbols (BFS through the dependency graph).
get_change_impactAnalyze the impact of changing a symbol. Returns direct dependents and transitive (cascading) dependents.
get_class_sourceGet the full source code of a class by name. Uses the symbol table to locate the file automatically.
get_classesList all classes (with name, lines, methods, bases, file). Filter to a specific file or get all project classes.
get_dependenciesWhat does this symbol call/use? Returns list of symbols referenced by the named function or class.
get_dependentsWhat calls/uses this symbol? Returns list of symbols that reference the named function or class.
get_file_dependenciesList files that this file imports from (file-level import graph).
get_file_dependentsList files that import from this file (reverse import graph).
get_function_sourceGet the full source code of a function or method by name. Uses the symbol table to locate the file automatically.
get_functionsList all functions (with name, lines, params, file). Filter to a specific file or get all project functions.
get_importsList all imports (with module, names, line). Filter to a specific file or get all project imports.
get_project_summaryHigh-level overview of the project: file count, packages, top classes/functions.
get_structure_summaryStructure summary for a file (functions, classes, imports, line counts) or the whole project if no file specified.
list_filesList indexed files. Optional glob pattern to filter (e.g. '*.py', 'src/**/*.ts').
reindexRe-index the entire project. Use after making significant file changes to refresh the structural index.
search_codebaseRegex search across all indexed files. Returns up to 100 matches with file, line number, and content.
Public scan report
scanner v0.1.10 · 2026-09-28 · same rubric, same numbers if you re-run it
- Code scan12 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitylocal package, no credentials required12/15
- Maintenancelast push 213 days ago4/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How Codebase Index compares
Against every graded MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 75/100
- higher than 45% of 48,255 servers
- Tools
- 17
- the typical server has 7
- Tools that change things
- 0%
- typical: 0%. Fewer write tools means less an agent can break
- GitHub stars
- 61
- more than 95% of 28,688 servers
- Downloads a week
- 68
- more than 53% of 12,191 servers with a package
What its tools let an agent do: 17 read
Install Codebase Index in Claude Code, Cursor or VS Code
claude mcp add mcp-codebase-index -- uvx mcp-codebase-index
What the publisher says
From the Codebase Index repository's README, as published. We do not edit it. Read it on GitHub
<!-- mcp-name: io.github.MikeRecognex/mcp-codebase-index -->
mcp-codebase-index
A structural codebase indexer with an MCP server for AI-assisted development. Zero runtime dependencies — uses Python's ast module for Python analysis and regex-based parsing for TypeScript/JS, Go, Rust, and C#. Requires Python 3.11+.
What It Does
Indexes codebases by parsing source files into structural metadata -- functions, classes, imports, dependency graphs, and cross-file call chains -- then exposes 18 query tools via the Model Context Protocol, enabling Claude Code and other MCP clients to navigate codebases efficiently without reading entire files.
Automatic incremental re-indexing: In git repositories, the index stays up to date automatically. Before every query, the server checks git diff and git status (~1-2ms). If files changed, only those files are re-parsed and the dependency graph is rebuilt. No need to manually call reindex after edits, branch switches, or pulls.
Persistent disk cache: The index is saved to a pickle cache file (.codebase-index-cache.pkl) after every build. On subsequent server starts, the cache is loaded and validated against the current git HEAD — if the ref matches, startup is instant. If a small number of files changed (≤20), the cached index is loaded and incrementally updated instead of rebuilt from scratch. This eliminates the cold-start penalty when restarting Claude Code sessions, restarting the MCP server, or resuming work after context compaction.
Language Support
Installation
pip install "mcp-codebase-index[mcp]"The [mcp] extra includes the MCP server dependency. Omit it if you only need the programmatic API.
For development (from a local clone):
pip install -e ".[dev,mcp]"MCP Server
Running
# As a console script
PROJECT_ROOT=/path/to/project mcp-codebase-index
# As a Python module
PROJECT_ROOT=/path/to/project python -m mcp_codebase_index.serverPROJECT_ROOT specifies which directory to index. Defaults to the current working directory.
Persistent Cache
In git repositories, the server automatically caches the index to .codebase-index-cache.pkl in the project root. On startup:
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Codebase Index: common questions
- Is Codebase Index MCP server safe?
- Mostly: it is graded B (75/100). Read the Codebase Index safety report
- How do I install Codebase Index?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Codebase Index need an API key?
- Not as far as the registry entry and our scan can tell: no credentials are declared or required.
- Is Codebase Index maintained?
- The last commit was 249 days ago (2026-02-28). The latest release is v0.2.2.
- What can I use instead of Codebase Index?
- Servers from other publishers that do the same job: Codebase Memory MCP server.
- How does Codebase Index compare with other MCP servers?
- safety score 75/100 (higher than 45% of 48,255 servers); tools 17 (the typical server has 7); tools that change things 0% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.
Alternatives to Codebase Index
Same job from other publishers: the closest match first, then the best rated.
- Codebase MemoryCodebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.not reviewedWidely usedC