code-index-mcp

Integrations

  • Provides access to git repositories, allowing users to clone projects for code indexing and analysis.

Code Index MCP

A Model Context Protocol server for code indexing, searching, and analysis.

What is Code Index MCP?

Code Index MCP is a specialized MCP server that provides intelligent code indexing and analysis capabilities. It enables Large Language Models to interact with your code repositories, offering real-time insights and navigation through complex codebases.

This server integrates with the Model Context Protocol (MCP), a standardized way for AI models to interact with external tools and data sources.

Key Features

  • Project Indexing: Recursively scans directories to build a searchable index of code files
  • Code Search: Find patterns, function definitions, and references across your codebase
  • File Analysis: Get detailed insights about file structure, imports, and complexity
  • Smart Filtering: Automatically ignores build directories, dependencies, and non-code files
  • Persistent Storage: Caches indexes for improved performance across sessions

Supported File Types

The server supports multiple programming languages and file extensions including:

  • Python (.py)
  • JavaScript/TypeScript (.js, .ts, .jsx, .tsx)
  • Java (.java)
  • C/C++ (.c, .cpp, .h, .hpp)
  • C# (.cs)
  • Go (.go)
  • Ruby (.rb)
  • PHP (.php)
  • Swift (.swift)
  • Kotlin (.kt)
  • Rust (.rs)
  • Scala (.scala)
  • Shell scripts (.sh, .bash)
  • Web files (.html, .css, .scss)
  • Documentation/Config (.md, .json, .xml, .yml, .yaml)

Installation

Prerequisites

  • Python 3.8 or higher
  • uv package manager (recommended)

The easiest way to install and use code-index-mcp is with uvx:

uvx code-index-mcp

Using pip

Alternatively, you can install via pip:

pip install code-index-mcp

After installation, you can run it as a module:

python -m code_index_mcp

Integration with Claude Desktop

Add this to your Claude settings (~/Library/Application Support/Claude/claude_desktop_config.json):

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

After adding the configuration, restart Claude Desktop and the Code Index MCP tools will be available.

Available Tools

Core Tools

  • set_project_path: Sets the base project path for indexing.
  • search_code: Searches for code matches within the indexed files.
  • find_files: Finds files in the project matching a given pattern.
  • get_file_summary: Gets a summary of a specific file, including line count, functions, imports, etc.
  • refresh_index: Refreshes the project index.
  • get_settings_info: Gets information about the project settings.

Utility Tools

  • create_temp_directory: Creates the temporary directory used for storing index data.
  • check_temp_directory: Checks the temporary directory used for storing index data.
  • clear_settings: Clears all settings and cached data.

Example Usage with Claude

Here are some examples of how to use Code Index MCP with Claude:

Setting a Project Path

Please set the project path to C:\Users\username\projects\my-python-project

Searching for Code Patterns

Search the code for all occurrences of "def process_data" in Python files

Getting a File Summary

Give me a summary of the main.py file in the project

Finding All Files of a Certain Type

Find all JavaScript files in the project

Development

Building from Source

  1. Clone the repository:
git clone https://github.com/username/code-index-mcp.git cd code-index-mcp
  1. Install dependencies:
uv sync
  1. Run the server locally:
uv run code_index_mcp

Debugging

You can use the MCP inspector to debug the server:

npx @modelcontextprotocol/inspector uvx code-index-mcp

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Languages

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

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

  1. What is Code Index MCP?
    1. Key Features
      1. Supported File Types
        1. Installation
          1. Prerequisites
          2. Using uvx (recommended)
          3. Using pip
        2. Integration with Claude Desktop
          1. Available Tools
            1. Core Tools
            2. Utility Tools
          2. Example Usage with Claude
            1. Setting a Project Path
            2. Searching for Code Patterns
            3. Getting a File Summary
            4. Finding All Files of a Certain Type
          3. Development
            1. Building from Source
          4. Debugging
            1. License
              1. Contributing
                1. Languages

                  Related MCP Servers

                  • -
                    security
                    A
                    license
                    -
                    quality
                    A Model Context Protocol server for Git repository interaction and automation. This server provides tools to read, search, and manipulate Git repositories via Large Language Models.
                    Last updated -
                    12
                    43,638
                    JavaScript
                    MIT License
                  • A
                    security
                    A
                    license
                    A
                    quality
                    A Model Context Protocol server that enables Large Language Models to interact with Git repositories through a robust API, supporting operations like repository initialization, cloning, file staging, committing, and branch management.
                    Last updated -
                    21
                    168
                    53
                    TypeScript
                    Apache 2.0
                  • -
                    security
                    F
                    license
                    -
                    quality
                    Provides integration with Github through the Model Context Protocol (MCP), allowing Large Language Models to interact with Github's repositories, issues, pull requests and search functionality.
                    Last updated -
                    1
                    TypeScript
                    • Apple
                  • -
                    security
                    A
                    license
                    -
                    quality
                    A Model Context Protocol (MCP) server that scrapes, indexes, and searches documentation for third-party software libraries and packages, supporting versioning and hybrid search.
                    Last updated -
                    246
                    75
                    TypeScript
                    MIT License
                    • Apple

                  View all related MCP servers

                  ID: wmjk9p3tv9