Back to MCP Catalog

Milvus Vector Database MCP Server

DatabasesPython
Connect to Milvus vector database for semantic search and vector operations
Available Tools

milvus_text_search

Search for documents using full text search

collection_namequery_textlimitoutput_fields

milvus_vector_search

Search for similar vectors in a collection

collection_namequery_textlimitoutput_fields

milvus_list_collections

List all collections in the Milvus database

milvus_get_collection_info

Get information about a specific collection

collection_name

The Milvus MCP server provides a seamless integration between LLM applications and Milvus vector database functionality. It enables AI assistants to perform vector similarity searches, manage collections, and execute queries against your vector database, making it ideal for semantic search, recommendation systems, and other vector-based applications.

Overview

The Milvus MCP server enables AI assistants to interact directly with your Milvus vector database. This integration allows LLMs to perform vector similarity searches, manage collections, and execute queries against your vector database without requiring you to build custom integrations.

Prerequisites

Before using this MCP server, ensure you have:

  • Python 3.10 or higher
  • A running Milvus instance (local or remote)
  • uv installed (recommended for running the server)

Installation

The recommended way to use this MCP server is to run it directly with uv without installation.

  1. Clone the repository:
git clone https://github.com/zilliztech/mcp-server-milvus.git
cd mcp-server-milvus
  1. Run the server directly:
uv run src/mcp_server_milvus/server.py --milvus-uri http://localhost:19530

Alternatively, you can configure the connection details in the .env file in the src/mcp_server_milvus/ directory and run:

uv run src/mcp_server_milvus/server.py

Note: The .env file will have higher priority than the command line arguments.

Configuration with Claude Desktop

  1. Install Claude Desktop from https://claude.ai/download

  2. Open your Claude Desktop configuration:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  3. Add the Milvus MCP server configuration:

{
  "mcpServers": {
    "milvus": {
      "command": "/PATH/TO/uv",
      "args": [
        "--directory",
        "/path/to/mcp-server-milvus/src/mcp_server_milvus",
        "run",
        "server.py",
        "--milvus-uri",
        "http://localhost:19530"
      ]
    }
  }
}
  1. Restart Claude Desktop

Configuration with Cursor

Option 1: Using Cursor Settings UI

  1. Go to Cursor Settings > Features > MCP
  2. Click on the + Add New MCP Server button
  3. Fill out the form:
    • Type: Select stdio
    • Name: milvus
    • Command: /PATH/TO/uv --directory /path/to/mcp-server-milvus/src/mcp_server_milvus run server.py --milvus-uri http://127.0.0.1:19530

⚠️ Note: Use 127.0.0.1 instead of localhost to avoid potential DNS resolution issues.

Option 2: Using Project-specific Configuration (Recommended)

  1. Create a .cursor directory in your project root:
mkdir -p /path/to/your/project/.cursor
  1. Create a mcp.json file with the following content:
{
  "mcpServers": {
    "milvus": {
      "command": "/PATH/TO/uv",
      "args": [
        "--directory",
        "/path/to/mcp-server-milvus/src/mcp_server_milvus",
        "run",
        "server.py",
        "--milvus-uri",
        "http://127.0.0.1:19530"
      ]
    }
  }
}
  1. Restart Cursor or reload the window

Verifying the Integration

To verify that your application has successfully integrated with the Milvus MCP server:

  1. Open the settings for MCP in your application
  2. Check that "Milvus" appears in the list of MCP servers
  3. Verify that the Milvus tools are listed
  4. Try asking your AI assistant to perform a vector search or list collections in your Milvus database

Usage Examples

Once configured, you can ask your AI assistant to perform operations like:

  • "Search for documents similar to 'machine learning algorithms' in my vector database"
  • "List all collections in my Milvus database"
  • "Get information about the 'documents' collection in Milvus"
  • "Perform a vector search for content similar to this paragraph..."

The AI will automatically use the appropriate Milvus tools to fulfill your requests.

Related MCPs

MotherDuck DuckDB
DatabasesPython

SQL analytics with DuckDB and MotherDuck for AI assistants

Alibaba Cloud Tablestore
DatabasesJava, Python

Connect to Alibaba Cloud Tablestore for vector search and RAG applications

Elasticsearch/OpenSearch Integration
DatabasesPython

Interact with Elasticsearch and OpenSearch clusters through a comprehensive set of tools

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.