Qdrant Vector Search MCP Server
Implement semantic search and RAG memory layers using Qdrant vector database through MCP. Create collections, index embeddings, run similarity queries, and build retrieval-augmented generation pipelines.
MCP Server Configuration
Add to .claude/settings.json:
{ "mcpServers": { "qdrant": { "command": "npx", "args": ["-y", "@qdrant/mcp-server-qdrant"], "env": { "QDRANT_URL": "http://localhost:6333", "QDRANT_API_KEY": "${QDRANT_API_KEY}", "COLLECTION_NAME": "default", "EMBEDDING_MODEL": "text-embedding-3-small" } } } }
Available Tools
| Tool | Description |
|---|---|
store | Store a text snippet with metadata as a vector point in the collection |
find | Semantic search -- find the most similar stored items to a query |
create-collection | Create a new collection with specified vector dimensions |
delete-collection | Delete an existing collection |
list-collections | List all available collections |
Use Cases
Semantic Code Search
1. Index code documentation and function signatures
2. Query: "function that handles user authentication"
3. Returns: most semantically similar code snippets, even if they don't contain the exact words
RAG Memory Layer
1. Store conversation history, project documentation, and decisions
2. On each new query, retrieve relevant context from the vector store
3. Include retrieved context in the prompt for more informed responses
Knowledge Base
1. Index internal documentation, runbooks, and ADRs
2. Search with natural language questions
3. Get relevant documentation sections ranked by similarity
Collection Configuration
{ "collection_name": "project-docs", "vectors": { "size": 1536, "distance": "Cosine" }, "optimizers_config": { "default_segment_number": 2, "indexing_threshold": 20000 }, "replication_factor": 1 }
Distance Metrics
| Metric | Best For | Range |
|---|---|---|
Cosine | Text similarity (most common) | -1 to 1 |
Euclid | When magnitude matters | 0 to inf |
Dot | Pre-normalized vectors, high performance | -inf to inf |
Embedding Model Dimensions
| Model | Dimensions | Provider |
|---|---|---|
text-embedding-3-small | 1536 | OpenAI |
text-embedding-3-large | 3072 | OpenAI |
voyage-code-3 | 1024 | Voyage AI |
nomic-embed-text | 768 | Nomic (open source) |
bge-large-en-v1.5 | 1024 | BAAI (open source) |
Indexing Workflow
# Example: Index project documentation import os from qdrant_client import QdrantClient from qdrant_client.models import PointStruct, VectorParams, Distance client = QdrantClient(url="http://localhost:6333") # Create collection client.create_collection( collection_name="project-docs", vectors_config=VectorParams(size=1536, distance=Distance.COSINE), ) # Index documents points = [] for i, doc in enumerate(documents): embedding = get_embedding(doc["text"]) # Your embedding function points.append(PointStruct( id=i, vector=embedding, payload={ "text": doc["text"], "source": doc["file_path"], "type": doc["type"], # "code", "docs", "adr" } )) client.upsert(collection_name="project-docs", points=points)
Setup
- Start Qdrant locally with Docker:
docker run -d --name qdrant \ -p 6333:6333 -p 6334:6334 \ -v qdrant_storage:/qdrant/storage \ qdrant/qdrant:latest - Or use Qdrant Cloud:
https://cloud.qdrant.io - Set
QDRANT_API_KEYenvironment variable (required for Qdrant Cloud) - Add the MCP configuration to
.claude/settings.json
Security Notes
- For local development, Qdrant runs without authentication by default
- Always use API key authentication in production (Qdrant Cloud requires it)
- The MCP server only connects to the configured Qdrant instance
- Be mindful of what you index -- vector stores can inadvertently store sensitive content
- Use collection-level access control in multi-tenant deployments
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Database MCP Integration
MCP server configuration for connecting Claude Code to PostgreSQL, MySQL, and MongoDB databases. Enables schema inspection, query building, and migration generation.
Elevenlabs Server
Streamline your workflow with this official, elevenlabs, text, speech. Includes structured workflows, validation checks, and reusable patterns for audio.
Browser Use Portal
Powerful mcp for server, enables, agents, control. Includes structured workflows, validation checks, and reusable patterns for browser_automation.