Skip to main content

MCP server for qdrant memory.

Project description

MCP Qdrant Memory Server

A Model Context Protocol (MCP) server that provides persistent memory and semantic search capabilities using Qdrant vector database and SentenceTransformer embeddings, built with FastMCP.

Features

Memory Operations

  • Store and retrieve documents with semantic search
  • Support for multiple text sources (text, raw markdown, headers)
  • Automatic text embedding using SentenceTransformer models
  • Metadata-based filtering and search capabilities

Collection Management

  • Dynamic collection creation and recreation
  • Named vector support with configurable dimensions
  • Payload indexing for efficient metadata queries
  • Automatic schema validation and compatibility checking

Search Capabilities

  • Vector Search: Semantic similarity search using text embeddings
  • Hybrid Search: Combined vector and metadata filtering
  • Filter-Only Search: Pure metadata-based queries without vector search
  • Batch Operations: Efficient bulk upsert and deletion

Transport Protocols

  • STDIO (default) - For local tools and Claude Desktop integration
  • SSE (Server-Sent Events) - For web-based deployments
  • Streamable HTTP - Modern HTTP-based protocol

Architecture

The server uses a clean, scalable architecture:

  • FastMCP Integration: Modern MCP server framework with multi-transport support
  • Qdrant Vector Database: High-performance vector storage and search
  • SentenceTransformer: State-of-the-art text embedding generation
  • Stable ID Generation: UUIDv5-based consistent document identification
  • Flexible Text Sources: Support for various document formats and structures

Installation

Quick Install from PyPI

Once published to PyPI, you can install and run easily:

# Install with uv (recommended)
uvx mcp-server-qdrant-memory  # Run directly without installation

# Or install with pip
pip install mcp-server-qdrant-memory

Install from Source

Prerequisites

Create and activate a virtual environment:

python -m venv venv

# On Windows
.\venv\Scripts\Activate.ps1

# On Linux/macOS
source venv/bin/activate

Basic Installation

Install the project in editable mode:

For Production Use

pip install -e "."

For Development

Install with development tools included:

pip install -e ".[dev]"

Dependencies

Core dependencies (automatically installed):

  • mcp>=1.9.4 - Model Context Protocol library
  • fastmcp>=2.3.0 - Modern MCP server framework
  • qdrant_client>=1.14.3 - Qdrant vector database client
  • sentence-transformers>=5.0.0 - Text embedding models

Development dependencies (installed with [dev]):

  • pylint - Code linting
  • pylint-plugin-utils - Pylint utilities
  • pylint-mcp - MCP-specific linting rules
  • black - Code formatting

Installation Examples

Quick Start (Production)

# Clone and install
git clone <repository-url>
cd mcp-server-qdrant-memory
python -m venv venv
.\venv\Scripts\Activate.ps1  # Windows
pip install -e "."

Developer Setup

# Clone and setup development environment
git clone <repository-url>
cd mcp-server-qdrant-memory
python -m venv venv
.\venv\Scripts\Activate.ps1  # Windows
pip install -e ".[dev]"

# Run development tools
black src/
pylint src/

Configuration

The server is configured through environment variables:

Required Setup

  1. Qdrant Server: Start a Qdrant instance
# Using Docker
docker run -p 6333:6333 qdrant/qdrant
  1. Environment Variables (optional, with defaults):
export QDRANT_URL="http://127.0.0.1:6333"           # Qdrant server URL
export QDRANT_API_KEY=""                             # API key (if required)
export QDRANT_COLLECTION_NAME="kakehashi_rag_v2"    # Collection name
export QDRANT_VECTOR_NAME="fast-all-minilm-l6-v2"   # Named vector identifier
export EMBEDDING_MODEL="sentence-transformers/all-MiniLM-L6-v2"  # Embedding model
export EMBEDDING_BATCH="64"                         # Batch size for embeddings
export MCP_TRANSPORT="stdio"                        # Transport protocol

Usage

Command Line Options

mcp-server-qdrant-memory --help

Development Mode

Use FastMCP's development mode with inspector:

fastmcp dev src/qdrant_memory_server/main.py

MCP Inspector

You can use the MCP Inspector to test and debug your MCP server interactively:

# Install and run MCP Inspector
npx @modelcontextprotocol/inspector

The MCP Inspector provides a web-based interface to:

  • Test all available tools
  • View tool schemas and documentation
  • Debug server responses
  • Monitor server logs

Integration Examples

Claude Desktop Integration

Add to your Claude Desktop MCP configuration:

{
  "mcpServers": {
    "qdrant-memory": {
      "command": "mcp-server-qdrant-memory",
      "args": [],
      "env": {
        "QDRANT_URL": "http://localhost:6333",
        "QDRANT_COLLECTION_NAME": "claude_memory"
      }
    }
  }
}

Or after PyPI publication, use uvx for automatic installation:

{
  "mcpServers": {
    "qdrant-memory": {
      "command": "uvx",
      "args": ["mcp-server-qdrant-memory"],
      "env": {
        "QDRANT_URL": "http://localhost:6333",
        "QDRANT_COLLECTION_NAME": "claude_memory"
      }
    }
  }
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_server_qdrant_memory-0.0.1.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_server_qdrant_memory-0.0.1-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file mcp_server_qdrant_memory-0.0.1.tar.gz.

File metadata

  • Download URL: mcp_server_qdrant_memory-0.0.1.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mcp_server_qdrant_memory-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d52091df50a81f635942ffa60b383f9679842b7eae4a5c1e958438202e7aefd5
MD5 e14d33299114a6d46a3451f1e009ba57
BLAKE2b-256 1d1a7646a6a7e8e5ec4368f7c2288509aac5fd6b68d4ee4c4ee8a92f8691a918

See more details on using hashes here.

File details

Details for the file mcp_server_qdrant_memory-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for mcp_server_qdrant_memory-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0f1311d44ff666c8b0b79ede626b413ce5259a84b46739dd6c481d1635a0c095
MD5 92dfee5d07fc6ffdfefa2cb84253c3ee
BLAKE2b-256 75cc50e52c80f182fc2bfdba33036bdc4e30b518613289aaa1b4c56991ae1e1c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page