mcp-server-milvus is an open-source project developed by Zilliz Tech that provides a Model Context Protocol (MCP) server implementation for the Milvus vector database. This project enables LLM applications to seamlessly integrate and access the functionality of the Milvus vector database through a standardized protocol.
The MCP server provides the following core tools:
milvus_text_search
: Searches documents using full-text search functionality.
milvus_vector_search
: Performs vector similarity search on a collection.
milvus_query
: Queries a collection using a filter expression.
milvus_list_collections
: Lists all collections in the database.
milvus_create_collection
: Creates a new collection with a specified schema.
milvus_load_collection
: Loads a collection into memory for searching and querying.
milvus_release_collection
: Releases a collection from memory.
milvus_insert_data
: Inserts data into a collection.
milvus_delete_entities
: Deletes entities from a collection based on a filter expression.
git clone https://github.com/zilliztech/mcp-server-milvus.git
cd mcp-server-milvus
The recommended way is to use uv to run the server directly without installation:
uv run src/mcp_server_milvus/server.py --milvus-uri http://localhost:19530
Or by setting environment variables in the .env
file:
uv run src/mcp_server_milvus/server.py
The MCP server can be used with various LLM applications that support the Model Context Protocol:
claude_desktop_config.json
file:{
"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 supports two configuration methods:
stdio
milvus
/PATH/TO/uv --directory /path/to/mcp-server-milvus/src/mcp_server_milvus run server.py --milvus-uri http://127.0.0.1:19530
Create a .cursor/mcp.json
file:
{
"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"
]
}
}
}
MILVUS_URI
: Milvus server URI (alternative to the --milvus-uri parameter)MILVUS_TOKEN
: Optional authentication tokenMILVUS_DB
: Database name (defaults to "default")Users can interact with the Milvus database through natural language:
Query the list of collections:
What are the collections I have in my Milvus DB?
Search for documents:
Find documents in my text_collection that mention "machine learning"
Create a new collection:
Create a new collection called 'articles' in Milvus with fields for title (string), content (string), and a vector field (128 dimensions)
127.0.0.1
instead of localhost
MILVUS_TOKEN
is correctThe project is developed based on Python and adopts a modern development toolchain:
This project is mainly suitable for the following scenarios:
Through mcp-server-milvus, developers can easily integrate the powerful features of the Milvus vector database into various AI applications, providing users with a more intelligent and accurate interactive experience.