Qdrant MCP
Qdrant is an MCP server enabling semantic memory storage and retrieval using Qdrant. It integrates LLM apps with vector search for effective context and code search.
How to Install and Use Qdrant MCP
Qdrant MCP is a helpful tool that connects large language models to external data using the Model Context Protocol. It works with Qdrant, a vector search engine, to store and find information easily. Let's go step by step to get Qdrant MCP up and running.
Installation using uvx
First, let's learn how to run Qdrant MCP using a tool called uvx. This option does not require extra installation steps for Qdrant MCP.
Here are the simple steps:
- Open your terminal or command prompt.
- Set the environment variables for the Qdrant URL, collection name, and embedding model. For example:
QDRANT_URL="http://localhost:6333"
COLLECTION_NAME="my-collection"
EMBEDDING_MODEL="sentence-transformers/all-MiniLM-L6-v2"
- Run Qdrant MCP using uvx by typing:
uvx mcp-server-qdrant
This command starts the Qdrant MCP server using your settings.
You can also use different transport protocols like sse (Server-Sent Events). For example, to run with SSE on port 8000, use:
QDRANT_URL="http://localhost:6333"
COLLECTION_NAME="my-collection"
FASTMCP_PORT=8000
uvx mcp-server-qdrant --transport sse
This will make the server listen for remote connections, which is very useful.
Installation using Docker
Another popular way to run Qdrant MCP is by using Docker. Docker creates a container that runs the server easily on any machine.
Follow these steps:
- Build the Docker container by running:
docker build -t mcp-server-qdrant .
- Run the container with your Qdrant server details and collection name:
docker run -p 8000:8000 \
-e FASTMCP_HOST="0.0.0.0" \
-e QDRANT_URL="http://your-qdrant-server:6333" \
-e QDRANT_API_KEY="your-api-key" \
-e COLLECTION_NAME="your-collection" \
mcp-server-qdrant
Make sure to replace the URLs, API key, and collection with your own. Setting FASTMCP_HOST="0.0.0.0" allows the server to listen on all network interfaces, which is required for Docker.
Using Qdrant MCP with Claude Desktop
If you want to use Qdrant MCP with Claude Desktop, you need to add some settings to your config file.
Here is an example configuration to add in the "mcpServers" section of claude_desktop_config.json:
{
"qdrant": {
"command": "uvx",
"args": ["mcp-server-qdrant"],
"env": {
"QDRANT_URL": "https://xyz-example.eu-central.aws.cloud.qdrant.io:6333",
"QDRANT_API_KEY": "your_api_key",
"COLLECTION_NAME": "your-collection-name",
"EMBEDDING_MODEL": "sentence-transformers/all-MiniLM-L6-v2"
}
}
}
For running Qdrant locally, use QDRANT_LOCAL_PATH instead of QDRANT_URL in the config.
This setup will automatically create the collection if it does not exist.
Using Qdrant MCP with Cursor/Windsurf
To connect Qdrant MCP with Cursor or Windsurf for code search, you should customize how the tool stores and finds code snippets.
Here’s how you might set that up:
QDRANT_URL="http://localhost:6333"
COLLECTION_NAME="code-snippets"
TOOL_STORE_DESCRIPTION="Store reusable code snippets for later retrieval. The 'information' parameter should contain a natural language description of what the code does, while the actual code should be in the 'metadata' parameter as a 'code' property."
TOOL_FIND_DESCRIPTION="Search for relevant code snippets based on natural language descriptions. The 'query' parameter describes what you're looking for."
uvx mcp-server-qdrant --transport sse
In Cursor or Windsurf, connect to:
http://localhost:8000/sse
This makes it easy to store and search code snippets semantically.
By following these simple steps, you can install and start using Qdrant MCP effectively for storing and searching your data or code with the power of semantic search.