An MCP server for semantic code search in Rust codebases. Combines BM25 full-text search with vector embeddings for hybrid search, plus tree-sitter based code analysis.
- Hybrid search - BM25 keyword search + semantic vector similarity
- Symbol navigation - Find definitions and references across the codebase
- Call graph analysis - Trace function call relationships
- Complexity metrics - LOC, cyclomatic complexity, function counts
- Incremental indexing - Merkle tree change detection for fast re-indexing
- Background sync - Automatic index updates every 5 minutes
| Tool | Description |
|---|---|
search |
Keyword search using hybrid BM25 + vectors |
get_similar_code |
Find semantically similar code snippets |
find_definition |
Locate where a symbol is defined |
find_references |
Find all usages of a symbol |
get_dependencies |
List imports for a file |
get_call_graph |
Show function call relationships |
analyze_complexity |
Calculate code complexity metrics |
read_file_content |
Read file contents |
index_codebase |
Manually trigger indexing |
health_check |
Check system status |
A Qdrant instance must be running for vector storage. By default, the server connects to localhost:6334.
# Using Docker
docker run -p 6333:6333 -p 6334:6334 qdrant/qdrantcargo build --releaseThe server uses stdio transport. Add to your MCP client config:
{
"mcpServers": {
"rust-code-mcp": {
"command": "/path/to/rust-code-mcp"
}
}
}- tantivy - Full-text search
- fastembed - Local embeddings (ONNX)
- qdrant - Vector storage
- tree-sitter - AST parsing
- rmcp - MCP protocol
MIT