code-vector-sync
Enables semantic code search over a local codebase using Qdrant vector embeddings and OpenAI embeddings, allowing natural language queries from MCP-compatible clients like Claude Desktop.
README
code-vector-sync
An MCP (Model Context Protocol) server that provides semantic code search over a local codebase using Qdrant vector embeddings and OpenAI embeddings. Point it at a directory and query it with natural language from any MCP-compatible client (e.g., Claude Desktop).
What It Does
- Watches a local directory for file changes and auto-indexes them
- Embeds code using OpenAI's embedding API
- Stores vectors in a Qdrant cloud collection
- Serves semantic search results via the MCP protocol
Architecture
File Watcher → Embedding Service → Qdrant Manager
↑
MCP Client (Claude) ←── MCP Server ────┘
(code_search)
Setup
1. Install dependencies
pip install -r requirements.txt
2. Configure environment
cp .env.example .env
# Edit .env with your Qdrant URL, Qdrant API key, OpenAI API key, and watch directory
3. Run the MCP server
python run_mcp_server.py
4. Connect to Claude Desktop
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"code-vector-search": {
"command": "python",
"args": ["/path/to/code-vector-sync/run_mcp_server.py"],
"env": {
"QDRANT_URL": "your-qdrant-url",
"QDRANT_API_KEY": "your-api-key",
"OPENAI_API_KEY": "your-openai-key"
}
}
}
}
Project Structure
code-vector-sync/
├── src/
│ ├── mcp_server.py # MCP server entry point and tool definitions
│ ├── code_search.py # Search query handling
│ ├── code_sync_service.py # Orchestrates watching, embedding, and indexing
│ ├── embedding_service.py # OpenAI embedding calls
│ ├── file_watcher.py # Watchdog-based directory monitoring
│ └── qdrant_manager.py # Qdrant client and collection management
├── run_mcp_server.py # Launcher script
├── requirements.txt
├── .env.example # Template — copy to .env and fill in values
└── .gitignore
Requirements
- Python 3.10+
- Qdrant Cloud account (free tier works)
- OpenAI API key
Related Projects
- agent-dev — Containerized AI agent dev environment that this server is designed to complement
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.