6 criteria separate these servers
- Search type. There are 4 kinds: by meaning (code from a description), by symbol (definitions and references), by structure (syntax patterns) and by keyword (exact text). The table below shows which server does which.
- Chunking. A semantic index splits files into chunks before it embeds them. Chunks that follow function and class boundaries return a whole function when it fits in one chunk. Fixed-size windows can cut a function in half.
- Freshness. Code changes while the agent works. Check what triggers a re-index and how much work each re-index repeats.
- Local or hosted embeddings. A local model keeps the code on your machine and needs no API key. A hosted model takes less local compute and sends code to a provider.
- License. Check whether your company allows copyleft (GPL) tools and whether the server needs a paid plan. Of the 6 servers below, 4 are MIT or Apache 2.0.
- Client support. A stdio server runs as a local process under the client. A remote server needs a client that speaks MCP over HTTP.
How 6 servers compare
Checked on November 5, 2026 against each project’s README or documentation, linked in the first column. The table lists documented features and holds no benchmark results.
| Server | Search type | Index and embeddings | Freshness | License |
|---|---|---|---|---|
| cocoindex-code | By meaning, over Tree-sitter chunks | Local SentenceTransformers model with no API key, or a cloud provider through LiteLLM. The index is embedded in the project folder, with no database to set up. | Re-indexes changed files. The MCP search tool refreshes the index before each query by default. | Apache 2.0 |
| Claude Context | Hybrid: BM25 plus dense vectors, over AST chunks | Embeddings from OpenAI, VoyageAI, Ollama or Gemini. Vectors are stored in Milvus or Zilliz Cloud. | Re-indexes changed files, found with Merkle trees. | MIT |
| Serena | By symbol: find symbol, find references, rename | Language servers (LSP) for more than 40 languages, or a paid JetBrains plugin. It uses no embeddings. | Not applicable: it keeps no embedding index. | GPL-3.0-or-later for the application |
| ast-grep MCP | By structure: AST patterns and YAML rules | It runs the ast-grep CLI on the files and uses no embeddings. | Not applicable: it keeps no embedding index. | MIT |
| GitHub MCP Server | By keyword, through GitHub code search (the search_code tool) | GitHub’s hosted index. The server is remote (hosted by GitHub) or local. | Covers code that is on GitHub, not local edits. | MIT |
| Sourcegraph MCP Server | Keyword search, natural-language search, go to definition, find references | Your Sourcegraph instance. | Set by the Sourcegraph instance. | Commercial, on Enterprise plans |
The ast-grep MCP README calls that server experimental.
Where cocoindex-code fits
cocoindex-code fits when you want search by meaning over a repository on your own machine:
- Local by default. The
[full]install embeds with a local model (Snowflake/snowflake-arctic-embed-xs), so the code is not sent to an embedding provider. The tool sends anonymous usage telemetry that excludes code, paths and queries.COCOINDEX_DISABLE_USAGE_TRACKING=1turns it off. - Setup. It needs no vector database. A background daemon starts on first use.
- Syntax-aware chunks. The tool tries to split files at function and class boundaries. Its README lists 33 supported languages.
- Incremental updates. A changed file is re-indexed, and chunks whose text did not change keep their embeddings.
- Clients. The README documents Claude Code, Codex, OpenCode, Kilo Code, Grok and Oh My Pi. Other MCP clients that launch a stdio server can start
ccc mcpfrom inside the project. An agent skill is the recommended route for Claude Code.
Where it does not fit
- Symbol navigation. Its MCP server has one tool,
search. For callers, references and renames, use Serena, Sourcegraph, or CocoIndex Code Plus (ccx), which is a separate self-hosted product, licensed per deployment. - Exact keyword or regex search. The client’s built-in search, or a hybrid index such as Claude Context, matches exact text.
- Code hosted elsewhere. To search an organization’s repositories, use the GitHub MCP Server, Sourcegraph or CocoIndex Code Plus.
- Remote MCP.
ccc mcpruns in stdio mode. A client that only connects to remote servers needs a different server. - Small installs. The
[full]extra brings about 1 GB of local model dependencies. The slim install avoids them but needs a LiteLLM embedding provider: a cloud API with its key, or a local server such as Ollama.
Install cocoindex-code
pipx install 'cocoindex-code[full]'
# or with uv:
uv tool install --upgrade 'cocoindex-code[full]'
cd your-repo
ccc index
# Claude Code: skill (recommended in the README)
npx skills add cocoindex-io/cocoindex-code
# Claude Code: MCP
claude mcp add cocoindex-code -- ccc mcp
# OpenAI Codex CLI
codex mcp add cocoindex-code -- ccc mcp
Cursor and other MCP clients that launch a stdio server take the generic entry. The client must start ccc mcp with the project as its working directory:
{
"mcpServers": {
"cocoindex-code": {
"command": "ccc",
"args": ["mcp"]
}
}
}
To compare servers on your own code, write 5 questions you asked your agent this week. Run each one against every server you consider, and check whether the right function is in the first 5 results.
Sources and further reading
- cocoindex-code README and its embedding guide.
- Claude Context README, Serena README and license overview, ast-grep MCP README, GitHub MCP Server README, Sourcegraph MCP documentation.
- CocoIndex Code Plus: the self-hosted product for organization-wide code search.