Kodit MCP server

Indexes local codebases and Git repositories using tree-sitter parsing and semantic embeddings to enable hybrid search combining vector similarity with keyword matching for contextual code retrieval.
Back to servers
Setup instructions
Provider
Helix.ML
Release date
Jun 09, 2025
Language
JavaScript
Stats
69 stars

Kodit is an MCP server that connects AI coding assistants to external codebases, providing accurate and up-to-date code snippets to reduce errors and hallucinations. It creates searchable indexes of your code that can be queried by AI assistants through the Model Context Protocol.

Installation

You can either use the hosted Kodit service or install it locally.

Using Hosted Kodit

The simplest way to get started is using the hosted Kodit MCP server, which requires no installation:

  1. Visit https://kodit.helix.ml/mcp
  2. Configure your AI coding assistant to use this MCP endpoint

The hosted version comes with pre-indexed popular open source repositories and works immediately without configuration.

Local Installation

For a self-hosted installation, follow these steps:

  1. Download and install Kodit using the installation instructions at https://docs.helix.ml/kodit/getting-started/installation/

  2. After installation, verify that Kodit is running:

kodit --version

Indexing Codebases

Before using Kodit, you need to index your codebases:

Indexing a Local Directory

kodit index /path/to/your/code --name "My Project"

Indexing a Public Git Repository

kodit index https://github.com/username/repo.git --name "Public Repo"

Indexing a Private Git Repository

kodit index https://github.com/username/private-repo.git --name "Private Repo" --pat "your-personal-access-token"

Additional Indexing Options

You can customize your indexing with various options:

# Index with specific language filters
kodit index /path/to/code --languages python,javascript

# Set custom update frequency
kodit index /path/to/code --auto-update daily

# Exclude specific paths
kodit index /path/to/code --exclude "tests/,docs/"

Integrating with AI Coding Assistants

After indexing your codebases, you can connect Kodit to your AI coding assistant.

Integration with Cursor

  1. Open Cursor
  2. Go to Settings
  3. Under "MCP", add a new MCP server with the URL:
    • For hosted Kodit: https://kodit.helix.ml/mcp
    • For local Kodit: http://localhost:3333/mcp (or your custom port)

Integration with Cline

Add the Kodit MCP server to your Cline configuration:

cline config mcp.add kodit http://localhost:3333/mcp

For the hosted version:

cline config mcp.add kodit https://kodit.helix.ml/mcp

Advanced Configuration

Using Different Databases

By default, Kodit uses SQLite, but you can configure it to use other databases:

# Configure Kodit to use VectorChord
kodit config set database.type vectorchord
kodit config set database.url "postgresql://user:password@localhost:5432/vectorchord"

Customizing Search Behavior

# Adjust the balance between keyword and semantic search
kodit config set search.hybrid.keyword_weight 0.7
kodit config set search.hybrid.semantic_weight 0.3

# Set maximum results per query
kodit config set search.max_results 10

Using Custom Models

# Configure Kodit to use OpenAI
kodit config set provider.type openai
kodit config set provider.api_key "your-openai-api-key"

# Configure Kodit to use Helix
kodit config set provider.type helix
kodit config set provider.url "https://your-helix-instance.com"
kodit config set provider.api_key "your-helix-api-key"

Searching and Querying Code

Once set up, your AI coding assistant can query Kodit for relevant code snippets. The search happens automatically when you use your AI assistant, but you can also test direct queries through the Kodit CLI:

# Search for code related to "file upload"
kodit search "file upload"

# Search with language filter
kodit search "authentication" --language python

# Search with source filter
kodit search "API request" --source "My Project"

For more detailed information, visit the Kodit documentation.

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "kodit" '{"command":"kodit","args":["server"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "kodit": {
            "command": "kodit",
            "args": [
                "server"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "kodit": {
            "command": "kodit",
            "args": [
                "server"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later