Qdrant Vector Database MCP server

Provides a vector database for storing and retrieving code snippets through semantic search using Docker containers and sentence-transformers embeddings
Back to servers
Setup instructions
Provider
ChangJun Park
Release date
Apr 01, 2025
Language
Python
Stats
1 star

The MCP Server with Qdrant integrates a vector database with Model Control Protocol to store and search code snippets using natural language queries and semantic search capabilities. This system enables efficient code snippet management with support for Server-Sent Events (SSE).

Installation Requirements

To get started with MCP Server, you'll need:

  • Docker
  • Docker Compose

Setting Up the Server

Installing the Server

  1. Clone the repository and navigate to the project directory:
git clone <repository-url>
cd <repository-name>
  1. Start the services using Docker Compose:
docker-compose up -d
  1. Verify that all services are running properly:
docker-compose ps

Accessing the Services

After installation, you can access the following services:

Configuration

Environment Variables

You can customize the behavior of both Qdrant and the MCP Server through environment variables:

Qdrant Configuration

  • RUST_LOG: Sets the logging level (default: info)

MCP Server Configuration

  • QDRANT_URL: URL of the Qdrant server
  • COLLECTION_NAME: Name of the collection to use
  • EMBEDDING_MODEL: Embedding model to use (default: sentence-transformers/all-MiniLM-L6-v2)
  • TOOL_STORE_DESCRIPTION: Description for the storage tool
  • TOOL_FIND_DESCRIPTION: Description for the search tool

Using the MCP Server

System Components

The system consists of:

  • Qdrant: Vector database server (ports: 6333, 6334)
  • MCP Server: Code snippet management server (port: 8000)
  • Embedding model: Default is sentence-transformers/all-MiniLM-L6-v2

Available Tools

The MCP server provides two main tools:

1. qdrant-store

This tool stores information in the Qdrant database.

Input parameters:

  • information (string): The information to store
  • metadata (JSON): Optional metadata

Output: Confirmation message of successful storage

2. qdrant-find

This tool searches for relevant information in the Qdrant database.

Input parameters:

  • query (string): The query to use for searching

Output: Information stored in the Qdrant database, returned as individual messages

Integrating with AI IDEs

To connect the MCP server with AI IDEs like Cursor, add the following JSON configuration:

{
  "qdrant": {
    "url": "http://localhost:8000/sse"
  }
}

Managing the Service

Viewing Logs

To check the logs from both services:

docker-compose logs -f

Stopping the Service

To stop all services:

docker-compose down

Data Persistence

Data is persistently stored in the ./qdrant_storage directory. For data protection, consider regularly backing up this directory.

Important Notes

  • In production environments, implement appropriate security measures
  • The service uses ports 6333, 6334 for Qdrant and 8000 for the MCP server

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "qdrant" '{"url":"http://localhost:8000/sse"}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "qdrant": {
            "url": "http://localhost:8000/sse"
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "qdrant": {
            "url": "http://localhost:8000/sse"
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later