milvus-mcp-server
If you are the rightful owner of milvus-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This repository provides a setup to connect Anthropic's Claude to a Milvus vector database using the Model Context Protocol (MCP).
Claude-Compatible Milvus MCP Server
This repo provides everything needed to connect Anthropic's Claude (via Claude Desktop) to a Milvus vector database using the MCP (Model Context Protocol). It includes:
- π§ A fully MCP-compatible FastMCP server
- ποΈ Milvus setup (via Docker)
- π οΈ Shell script to launch the server correctly for Claude
- β Official Milvus tool names for Claude compatibility
π¦ Folder Structure
. βββ milvus-standalone/ # Contains Docker Compose for Milvus β βββ docker-compose.yml β βββ config/ # Milvus etcd config files (if needed) βββ fastmcp/ β βββ milvus-server/ # Your custom MCP server files β β βββ server.py # MCP server code β β βββ run_milvus_server.sh # Shell script to launch server for Claude β βββ .venv/ # uv-managed Python virtual env β βββ pyproject.toml # FastMCP + dependencies βββ claude_desktop_config.json # Add this entry to Claude's config βββ README.md
π Setup Guide
-
Clone the Repo bash Copy Edit git clone https://github.com/YOUR_USERNAME/milvus-mcp-server cd milvus-mcp-server
-
Run Milvus (Docker) Ensure Docker is installed and running. cd milvus-standalone docker-compose up -d
-
Install uv (if you havenβt yet) brew install uv
-
Sync Python Environment Inside fastmcp/: cd fastmcp uv sync
-
Test the Server uv run python milvus-server/server.py You should see logs like:
pgsql Copy Edit INFO: Connected to Milvus β Server loaded and tools are registered
- Update Claude Config Update claude_desktop_config.json like so: } "milvus": { "command": "/full/path/to/run_milvus_server.sh", "args": [] }
Make sure to restart Claude after this.
- Ask Claude Try:
βCall the Milvus tool to list all collections.β
It should now connect and execute.
π§ Tool Naming Rules (Critical!)
Claude only recognizes tools if they exactly match Milvus naming conventions. Do not rename tools. Use:
create_collection
list_collections
search
etc.
Use @mcp.tool(name="create_collection") β the name is case-sensitive.
π§ͺ Debugging Tips
Ensure Milvus Docker is healthy (docker ps)
Check FastMCP server logs in the terminal
Add print statements in tools to debug
Make sure .venv and uv are used consistently
Don't use emojis or non-ASCII characters in tool descriptions
π Next Steps
Add more tools (delete_collection, upsert, etc.)
Add test scripts (test_server.py)
Add GitHub Actions for validation
π§ͺ Tests
To manually run tool tests, use the test_server_full.py or Claude Desktop interface.
π€ Credits
- Built by @TerrysPOV
- Powered by FastMCP
- Vectors stored in Milvus
- Embeddings via OpenAI (text-embedding-ada-002)
π License
MIT