
How to add Milvus MCP Server to Claude Desktop
Connect LLMs to the Milvus vector database for vector, text, and hybrid search plus collection management. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.
Last updated June 14, 2026 ยท 233โ ยท stdio ยท apikey ยท official
Claude Desktop config for Milvus MCP Server
{
"mcpServers": {
"milvus-mcp-server": {
"command": "/PATH/TO/uv",
"args": [
"--directory",
"/path/to/mcp-server-milvus/src/mcp_server_milvus",
"run",
"server.py",
"--milvus-uri",
"http://localhost:19530"
]
}
}
}Setup steps
- 1Open Claude Desktop โ Settings โ Developer โ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
- 2Paste the Milvus MCP Server config below under the top-level "mcpServers" key.
- 3Fill in any placeholder secrets (API keys, paths) in the snippet.
- 4Save the file, then fully quit and reopen Claude Desktop.
- 5Open a chat and confirm Milvus MCP Server's tools appear under the ๐ tools menu.
Before you start
- Python 3.10 or higher
- A running Milvus instance (local or remote)
- uv installed (recommended for running the server)
What Milvus MCP Server can do in Claude Desktop
milvus_text_searchSearch for documents using full text search. Parameters: collection_name, query_text, limit (default 5), output_fields, drop_ratio (proportion of low-frequency terms to ignore, 0.0-1.0, default 0.2).
milvus_vector_searchPerform vector similarity search on a collection. Parameters: collection_name, vector, vector_field (default 'vector'), limit (default 5), output_fields, filter_expr, metric_type (COSINE, L2, IP; default COSINE), radius, range_filter.
milvus_hybrid_searchPerform hybrid (text + vector) search on a collection. Parameters: collection_name, query_text, text_field, vector, vector_field, limit (default 5), output_fields, filter_expr, sparse_radius, sparse_range_filter, dense_radius, dense_range_filter.
milvus_text_similarity_searchPerform text similarity search on a collection (Milvus 2.6.0+ only; requires an embedding function set on the Milvus server). Parameters: collection_name, query_text, anns_field, limit (default 5), output_fields, metric_type (default COSINE), filter_expr, radius, range_filter.
milvus_queryQuery a collection using filter expressions. Parameters: collection_name, filter_expr (e.g. 'age > 20'), output_fields, limit (default 10).
milvus_list_collectionsList all collections in the database.
milvus_create_collectionCreate a new collection with quick setup or a customized schema. Parameters include collection_name, auto_id (default True), dimension (default 768), primary_field_name (default 'id'), vector_field_name (default 'vector'), metric_type (default COSINE), field_schema, index_params, and other_kwargs.
milvus_load_collectionLoad a collection into memory for search and query. Parameters: collection_name, replica_number (default 1).
Security
Authentication to Milvus is optional and configured via the MILVUS_TOKEN environment variable. If your Milvus instance requires auth, set MILVUS_TOKEN; ensure the configured account has only the permissions needed for the operations you intend to perform. Connection URIs and tokens are passed via CLI args or a local .env file in src/mcp_server_milvus/.
Milvus MCP Server + Claude Desktop FAQ
Where is the Claude Desktop config file?
Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the Milvus MCP Server config there under the "mcpServers" key and restart the client.
Is Milvus MCP Server safe to use with Claude Desktop?
Authentication to Milvus is optional and configured via the MILVUS_TOKEN environment variable. If your Milvus instance requires auth, set MILVUS_TOKEN; ensure the configured account has only the permissions needed for the operations you intend to perform. Connection URIs and tokens are passed via CLI args or a local .env file in src/mcp_server_milvus/.
Which transports does the server support?
Three: stdio (default), SSE (HTTP Server-Sent Events), and Streamable HTTP (recommended for production, with an optional stateless mode). The transport is selected with CLI flags such as --sse or --streamable-http.
How do I authenticate to Milvus?
Authentication is optional. Set the MILVUS_TOKEN environment variable if your Milvus instance requires it. The Milvus URI is set with --milvus-uri or the MILVUS_URI variable, and the database with MILVUS_DB (defaults to 'default').
Do I need to install the package?
No. The recommended approach is to clone the repo and run the server directly with uv (e.g. uv run src/mcp_server_milvus/server.py --milvus-uri http://localhost:19530); both Claude Desktop and Cursor are configured to launch it this way.