MCP.so
Sign In
C

Cocoindex Code

@cocoindex-io

About Cocoindex Code

An MCP (Model Context Protocol) server for indexing and querying codebases using CocoIndex. Features semantic code search with natural language queries, incremental indexing for fast updates, multi-language support (Python, JavaScript/TypeScript, Rust, Go, Java, C/C++, C#, SQL, S

Basic information

Category

Developer Tools

Transports

stdio

Publisher

cocoindex-io

Submitted by

Linghua

Config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "cocoindex-code": {
      "command": "uvx",
      "args": [
        "--prerelease=explicit",
        "--with",
        "cocoindex>=1.0.0a13",
        "cocoindex-code@latest"
      ]
    }
  }
}

Tools

No tools detected

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is Cocoindex Code?

Cocoindex Code is an MCP (Model Context Protocol) server for indexing and querying codebases using CocoIndex. It provides semantic code search via natural language queries, supports incremental indexing, multiple programming languages, and flexible embedding models with portable SQLite storage.

How to use Cocoindex Code?

Install uv, then add the server via claude mcp add cocoindex-code using uvx. Optionally set COCOINDEX_CODE_EMBEDDING_MODEL and the corresponding API key environment variable. The server exposes a single search tool. Configuration can be adjusted via environment variables like COCOINDEX_CODE_ROOT_PATH.

Key features of Cocoindex Code

  • Semantic code search using natural language queries
  • Incremental indexing – only re-indexes changed files
  • Multi-language support (Python, JS/TS, Rust, Go, Java, C/C++, C#, SQL, Shell, and more)
  • Local SentenceTransformers or 100+ cloud embedding providers via LiteLLM
  • Portable SQLite storage – no external database required

Use cases of Cocoindex Code

  • Find relevant code snippets by describing them in natural language
  • Rapidly navigate large, unfamiliar codebases
  • Integrate semantic code search into AI-assisted coding tools
  • Support polyglot projects with a single indexing pipeline

FAQ from Cocoindex Code

How do local embeddings differ from cloud embeddings?

Local embeddings use SentenceTransformers and require no API key; cloud embeddings use LiteLLM and need a provider API key and model identifier.

What are the runtime dependencies?

The server requires uv to run via uvx. No external database setup is needed – the index is stored locally in .cocoindex_code/.

Where is the index stored?

The index resides in .cocoindex_code/ under the codebase root, containing a vector database (target_sqlite.db) and CocoIndex state (cocoindex.db/).

Which file types are supported?

Python, JavaScript, TypeScript, Rust, Go, Java, C, C++, C#, SQL, Shell, Markdown, and Plain Text. Common generated directories are automatically excluded.

How is the codebase root discovered?

If COCOINDEX_CODE_ROOT_PATH is not set, the server looks for the nearest parent containing .cocoindex_code/, then .git/, and finally falls back to the current working directory.

Comments

More Developer Tools MCP servers