home / mcp / semantic search mcp server
Delivers hybrid semantic search over codebases via an MCP server, combining BM25 keyword retrieval with vector search for Claude Code.
Configuration
View docs{
"mcpServers": {
"camilojourney-codesight": {
"command": "python",
"args": [
"-m",
"semantic_search_mcp"
],
"env": {
"SEMANTIC_SEARCH_DATA_DIR": "~/.semantic-search/data"
}
}
}
}You can run a Semantic Search MCP Server to provide Claude Code with hybrid semantic search capabilities over your codebase. It combines keyword matching with vector search for fast, accurate code retrieval and supports practical indexing, testing, and usage within Claude Code.
You connect to the server from your MCP client and perform common search and index operations. Start by ensuring the server is running, then use the client to index repositories, search across codebases, and check index status. The workflow typically involves starting the server locally, indexing your code, and issuing search queries against your indexed data.
Prerequisites: Python 3.11+ and a working Python environment. You will also use the MCP client within Claude Code to interact with the server.
# Install the MCP server package in editable mode from the local project
cd semantic_search_MCP
pip install -e ".[dev]"
# Optional: verify the server can be inspected with an MCP inspector if you want to test locally
npx @modelcontextprotocol/inspector python -m semantic_search_mcp
# Connect to Claude Code (example command shown for integration)
claude mcp add semantic-search -- python -m semantic_search_mcpConfiguration is managed via environment variables and the server exposes a minimal set of runtime options for indexing and retrieval. The primary environment variable shown is the data directory where all indexes are stored.
Environment variables you will use when running the server:
{
"SEMANTIC_SEARCH_DATA_DIR": "~/.semantic-search/data"
}Hybrid search that combines semantic vector retrieval with BM25 keyword matching. Auto-indexes if needed.
Build or rebuild the search index for a given repository path.
Check if a repository is indexed and determine if the index is stale.