This MCP server for Milvus provides a seamless way to integrate Milvus vector database capabilities with LLM applications that support the Model Context Protocol. It enables AI applications to access, search, and manage vector data for enhanced contextual capabilities.
Before installing the MCP server, ensure you have:
The recommended way to use this MCP server is to run it directly with uv
without installation:
git clone https://github.com/zilliztech/mcp-server-milvus.git
cd mcp-server-milvus
uv run src/mcp_server_milvus/server.py --milvus-uri http://localhost:19530
Alternatively, you can set environment variables in the .env
file and run:
uv run src/mcp_server_milvus/server.py
Note: The .env
file takes precedence over command line arguments.
Communicates with the client via standard input/output:
uv run src/mcp_server_milvus/server.py --milvus-uri http://localhost:19530
Uses HTTP Server-Sent Events for communication, allowing multiple clients to connect:
uv run src/mcp_server_milvus/server.py --sse --milvus-uri http://localhost:19530 --port 8000
To debug in SSE mode, after starting the service:
mcp dev src/mcp_server_milvus/server.py
Then access the MCP Inspector at http://127.0.0.1:6274
for testing.
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"milvus-sse": {
"url": "http://your_sse_host:port/sse",
"disabled": false,
"autoApprove": []
}
}
}
{
"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"
]
}
}
}
Cursor Settings
> MCP
Add new global MCP server
mcp.json
file that appears{
"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"
]
}
}
}
Start the service:
uv run src/mcp_server_milvus/server.py --sse --milvus-uri http://your_sse_host --port port
Then add to mcp.json
:
{
"mcpServers": {
"milvus-sse": {
"url": "http://your_sse_host:port/sse",
"disabled": false,
"autoApprove": []
}
}
}
milvus_text_search: Search for documents using full text search
milvus_vector_search: Perform vector similarity search
milvus_hybrid_search: Perform hybrid search
milvus_query: Query collection using filter expressions
milvus_list_collections: List all collections in the database
milvus_create_collection: Create a new collection
milvus_load_collection: Load a collection into memory
milvus_release_collection: Release a collection from memory
milvus_get_collection_info: Get detailed information about a collection
milvus_insert_data: Insert data into a collection
milvus_delete_entities: Delete entities based on filter
MILVUS_URI
: Milvus server URIMILVUS_TOKEN
: Optional authentication tokenMILVUS_DB
: Database name (defaults to "default")127.0.0.1
instead of localhost
MILVUS_TOKEN
is correctIf you continue to experience issues, check the GitHub Issues or join the Zilliz Community Discord for support.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > MCP and click "Add new global MCP server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"cursor-rules-mcp": {
"command": "npx",
"args": [
"-y",
"cursor-rules-mcp"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explictly ask the agent to use the tool by mentioning the tool name and describing what the function does.