Get the FREE Ultimate OpenClaw Setup Guide →

mcp -milvus

Model Context Protocol Servers for Milvus

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio zilliztech-mcp-server-milvus uv run src/mcp_server_milvus/server.py --milvus-uri http://localhost:19530 \
  --env ENV_FILE=".env (optional, priority over CLI arguments)" \
  --env MILVUS_URI="http://localhost:19530 (Milvus endpoint)"

How to use

This MCP server exposes Milvus vector database capabilities through the MCP (Model Context Protocol) interface. It enables LLM-powered applications to query and interact with Milvus collections using tools like milvus_text_search, milvus_vector_search, milvus_hybrid_search, and milvus_text_similarity_search. You can run the server in stdio mode or in Server-Sent Events (SSE) mode, depending on whether you need a simple local integration or a web-facing channel for multi-client access. Tools are invoked via MCP clients that implement the standard MCP tool interface, allowing you to perform text search, vector search, and hybrid queries against Milvus collections, returning structured results with configurable fields.

How to install

Prerequisites:

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

Install and run (stdio mode):

  1. Clone the repository: git clone https://github.com/zilliztech/mcp-server-milvus.git cd mcp-server-milvus
  2. Install dependencies (via your Python environment): pip install -r requirements.txt
  3. Start the server in stdio mode (default): uv run src/mcp_server_milvus/server.py --milvus-uri http://localhost:19530

Optional: run in SSE mode for HTTP-based communication:

  1. Start SSE server: uv run src/mcp_server_milvus/server.py --sse --milvus-uri http://localhost:19530 --port 8000
  2. The MCP inspector and testing utilities can be accessed as described in the README.

Additional notes

Tips and tips:

  • Ensure Milvus is reachable at the specified URI (default http://localhost:19530).
  • In SSE mode, the server exposes an HTTP endpoint (default port 8000) for MCP clients to connect. You can configure Claude Desktop or Cursor using the provided examples in the README.
  • The .env file is prioritized over CLI arguments when set; use it to pin Milvus URI or other settings for consistent runs.
  • Available tools include: milvus_text_search, milvus_vector_search, milvus_hybrid_search, milvus_text_similarity_search. Each tool accepts a set of parameters as documented in the README (collection_name, query_text, vector, etc.).
  • If you encounter connection or query issues, verify Milvus collections exist and that the Milvus user has appropriate access rights.
  • For debugging in SSE mode, you can use the MCP inspector URL shown in the logs to test queries interactively.

Related MCP Servers

Sponsor this space

Reach thousands of developers