Code Index

v1.0.0Developer Toolsstable

A Model Context Protocol (MCP) server that helps large language models index, search, and analyze code repositories with minimal setup

code-indexmcpai-integration
Share:
945
Stars
0
Downloads
0
Weekly
0/5

What is Code Index?

Code Index is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol (mcp) server that helps large language models index, search, and analyze code repositories with minimal setup

A Model Context Protocol (MCP) server that helps large language models index, search, and analyze code repositories with minimal setup

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • A Model Context Protocol (MCP) server that helps large langu

Use Cases

A Model Context Protocol (MCP) server that helps large language models index, se
johnhuang316

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedMay 20, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx code-index

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Code Index

Code Index MCP is a server that indexes a local code repository and exposes semantic search, file discovery, and code summarization tools to AI assistants, giving them accurate codebase awareness without requiring the entire source tree to be pasted into context. It supports advanced search with regex and fuzzy matching, automatic file watching that keeps the index up to date as you edit, and deep indexing for thorough structural analysis. Developers use it to let AI assistants navigate large repos, find relevant files, and understand module structure when working on refactoring, onboarding, or debugging tasks.

Prerequisites

  • Python 3.9+ and the uv/uvx tool installed
  • An MCP-compatible client such as Claude Desktop, Cursor, or Codex CLI
  • A local code repository with an absolute path you can provide to the server
  • No API keys required — all indexing runs locally
1

Install via uvx (recommended)

uvx downloads and runs the package in an isolated environment without a permanent installation step.

uvx code-index-mcp
2

Or install via pip

Install permanently into your Python environment with pip.

pip install code-index-mcp
3

Configure Claude Desktop

Add the server to claude_desktop_config.json. Pass --project-path with the absolute path to your repository so the server indexes it on startup. If omitted, you can set the path later using the set_project_path tool.

{
  "mcpServers": {
    "code-index": {
      "command": "uvx",
      "args": [
        "code-index-mcp",
        "--project-path",
        "/absolute/path/to/your/repo"
      ]
    }
  }
}
4

Configure for Codex CLI (alternative)

Add to ~/.codex/config.toml for use with the OpenAI Codex CLI. On Windows add the required Windows environment variables under the env key.

[mcp_servers.code-index]
type = "stdio"
command = "uvx"
args = ["code-index-mcp", "--project-path", "/path/to/repo"]
5

Build the index

After connecting, ask Claude to build or refresh the code index. For large repositories, use build_deep_index for a more thorough structural analysis.

6

Enable file watching

Ask Claude to configure the file watcher so the index stays current as you make edits during your session.

Code Index Examples

Client configuration

Claude Desktop config block for Code Index MCP with a project path set at startup.

{
  "mcpServers": {
    "code-index": {
      "command": "uvx",
      "args": [
        "code-index-mcp",
        "--project-path",
        "/Users/dev/my-project"
      ]
    }
  }
}

Prompts to try

Example prompts for searching, navigating, and summarizing a codebase.

- "Set the project path to /Users/dev/my-react-app and build the index"
- "Find all TypeScript files matching the pattern src/components/**/*.tsx"
- "Search for all usages of the 'authenticate' function using regex"
- "Give me a summary of src/api/userService.ts"
- "Which files import from the database module?"

Troubleshooting Code Index

Index build fails or returns no results

Confirm the --project-path argument is an absolute path and the directory exists. Relative paths are not supported. Run 'uvx code-index-mcp --project-path /your/path' in a terminal to see startup errors before debugging from within Claude Desktop.

On Windows, uvx fails with environment variable errors

Add the required Windows environment variables to your MCP config: HOME, APPDATA, LOCALAPPDATA, and SystemRoot. Set them to your actual user paths (e.g., HOME = 'C:\\Users\\yourname'). These are needed because uvx depends on them internally.

Search results are stale after editing files

Use the configure_file_watcher tool to enable automatic re-indexing, or manually call refresh_index after making significant changes. The file watcher monitors for modifications and triggers incremental index updates.

Frequently Asked Questions about Code Index

What is Code Index?

Code Index is a Model Context Protocol (MCP) server that model context protocol (mcp) server that helps large language models index, search, and analyze code repositories with minimal setup It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Code Index?

Follow the installation instructions on the Code Index GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Code Index?

Code Index works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Code Index free to use?

Yes, Code Index is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "code-index": { "command": "npx", "args": ["-y", "code-index"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Code Index?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides