Code Index MCP

by @johnhuang316

Code Index MCP Server

Code Index MCP helps assistants search and navigate repositories using file indexes and optional deep symbol analysis. It combines Tree-sitter parsing, native search tools, caching, and filesystem monitoring.

Developer Tools1,003pythonMIT

Server facts

Code Index MCP

GitHub stars

1,003

Last commit

Jul 27, 2026

Runtime

python

License

MIT

Tech

Runtime
pythonPython
Transports
stdio
Remote access
No

Activity

GitHub stars
1,003
Last commit
Data as of

Tags

  • Code Analysis
  • Code Search
  • Indexing
  • Python
  • Tree Sitter

Overview

Code Index MCP provides repository discovery, code search, and structural analysis for AI assistants. A shallow index tracks files for quick navigation, while an explicit deep-index build produces symbol information for more detailed summaries. Specialized Tree-sitter strategies cover ten languages, including Rust, Go, Python, TypeScript, JavaScript, Java, C#, Kotlin, Zig, and Objective-C. Other supported file types use a basic indexing strategy instead of the same level of syntax analysis. The README also lists document, configuration, frontend, database, and build-file coverage.

Search selects among available native utilities such as ugrep, ripgrep, ag, and grep. Matching is literal by default, with optional regex, fuzzy matching, file filters, and result pagination. Regex requires a native search utility because the basic fallback only handles literal matching. A file watcher batches changes and refreshes the shallow index, but updated symbol metadata still requires a deep rebuild. Persistent caching and build-directory filtering support repeated work on larger repositories. Setup uses Python 3.10 or newer with uvx, and the project path can be supplied at launch or through a tool after startup. Maintenance tools expose watcher status, configuration, storage checks, cache resets, and search-tool detection. This separation between fast file discovery and deliberate deep analysis is important when using it for reviews, refactoring, debugging, or architectural exploration.

Install & configure

Requirements

  • Python 3.10+
  • uv / uvx
  • A project directory to index
  • A native search utility for regex mode
Documented launch / install command
uvx code-index-mcp

Call set_project_path after launch or use the documented --project-path option. File watching refreshes the shallow index; build_deep_index is required for symbol summaries. Windows clients may need the profile-directory environment overrides described in the README.

Config file · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

Windows: %APPDATA%\Claude\claude_desktop_config.json

Use Settings → Developer → Edit Config when available. Do not assume a Linux configuration path; check the client documentation for your platform. Remote servers use the app’s connector flow when supported, not the local stdio file shown here. Merge this example with existing settings; do not overwrite unrelated servers.

Claude Desktop configuration
{
  "mcpServers": {
    "code-index-mcp": {
      "command": "uvx",
      "args": [
        "code-index-mcp"
      ],
      "env": {}
    }
  }
}

Read the Claude Desktop setup guide

Config file · Project: .cursor/mcp.json

User: ~/.cursor/mcp.json

The project path is relative to the workspace root. The tilde denotes your user home directory. Use Cursor’s MCP settings to confirm which configuration and scope your installed version is reading. Merge this example with existing settings; do not overwrite unrelated servers.

Cursor configuration
{
  "mcpServers": {
    "code-index-mcp": {
      "command": "uvx",
      "args": [
        "code-index-mcp"
      ],
      "env": {}
    }
  }
}

Read the Cursor setup guide

Config file · Workspace: .vscode/mcp.json

For user scope, use the “MCP: Open User Configuration” command if available. Do not guess a user configuration path across operating systems, profiles, containers, or remote workspaces; check the client documentation. Merge this example with existing settings; do not overwrite unrelated servers.

VS Code configuration
{
  "servers": {
    "code-index-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "code-index-mcp"
      ],
      "env": {}
    }
  }
}

Read the VS Code setup guide

Config file · macOS/Linux: ~/.codeium/windsurf/mcp_config.json

Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json

Open the MCP configuration through Windsurf’s settings when possible to confirm the active file. Paths can differ in managed or future releases; check the client documentation if this location is not present. Merge this example with existing settings; do not overwrite unrelated servers.

Windsurf configuration
{
  "mcpServers": {
    "code-index-mcp": {
      "command": "uvx",
      "args": [
        "code-index-mcp"
      ],
      "env": {}
    }
  }
}

Read the Windsurf setup guide

Config file · Project scope: .mcp.json at the repository root

The project file uses mcpServers. For user scope, use claude mcp add --scope user rather than assuming .mcp.json in your home directory is the user configuration. Check the client documentation for managed settings and storage details. Merge this example with existing settings; do not overwrite unrelated servers.

Claude Code configuration
{
  "mcpServers": {
    "code-index-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "code-index-mcp"
      ],
      "env": {}
    }
  }
}

Read the Claude Code setup guide

Examples are translated from the published configuration. Supply your own credentials and verify requirements in the upstream README. Remote connectors are shown only where a supported configuration format is known.

Tools

Source: repository README. Tool descriptions are a documented snapshot, not a live capability check.

ToolWhat it does
set_project_pathChoose a repository directory and initialize its index.
refresh_indexRebuild the shallow file index.
build_deep_indexBuild symbol metadata needed for deep analysis.
get_settings_infoInspect project configuration and indexing status.
search_code_advancedSearch code with filters, pagination, and optional fuzzy or regex matching.
find_filesFind repository files using glob patterns.
get_file_summarySummarize file structure and symbols using the deep index.
get_file_watcher_statusInspect whether filesystem monitoring is active.
configure_file_watcherConfigure automatic refresh and watcher behavior.
create_temp_directoryPrepare a storage directory for index data.
check_temp_directoryCheck index storage location and permissions.
clear_settingsReset cached index data and configuration.
refresh_search_toolsDetect available native search utilities again.

Use cases

  • Find code affected by an API migration.
  • Locate files by glob before inspecting them.
  • Summarize imports, functions, and complexity after deep indexing.
  • Explore an unfamiliar repository during a code review.
  • Keep file discovery current as the workspace changes.

Strengths

  • Combines lightweight file discovery with deeper symbol analysis.
  • Specialized Tree-sitter parsing for ten languages.
  • Configurable monitoring and persistent index caching.
  • Search supports filters and pagination.

Limitations

  • Deep summaries require build_deep_index first.
  • Languages outside the specialized set get basic fallback indexing.
  • Regex search requires an installed native search utility.

Code Index MCP setup notes

  • Code Index MCP's stdio example needs a client that launches local processes.

Frequently asked questions

The shallow index tracks files; build_deep_index generates symbol metadata used by detailed summaries.

Related MCP servers