Milvus

Databases

Model Context Protocol Servers for Milvus.

Your AI app calls the Milvus MCP server, which does the work through tools like milvus_text_search, milvus_vector_search, milvus_hybrid_search and milvus_list_collections and sends the result back to the chat.

About Milvus

Milvus is a community MCP server from zilliztech, filed in our directory under databases. Model Context Protocol Servers for Milvus.

The README for Milvus lists tools such as milvus_text_search, milvus_vector_search, milvus_hybrid_search and milvus_text_similarity_search, which your AI app can call once the server is connected.

At a glance

Publisher
zilliztech (community)
Runs
See the README for setup
Written in
Python
License
Apache-2.0
GitHub stars
244

Tools Milvus gives your AI app

  • milvus_text_searchSearch for documents using full text search.
  • milvus_vector_searchPerform vector similarity search on a collection.
  • milvus_hybrid_searchPerform hybrid search on a collection.
  • milvus_text_similarity_searchPerform text similarity search on a collection.
  • milvus_queryQuery collection using filter expressions.
  • milvus_list_collectionsList all collections in the database.
  • milvus_create_collectionCreate a new collection with quick setup or customized schema.
  • milvus_load_collectionLoad a collection into memory for search and query.
  • milvus_release_collectionRelease a collection from memory.
  • milvus_get_collection_infoLists detailed information like schema, properties, collection ID, and other metadata of a specific collection.
  • milvus_insert_dataInsert data into a collection.
  • milvus_delete_entitiesDelete entities from a collection based on filter expression.

Tool names as the Milvus README lists them. Your AI app shows the live list once Milvus is connected.

How to set up Milvus

  1. Follow the install steps in the Milvus README; it is written in Python, so have that toolchain ready.
  2. Check the Milvus README for keys or settings; the registry lists none that Milvus requires.
  3. Add Milvus to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Milvus tools to confirm the connection.
  5. Run one read-only task with Milvus first, such as a call to milvus_text_search, before you allow anything that writes or sends.

Milvus compared with similar servers

  • Parse Dmarc by dmarcguardhq has fewer GitHub stars than Milvus (238 against 244); both are community servers, and both run locally.
  • MySQL MCP Server Pro by wenb1n-dev has more GitHub stars than Milvus (249 against 244); both are community servers, and both run locally.
  • Xiyan by XGenerationLab has fewer GitHub stars than Milvus (238 against 244); both are community servers, and both run locally.

Before you connect Milvus

  • Give Milvus its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Milvus tool call until you trust what it does with them.
  • Treat text that Milvus fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Milvus on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Milvus

How marketing and sales teams put Milvus to work, by company size. Pick the size closest to yours and start Milvus on one use case.

Small business

  • A small business with its own app can ask Milvus plain questions about customers and orders, without writing SQL.
  • Owners can use Milvus to pull a list of customers who haven't bought in 90 days and plan a win-back email.
  • Milvus runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Marketing analysts can connect Milvus to answer campaign questions from the warehouse directly, instead of waiting on the data team's queue.
  • Lifecycle teams can use Milvus to build audience lists from product data and check counts before a send.
  • Start with milvus_text_search and milvus_vector_search, the tools Milvus lists first, and add more once the team trusts the results.

Enterprise

  • Enterprises should point Milvus at a read replica with a read-only role, so agents query freely without risk to production data.
  • Data teams can expose curated views through Milvus, so marketing gets self-serve answers without access to raw customer tables.
  • Milvus is a community server, so have security review the code and pin a version before Milvus touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Milvus README

From zilliztech/mcp-server-milvus on GitHub, shared under its Apache-2.0 license. Images are left out; the original has them.

README.md

MCP Server for Milvus

The Model Context Protocol (MCP) is an open protocol that enables seamless integration between LLM applications and external data sources and tools. Whether you're building an AI-powered IDE, enhancing a chat interface, or creating custom AI workflows, MCP provides a standardized way to connect LLMs with the context they need.

This repository contains a MCP server that provides access to Milvus vector database functionality.

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)

Usage

The recommended way to use this MCP server is to run it directly with uv without installation. This is how both Claude Desktop and Cursor are configured to use it in the examples below.

If you want to clone the repository:

git clone https://github.com/zilliztech/mcp-server-milvus.git
cd mcp-server-milvus

Then you can run the server directly:

uv run src/mcp_server_milvus/server.py --milvus-uri http://localhost:19530

Alternatively you can change the .env file in the src/mcp_server_milvus/ directory to set the environment variables and run the server with the following command:

uv run src/mcp_server_milvus/server.py
Important: the .env file will have higher priority than the command line arguments.
Running Modes

The server supports two running modes: stdio (default) and SSE (Server-Sent Events).

Stdio Mode (Default)
  • Description: Communicates with the client via standard input/output. This is the default mode if no mode is specified.

  • Usage:

    uv run src/mcp_server_milvus/server.py --milvus-uri http://localhost:19530
    
SSE Mode
  • Description: Uses HTTP Server-Sent Events for communication. This mode allows multiple clients to connect via HTTP and is suitable for web-based applications.

  • Usage:

    uv run src/mcp_server_milvus/server.py --sse --milvus-uri http://localhost:19530 --port 8000
    
    • --sse: Enables SSE mode.
    • --port: Specifies the port for the SSE server (default: 8000).
  • Debugging in SSE Mode:

    If you want to debug in SSE mode, after starting the SSE service, enter the following command:

    mcp dev src/mcp_server_milvus/server.py
    

    The output will be similar to:

    % mcp dev src/mcp_server_milvus/merged_server.py
    Starting MCP inspector...
    ⚙️ Proxy server listening on port 6277
    🔍 MCP Inspector is up and running at http://127.0.0.1:6274 🚀
    

    You can then access the MCP Inspector at http://127.0.0.1:6274 for testing.

Streamable HTTP Mode
  • Description: Uses HTTP with streaming support for communication. This is the recommended transport for production deployments and supports both stateful and stateless operation.

  • Usage:

    uv run src/mcp_server_milvus/server.py --streamable-http --milvus-uri http://localhost:19530 --port 8000
    
    • --streamable-http: Enables Streamable HTTP mode.
    • --port: Specifies the port for the server (default: 8000).
    • --stateless: Optional flag for stateless mode (no session persistence).
  • Stateless Mode:

    uv run src/mcp_server_milvus/server.py --streamable-http --stateless --milvus-uri http://localhost:19530 --port 8000
    

Supported Applications

This MCP server can be used with various LLM applications that support the Model Context Protocol:

  • Claude Desktop: Anthropic's desktop application for Claude
  • Cursor: AI-powered code editor with MCP support
  • Custom MCP clients: Any application implementing the MCP client specification

Usage with Claude Desktop

Configuration for Different Modes
SSE Mode Configuration

Follow these steps to configure Claude Desktop for SSE mode:

  1. Install Claude Desktop from https://claude.ai/download.
  2. Open your Claude Desktop configuration file:
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  3. Add the following configuration for SSE mode:
{
  "mcpServers": {
    "milvus-sse": {
      "url": "http://your_sse_host:port/sse",
      "disabled": false,
      "autoApprove": []
    }
  }
}
Streamable HTTP Mode Configuration
{
  "mcpServers": {
    "milvus-streamable-http": {
      "url": "http://your_host:port/mcp",
      "disabled": false,
      "autoApprove": []
    }
  }
}
  1. Restart Claude Desktop to apply the changes.
Stdio Mode Configuration

For stdio mode, follow these steps:

  1. Install Claude Desktop from https://claude.ai/download.
  2. Open your Claude Desktop configuration file:
    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  3. Add the following configuration for stdio mode:
{
  "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 to apply the changes.

Usage with Cursor

Cursor also supports MCP tools. You can integrate your Milvus MCP server with Cursor by following these steps:

Integration Steps
  1. Open Cursor Settings > MCP
  2. Click on Add new global MCP server
  3. After clicking, it will automatically redirect you to the mcp.json file, which will be created if it doesn’t exist
Configuring the mcp.json File
For Stdio Mode:

Overwrite the 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"
      ]
    }
  }
}
For SSE Mode:
  1. Start the service by running the following command:

    uv run src/mcp_server_milvus/server.py --sse --milvus-uri http://your_sse_host --port port
    

    Note: Replace http://your_sse_host with your actual SSE host address and port with the specific port number you’re using.

  2. Once the service is up and running, overwrite the mcp.json file with the following content:

    {
        "mcpServers": {
          "milvus-sse": {
            "url": "http://your_sse_host:port/sse",
            "disabled": false,
            "autoApprove": []
          }
        }
    }
    
For Streamable HTTP Mode:
  1. Start the service:

    uv run src/mcp_server_milvus/server.py --streamable-http --milvus-uri http://your_host --port port
    
  2. Update mcp.json:

    {
      "mcpServers": {
        "milvus-streamable-http": {
          "url": "http://your_host:port/mcp",
          "disabled": false,
          "autoApprove": []
        }
      }
    }
    
Completing the Integration

After completing the above steps, restart Cursor or reload the window to ensure the configuration takes effect.

Verifying the Integration

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

  1. Open Cursor Settings > MCP
  2. Check if "milvus", "milvus-sse", or "milvus-streamable-http" appear in the list (depending on the mode you have chosen)
  3. Confirm that the relevant tools are listed (e.g., milvus_list_collections, milvus_vector_search, etc.)
  4. If the server is enabled but shows an error, check the Troubleshooting section below

Available Tools

The server provides the following tools:

Search and Query Operations
  • milvus_text_search: Search for documents using full text search

    • Parameters:
      • collection_name: Name of collection to search
      • query_text: Text to search for
      • limit: The maximum number of results to return (default: 5)
      • output_fields: Fields to include in results
      • drop_ratio: Proportion of low-frequency terms to ignore (0.0-1.0) (default: 0.2)
  • milvus_vector_search: Perform vector similarity search on a collection

    • Parameters:
      • collection_name: Name of collection to search
      • vector: Query vector
      • vector_field: Field name for vector search (default: "vector")
      • limit: The maximum number of results to return (default: 5)
      • output_fields: Fields to include in results
      • filter_expr: Filter expression
      • metric_type: Distance metric (COSINE, L2, IP) (default: "COSINE")
      • radius: Optional lower bound for range search (default: None)
      • range_filter: Optional upper bound for range search (default: None)
  • milvus_hybrid_search: Perform hybrid search on a collection

    • Parameters:
      • collection_name: Name of collection to search
      • query_text: Text query for search
      • text_field: Field name for text search
      • vector: Vector of the text query
      • vector_field: Field name for vector search
      • limit: The maximum number of results to return (default: 5)
      • output_fields: Fields to include in results
      • filter_expr: Filter expression
      • sparse_radius: Optional lower bound for sparse range search (default: None)
      • sparse_range_filter: Optional upper bound for sparse range search (default: None)
      • dense_radius: Optional lower bound for dense range search (default: None)
      • dense_range_filter: Optional upper bound for dense range search (default: None)
  • milvus_text_similarity_search: Perform text similarity search on a collection

    Note: This tool is only supported in Milvus 2.6.0 and above. And you need to set the embedding function at the Milvus server. See Embedding Function for more details.

    • Parameters:
      • collection_name: Name of collection to search
      • query_text: Text query for similarity search
      • anns_field: Field name for text search
      • limit: The maximum number of results to return (default: 5)
      • output_fields: Fields to include in results
      • metric_type: Distance metric (COSINE, L2, IP) (default: "COSINE")
      • filter_expr: Optional filter expression
      • radius: Optional lower bound for range search (default: None)
      • range_filter: Optional upper bound for range search (default: None)
  • milvus_query: Query collection using filter expressions

    • Parameters:
      • collection_name: Name of collection to query
      • filter_expr: Filter expression (e.g. 'age > 20')
      • output_fields: Fields to include in results
      • limit: The maximum number of results to return (default: 10)
Collection Management
  • milvus_list_collections: List all collections in the database

  • milvus_create_collection: Create a new collection with quick setup or customized schema

    • Parameters:
      • collection_name: Name for the new collection
      • auto_id: whether to auto generate id, default to True
      • dimension: vector dimension, default to 768; for quick setup and will be ignored if field_schema is provided
      • primary_field_name: name of the primary field, default to "id"; for quick setup and will be ignored if field_schema is provided
      • vector_field_name: name of the vector field, default to "vector"; for quick setup and will be ignored if field_schema is provided
      • metric_type: metric type, default to "COSINE"; for quick setup and will be ignored if field_schema is provided
      • field_schema: List of field schema, each element is a dictionary with the following keys:
        • name: name of the field
        • type: type of the field
      • index_params: Optional list of index parameters, each element is a dictionary with the following keys:
        • field_name: name of the field to index
        • index_type: index type
        • **kwargs: other optional index parameters
      • other_kwargs: Additional keyword arguments for the collection creation
  • milvus_load_collection: Load a collection into memory for search and query

    • Parameters:
      • collection_name: Name of collection to load
      • replica_number: Number of replicas (default: 1)
  • milvus_release_collection: Release a collection from memory

    • Parameters:
      • collection_name: Name of collection to release
  • milvus_get_collection_info: Lists detailed information like schema, properties, collection ID, and other metadata of a specific collection.

    • Parameters:
      • collection_name: Name of the collection to get detailed information about
Data Operations
  • milvus_insert_data: Insert data into a collection

    • Parameters:
      • collection_name: Name of collection
      • data: Dictionary mapping field names to lists of values
  • milvus_delete_entities: Delete entities from a collection based on filter expression

    • Parameters:
      • collection_name: Name of collection
      • filter_expr: Filter expression to select entities to delete

Environment Variables

  • MILVUS_URI: Milvus server URI (can be set instead of --milvus-uri)
  • MILVUS_TOKEN: Optional authentication token
  • MILVUS_DB: Database name (defaults to "default")

Development

To run the server directly:

uv run server.py --milvus-uri http://localhost:19530

Examples

Using Claude Desktop
Example 1: Listing Collections
What are the collections I have in my Milvus DB?

Claude will then use MCP to check this information on your Milvus DB.

I'll check what collections are available in your Milvus database.

Here are the collections in your Milvus database:

1. rag_demo
2. test
3. chat_messages
4. text_collection
5. image_collection
6. customized_setup
7. streaming_rag_demo
Example 2: Searching for Documents
Find documents in my text_collection that mention "machine learning"

Claude will use the full-text search capabilities of Milvus to find relevant documents:

I'll search for documents about machine learning in your text_collection.

> View result from milvus-text-search from milvus (local)

Here are the documents I found that mention machine learning:
[Results will appear here based on your actual data]
Using Cursor
Example: Creating a Collection

In Cursor, you can ask:

Create a new collection called 'articles' in Milvus with fields for title (string), content (string), and a vector field (128 dimensions)

Cursor will use the MCP server to execute this operation:

I'll create a new collection called 'articles' with the specified fields.

Collection 'articles' has been created successfully with the following schema:
- title: string
- content: string
- vector: float vector[128]

Troubleshooting

Common Issues
Connection Errors

If you see errors like "Failed to connect to Milvus server":

  1. Verify your Milvus instance is running: docker ps (if using Docker)
  2. Check the URI is correct in your configuration
  3. Ensure there are no firewall rules blocking the connection
  4. Try using 127.0.0.1 instead of localhost in the URI
Authentication Issues

If you see authentication errors:

  1. Verify your MILVUS_TOKEN is correct
  2. Check if your Milvus instance requires authentication
  3. Ensure you have the correct permissions for the operations you're trying to perform
Tool Not Found

If the MCP tools don't appear in Claude Desktop or Cursor:

  1. Restart the application
  2. Check the server logs for any errors
  3. Verify the MCP server is running correctly
  4. Press the refresh button in the MCP settings (for Cursor)
Getting Help

If you continue to experience issues:

  1. Check the GitHub Issues for similar problems
  2. Join the Milvus Community Discord for support
  3. File a new issue with detailed information about your problem

Questions about Milvus

What is the Milvus MCP server?

Model Context Protocol Servers for Milvus. Milvus is maintained by zilliztech on GitHub at zilliztech/mcp-server-milvus, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Milvus MCP server?

Milvus doesn't publish a one-line install in the MCP registry, so follow the setup steps in its README on GitHub (zilliztech/mcp-server-milvus). Like most servers, Milvus ends with a command or URL you paste into your AI app's MCP config.

Does Milvus need an API key?

The registry lists no required keys for Milvus. Check the Milvus README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Milvus an official MCP server?

No. Milvus is a community server maintained by zilliztech. Community servers can be excellent; read the code and the open issues before you give Milvus access to company data.

What license is Milvus under?

Milvus is released under the Apache-2.0 license, according to its GitHub repository. The license covers the code of Milvus; the service it connects to has its own terms.