AI Personal Learning
and practical guidance
Ali-painted frog

MCP service built on Qdrant vector search engine

General Introduction

mcp-server-qdrant is a Qdrant vector search engine built on the Model Context Protocol (MCP) server. It is mainly used to help AI systems store and retrieve memories, and is particularly suited to scenarios that require semantic search. This tool enables efficient semantic memory management by transforming information into vectors. It supports a variety of clients, such as Claude Desktop and Cursor, enabling developers or users to easily save and find information. Whether it's personal knowledge management or team code search, mcp-server-qdrant provides an easy-to-use solution. It uses the FastEmbed model to generate embeddings and defaults to the sentence-transformers/all-MiniLM-L6-v2It is also fully open source, based on the Apache 2.0 license, and can be freely used or modified by anyone.

MCP service built on Qdrant vector search engine-1


 

Function List

  • Storing Information: Save textual information and metadata to a Qdrant database, supporting natural language descriptions and structured data.
  • semantic retrieval:: Quickly find the most relevant information or code snippets in a database based on a query.
  • Support for multiple clients: Works seamlessly with MCP-compatible tools such as Claude Desktop, Cursor, and others.
  • Customized Tool Description:: Allow users to adjust the description of the store and find functions to suit different scenarios such as code search or knowledge management.
  • Local and Remote Mode: Supports the flexibility of running Qdrant locally or connecting to a remote server.
  • Embedded Model Support: Uses FastEmbed technology to provide efficient embed generation by default.

 

Using Help

Installation process

The installation of mcp-server-qdrant is very simple and can be done in two ways: using the uvx Run it directly, or install it automatically into Claude Desktop via Smithery.Here are the detailed steps:

Method 1: Install and run with uvx

  1. Preparing the environment: Ensure that your computer has Python 3.10 or above installed, and that you have installed the uvx(a lightweight Python package management tool). If you don't have uvx, which can be installed with the following command:
pip install uv
  1. Setting environment variables: Enter the following command in the terminal to configure the Qdrant server address and collection name.
QDRANT_URL="http://localhost:6333" COLLECTION_NAME="my-collection" uvx mcp-server-qdrant
  • QDRANT_URL: The address of the Qdrant server. If you are running Qdrant locally, you can keep the default value.
  • COLLECTION_NAME: The name of the collection you want to use, such as "my-collection".
  • If you need an API key, add QDRANT_API_KEY="Your key"The
  1. Operations Server: The server is started after the command is executed, and the default is to use the stdio Transfer Protocol. If remote access is required, you can add ---transport sse Parameters:
QDRANT_URL="http://localhost:6333" COLLECTION_NAME="my-collection" uvx mcp-server-qdrant --transport sse

Method 2: Installation to Claude Desktop via Smithery

  1. Installing Smithery: Ensure that you have a Node.js environment by running the following command in a terminal:
npx @smithery/cli install mcp-server-qdrant --client claude
  1. Configuring Claude Desktop: Editor claude_desktop_config.json file in the "mcpServers" Add the following to the section:
{
"qdrant": {
"command": "uvx",
"args": ["mcp-server-qdrant"],
"env": {
"qdrant_url": "http://localhost:6333", "env": {
"QDRANT_API_KEY": "Your key",
"COLLECTION_NAME": "Your collection name"
}
}
}
  1. Start Claude Desktop: After saving the configuration, start Claude Desktop and the server will run automatically.

Local Mode Configuration

If you don't want to rely on a remote Qdrant server, you can use local mode:

  1. Replace QDRANT_URL because of QDRANT_LOCAL_PATH, specify the local database path:
    {
    "qdrant": {
    "command": "uvx",
    "args": ["mcp-server-qdrant"],
    "env": {
    "QDRANT_LOCAL_PATH":"/path/to/qdrant/database", "COLLECTION_NAME": {
    "COLLECTION_NAME": "my-collection"
    }
    }
    }
    
  2. After running, Qdrant starts in local mode and all data is saved in the specified path.

Main Functions

Function 1: Storing information (qdrant-store)

  • use: Save information to the Qdrant database, such as text, code snippets, or notes.
  • procedure:
    1. Prepare the content to be stored, such as a descriptive text (information) and optional metadata (metadata).
      • Example:information="This is a description of a calculator function"(math.) genusmetadata={"code": "def calc(x): return x + 1"}
    2. If using Claude Desktop, open the client and enter a similar command:
      qdrant-store information="This is a description of a calculator function" metadata={"code": "def calc(x): return x + 1"}
      
    3. The server returns a confirmation message indicating that the storage was successful.
  • take note of: Metadata is optional and can be used to store additional information such as codes or labels.

Function 2: Retrieve information (qdrant-find)

  • use:: Find the most relevant content in the database based on natural language queries.
  • procedure:
    1. Enter a query, such as trying to find the code for a certain function:
      qdrant-find query="Calculator function"
      
    2. The server returns matches, each message is displayed separately and may contain a description and a code in the metadata.
    3. Examine the returned results to find what you need.
  • tip: The more specific the query, the more accurate the result. For example, "calculator function" is more accurate than "function".

Function 3: Customized Code Search

  • use: Turn the server into a code search tool for developers.
  • Configuration steps:
    1. Setting environment variables and adjusting tool descriptions:
      QDRANT_URL="http://localhost:6333" COLLECTION_NAME="code-snippets" \
      TOOL_STORE_DESCRIPTION="Store code snippets, information is the description, metadata contains the code" \
      TOOL_FIND_DESCRIPTION="Search for code snippets by description" \
      uvx mcp-server-qdrant --transport sse
      
    2. exist Cursor Configure the server address in, for example http://localhost:8000/sseThe
    3. Save the code:
      qdrant-store information="Calculate the sum of two numbers" metadata={"code": "def add(a, b): return a + b"}
      
    4. Search Code:
      qdrant-find query="Function to add two numbers"
      
  • effect: Returns the most matching code snippet for easy reuse.

Examples of usage scenarios

  1. Personal knowledge management: Save notes or document fragments and retrieve them in natural language at any time.
  2. Teamwork:: Run servers in the cloud to share code or knowledge bases.
  3. local development: Tested in local mode, not network dependent.

caveat

  • Ensure that the Qdrant service is started (locally or remotely).
  • The default embedding model is sentence-transformers/all-MiniLM-L6-v2The model can only be used with models that are supported by FastEmbed.
  • SSE mode is good for remote access, stdio is good for local clients.
CDN1
May not be reproduced without permission:Chief AI Sharing Circle " MCP service built on Qdrant vector search engine

Chief AI Sharing Circle

Chief AI Sharing Circle specializes in AI learning, providing comprehensive AI learning content, AI tools and hands-on guidance. Our goal is to help users master AI technology and explore the unlimited potential of AI together through high-quality content and practical experience sharing. Whether you are an AI beginner or a senior expert, this is the ideal place for you to gain knowledge, improve your skills and realize innovation.

Contact Us
en_USEnglish