|
| 1 | +# mcp-server-qdrant: A Qdrant MCP server |
| 2 | + |
| 3 | +> The [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) is an open protocol that enables seamless integration between LLM applications and external data sources and tools. Whether you’re building an AI-powered IDE, enhancing a chat interface, or creating custom AI workflows, MCP provides a standardized way to connect LLMs with the context they need. |
| 4 | +
|
| 5 | +This repository is an example of how to create a MCP server for [Qdrant](https://qdrant.tech/), a vector search engine. |
| 6 | + |
| 7 | +## Overview |
| 8 | + |
| 9 | +A basic Model Context Protocol server for keeping and retrieving memories in the Qdrant vector search engine. |
| 10 | +It acts as a semantic memory layer on top of the Qdrant database. |
| 11 | + |
| 12 | +## Components |
| 13 | + |
| 14 | +### Tools |
| 15 | + |
| 16 | +1. `qdrant-store-memory` |
| 17 | + - Store a memory in the Qdrant database |
| 18 | + - Input: |
| 19 | + - `information` (string): Memory to store |
| 20 | + - Returns: Confirmation message |
| 21 | +2. `qdrant-find-memories` |
| 22 | + - Retrieve a memory from the Qdrant database |
| 23 | + - Input: |
| 24 | + - `query` (string): Query to retrieve a memory |
| 25 | + - Returns: Memories stored in the Qdrant database as separate messages |
| 26 | + |
| 27 | +## Installation |
| 28 | + |
| 29 | +### Using uv (recommended) |
| 30 | + |
| 31 | +When using [`uv`](https://docs.astral.sh/uv/) no specific installation is needed to directly run *mcp-server-qdrant*. |
| 32 | + |
| 33 | +```shell |
| 34 | +uv run mcp-server-qdrant \ |
| 35 | + --qdrant-url "http://localhost:6333" \ |
| 36 | + --qdrant-api-key "your_api_key" \ |
| 37 | + --collection-name "my_collection" \ |
| 38 | + --fastembed-model-name "sentence-transformers/all-MiniLM-L6-v2" |
| 39 | +``` |
| 40 | + |
| 41 | +## Usage with Claude Desktop |
| 42 | + |
| 43 | +To use this server with the Claude Desktop app, add the following configuration to the "mcpServers" section of your `claude_desktop_config.json`: |
| 44 | + |
| 45 | +```json |
| 46 | +{ |
| 47 | + "qdrant": { |
| 48 | + "command": "uvx", |
| 49 | + "args": [ |
| 50 | + "mcp-server-qdrant", |
| 51 | + "--qdrant-url", |
| 52 | + "http://localhost:6333", |
| 53 | + "--qdrant-api-key", |
| 54 | + "your_api_key", |
| 55 | + "--collection-name", |
| 56 | + "your_collection_name" |
| 57 | + ] |
| 58 | + } |
| 59 | +} |
| 60 | +``` |
| 61 | + |
| 62 | +Replace `http://localhost:6333`, `your_api_key` and `your_collection_name` with your Qdrant server URL, Qdrant API key |
| 63 | +and collection name, respectively. The use of API key is optional, but recommended for security reasons, and depends on |
| 64 | +the Qdrant server configuration. |
| 65 | + |
| 66 | +This MCP server will automatically create a collection with the specified name if it doesn't exist. |
| 67 | + |
| 68 | +By default, the server will use the `sentence-transformers/all-MiniLM-L6-v2` embedding model to encode memories. |
| 69 | +For the time being, only [FastEmbed](https://qdrant.github.io/fastembed/) models are supported, and you can change it |
| 70 | +by passing the `--fastembed-model-name` argument to the server. |
| 71 | + |
| 72 | +### Environment Variables |
| 73 | + |
| 74 | +The configuration of the server can be also done using environment variables: |
| 75 | + |
| 76 | +- `QDRANT_URL`: URL of the Qdrant server |
| 77 | +- `QDRANT_API_KEY`: API key for the Qdrant server |
| 78 | +- `COLLECTION_NAME`: Name of the collection to use |
| 79 | +- `FASTEMBED_MODEL_NAME`: Name of the FastEmbed model to use |
| 80 | + |
| 81 | +## License |
| 82 | + |
| 83 | +This MCP server is licensed under the MIT License. This means you are free to use, modify, and distribute the software, |
| 84 | +subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project |
| 85 | +repository. |
0 commit comments