MCP Codebase Index logo

MCP Codebase Index

by MikeRecognex

Indexes Python, TypeScript, Go, Rust, C#, and text codebases for structural queries over MCP.

Install MCP Codebase Index

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "mikerecognex-mcp-codebase-index": {
      "command": "uvx",
      "args": [
        "openclaw-mcp-adapter"
      ],
      "env": {
        "PROJECT_ROOT": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

uvx openclaw-mcp-adapter

Process exited before answering initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

MikeRecognex/mcp-codebase-index indexes a project and exposes structural code navigation through MCP tools. It extracts symbols, imports, source, dependencies, dependents, call chains, and change impact, with language-specific parsing for Python and regex-based parsing for several other languages. Git repositories receive automatic incremental updates, while a disk cache can reduce startup work. Reach for it when an agent needs targeted codebase navigation instead of repeatedly reading entire files.

Use cases

  • Find symbol definitions across a repository
  • Trace callers and dependencies before changing code
  • Inspect class or function source without reading whole files
  • Measure the impact of a proposed code change
  • Search indexed files with regular expressions

Key features

  • Structural indexing for multiple programming languages
  • Function, class, import, and symbol queries
  • Dependency, dependent, and call-chain analysis
  • Automatic incremental Git re-indexing
  • Persistent on-disk index cache
  • Regex code search with capped results

Tools18

What MCP Codebase Index lets your agent do. Expand a tool for its parameters.

Self-reported~257 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

36/36 checks healthy over the last 113d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 8d ago via OSV.dev · openclaw-mcp-adapter (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars63Stargazers on the source repository.
Last commit9mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed18Callable tools this server registers over MCP.

How MCP Codebase Index works

What MikeRecognex/mcp-codebase-index does

MikeRecognex/mcp-codebase-index turns a local project into a queryable structural index for MCP clients. It can report project and file structure, locate symbol definitions, return the source for functions or classes, inspect imports, and trace relationships between symbols or files.

The index supports Python files through the Python AST. TypeScript and JavaScript, Go, Rust, and C# are parsed with regular expressions and language-specific patterns. Markdown and text files are indexed by headings, while unsupported file types receive line-count metadata.

The tool set covers project summaries, file listing, structure inspection, functions, classes, imports, symbol lookup, source retrieval, dependency and dependent analysis, call-chain discovery, regex search, file-level relationships, reindexing, and session usage statistics. Search results are limited to 100 matches.

How it works

The server indexes the directory selected by PROJECT_ROOT and serves queries over MCP. In a Git repository, it checks repository changes before queries and reparses only modified files when possible. This incremental behavior also rebuilds the dependency graph after changes, including edits, branch switches, and pulls.

MikeRecognex/mcp-codebase-index stores the generated index in .codebase-index-cache.pkl at the project root. On startup, it can reuse the cache when the Git revision is unchanged. For a cache with 20 or fewer changed files, it loads the existing data and applies an incremental update; larger changes or a missing cache trigger a full rebuild.

Setup and configuration

Install the MCP-enabled package with:

Terminal
pip install "mcp-codebase-index[mcp]"

The server can run as a console command:

bash
PROJECT_ROOT=/path/to/project mcp-codebase-index

It can also run as a Python module:

bash
PROJECT_ROOT=/path/to/project python -m mcp_codebase_index.server

PROJECT_ROOT selects the directory to index and defaults to the current working directory when omitted. Claude Code can start it from a project .mcp.json, either through the installed command or a Python executable and module path.

Add .codebase-index-cache.pkl to the project’s .gitignore, because the cache is a local build artifact rather than source data.

Limitations and notes

Parsing depth depends on the language. Python receives AST-based analysis, whereas TypeScript/JavaScript, Go, Rust, and C# use regular-expression parsing, so extracted structures may not have the same coverage as Python. Other file types are represented only with line counts, except Markdown and text files where headings are recognized.

The server has no runtime dependencies according to the project description, but the MCP installation extra installs the MCP server dependency. Python 3.11 or newer is required.

OpenClaw’s documented default integration may start a new process for each tool call, which loses the in-memory index and can cause repeated startup work. Automatic change checks add approximately 1–2 ms before a query in Git repositories.

MikeRecognex/mcp-codebase-index is intended for structural navigation and targeted retrieval. It does not replace direct reading of configuration, frontmatter, or other content that its indexed representations do not expose.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about MCP Codebase Index

MikeRecognex/mcp-codebase-index is an MCP server that connects AI clients to a local codebase index. Its main tools summarize projects, list files, find symbols, retrieve function or class source, inspect imports, search code, and analyze dependencies, dependents, call chains, and change impact across supported languages.

Install it with `pip install "mcp-codebase-index[mcp]"`. Run the `mcp-codebase-index` command or `python -m mcp_codebase_index.server`, and set `PROJECT_ROOT` to the directory that should be indexed.

Yes, MikeRecognex/mcp-codebase-index works with Claude Code through a project `.mcp.json` configuration. The README provides both a console-command setup and a Python-module setup, with `PROJECT_ROOT` identifying the target project.

It checks Git changes before queries and incrementally reparses changed files when running inside a Git repository. It also stores a cache on disk and can reuse it when the Git revision is unchanged or when no more than 20 files changed.

It indexes Python, TypeScript, JavaScript, Go, Rust, C#, Markdown, and text files. Python uses AST parsing; the programming languages other than Python use regex-based parsing, while Markdown and text files are analyzed for headings.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewMCP Codebase Index AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mikerecognex-mcp-codebase-index?style=directory)](https://allmcps.com/mcp/mikerecognex-mcp-codebase-index)
HTML Embed
<a href="https://allmcps.com/mcp/mikerecognex-mcp-codebase-index"><img src="https://allmcps.com/api/badge/mikerecognex-mcp-codebase-index?style=directory" alt="MCP Codebase Index on AllMCPs" /></a>