8000 GitHub - tosin2013/mcp-server-qdrant: Qdrant Model Context Protocol (MCP) server
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

tosin2013/mcp-server-qdrant

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MCP Server Qdrant

Model Context Protocol server implementation for Qdrant vector database.

Features

  • Implements MCP protocol for Qdrant vector database
  • Supports embedding generation with FastEmbed
  • Configurable through environment variables
  • Docker support for easy deployment

Installation

pip install mcp-server-qdrant

Usage

Set required environment variables:

export QDRANT_URL=http://localhost:6333
export COLLECTION_NAME=my_collection

Run the server:

mcp-server-qdrant

Development

Run tests:

docker-compose -f docker-compose.test.yml up --build

Documentation

Quick Start

  1. Install prerequisites:

    • Docker Desktop
    • Claude Desktop or another MCP client
    • Git
  2. Clone and start services:

git clone https://github.com/your-org/mcp-server-qdrant
cd mcp-server-qdrant
docker-compose up -d
  1. Configure your MCP client (see Task Management Guide)

  2. Start using the system:

I have a test failure in test_authentication. Can you help me find similar issues?

Development

Setup Development Environment

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # or .venv\Scripts\activate on Windows

# Install dependencies
pip install -r requirements.txt

# Run tests
pytest

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Prerequisites

  • Python 3.11 or higher
  • Docker (optional, for containerized deployment)
  • Node.js and npm (for Claude Desktop integration)

Platform-Specific Setup Guides

We provide detailed setup guides for different platforms and deployment methods:

  1. Docker Desktop Setup Guide

    • For Windows, macOS, and Linux users using Docker Desktop
    • Includes container configuration and Claude Desktop integration
    • Best for users who prefer containerized deployment
  2. RHEL 9 Podman Setup Guide

    • For RHEL 9 and compatible distributions using Podman
    • Includes SELinux configuration and security considerations
    • Optimized for enterprise Linux environments
  3. Windows Setup Guide

    • For Windows users running directly on the host
    • Includes detailed Python and Node.js setup
    • Best for local development on Windows

Choose the guide that best matches your platform and deployment preferences.

Configuration

The server can be configured using environment variables:

Variable Description Default
QDRANT_URL URL of the Qdrant server None
QDRANT_LOCAL_PATH Path to local Qdrant storage None
COLLECTION_NAME Name of the Qdrant collection Required
EMBEDDING_PROVIDER Embedding provider (fastembed) fastembed
EMBEDDING_MODEL Model name for embeddings sentence-transformers/all-MiniLM-L6-v2

Note: You must specify either QDRANT_URL or QDRANT_LOCAL_PATH, but not both.

Testing

Running Tests

  1. Run all tests:
./scripts/e2e_test.sh
  1. Run specific test categories:
# Unit tests only
python -m pytest tests/unit/

# Integration tests only
python -m pytest tests/integration/

# Settings tests
python -m pytest tests/test_settings.py

Test Coverage

To generate a test coverage report:

python -m pytest --cov=src/mcp_server_qdrant tests/

Building

Local Build

hatch build

Docker Build

docker build \
    --build-arg VERSION=$(cat VERSION) \
    --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \
    --build-arg VCS_REF=$(git rev-parse --short HEAD) \
    -t mcp-server-qdrant:latest .

Running

Local Development

# Set required environment variables
export COLLECTION_NAME=my_collection
export QDRANT_URL=http://localhost:6333

# Run the server
python -m mcp_server_qdrant

Docker Container

docker run -d \
    -p 8000:8000 \
    -e COLLECTION_NAME=my_collection \
    -e QDRANT_URL=http://qdrant:6333 \
    mcp-server-qdrant:latest

Claude Desktop Integration

Configuration Format

For local development using uvx:

{
  "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 Docker deployment:

75E7
{
  "qdrant": {
    "command": "docker",
    "args": [
      "run",
      "--rm",
      "--network", "mcp-network",
      "-p", "8080:8080",
      "-e", "QDRANT_URL=http://qdrant:6333",
      "-e", "MCP_COLLECTION=mcp_unified_store",
      "-e", "EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2",
      "-e", "LOG_LEVEL=INFO",
      "mcp-server-qdrant:latest"
    ]
  }
}

For cloud-hosted Qdrant:

{
  "qdrant": {
    "command": "docker",
    "args": [
      "run",
      "--rm",
      "-p", "8080:8080",
      "-e", "QDRANT_URL=https://xyz-example.eu-central.aws.cloud.qdrant.io:6333",
      "-e", "QDRANT_API_KEY=your_api_key",
      "-e", "MCP_COLLECTION=your-collection-name",
      "-e", "EMBEDDING_MODEL=sentence-transformers/all-MiniLM-L6-v2",
      "-e", "LOG_LEVEL=INFO",
      "mcp-server-qdrant:latest"
    ]
  }
}

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Run tests
  5. Submit a pull request

License

[Your License Here]

References

About

Qdrant Model Context Protocol (MCP) server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 84.9%
  • Shell 10.5%
  • Dockerfile 3.3%
  • Makefile 1.3%
0