
How to add Milvus MCP Server to Cursor
Connect LLMs to the Milvus vector database for vector, text, and hybrid search plus collection management. Paste the config into ~/.cursor/mcp.json and restart Cursor.
Last updated June 14, 2026 · 233★ · stdio · apikey · official
Cursor 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 Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
- 2Paste the Milvus MCP Server config below into the "mcpServers" object.
- 3Fill in placeholder secrets, then save.
- 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
- 5Ask Cursor to use one of Milvus MCP Server's tools to confirm it's connected.
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 Cursor
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 + Cursor FAQ
Where is the Cursor config file?
Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the Milvus MCP Server config there under the "mcpServers" key and restart the client.
Is Milvus MCP Server safe to use with Cursor?
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.