drio
Open app

Code Index MCP

Source

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

Catalog onlyCatalog onlySTDIO

Overview

Code Index MCP is a Model Context Protocol server designed to help large language models (LLMs) index, search, and analyze code repositories with minimal setup.

To use Code Index MCP, install the required dependencies using UV, clone the repository, and run the server. You can integrate it with Claude Desktop for enhanced functionality.

  • Index and navigate project file structures - Search for specific patterns in code - Get detailed file summaries - Analyze code structure and complexity - Support for multiple programming languages - Persistent storage of project settings
  1. Analyzing large codebases for better understanding
  2. Searching for specific code patterns across multiple files
  3. Generating summaries of code files for documentation

Add to your AI client

Use these steps to connect Code Index MCP in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "code-index-mcp-johnhuang316": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-code-index-mcp-johnhuang316"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "code-index-mcp-johnhuang316": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-code-index-mcp-johnhuang316"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "code-index-mcp-johnhuang316": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-code-index-mcp-johnhuang316"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "code-index-mcp-johnhuang316": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-code-index-mcp-johnhuang316"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "code-index-mcp-johnhuang316": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-code-index-mcp-johnhuang316"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "code-index-mcp-johnhuang316": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-code-index-mcp-johnhuang316"
      ]
    }
  }
}

FAQ

What programming languages does Code Index MCP support?

It supports multiple languages including Python, JavaScript, Java, C++, and more.

Is there a need for manual dependency installation?

No, UV automatically handles all dependencies when running the server.

How does Code Index MCP ensure security?

It includes file path validation and prevents directory traversal attacks.