About Mcp Milvus
Mcp Milvus is a Go MCP server for operating Milvus vector databases. It provides database, collection, index, data, and connection tools, with session connection pooling and middleware support.
Key features
- 01Database and collection lifecycle operations
- 02Create and remove indexes
- 03Insert, upsert, delete, and query data
- 04Similarity and hybrid vector search
- 05Session-based connection pooling
- 06Logging and authentication middleware
Use cases
- 01Manage Milvus databases and collections
- 02Run vector and hybrid searches
- 03Insert or update vector database records
MCP support
The server exposes Milvus connection and database-operation tools to MCP clients. It supports communication through the SSE interface.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEMCP Milvus
A Model Context Protocol (MCP) server for Milvus vector database, providing comprehensive vector database operations.
🚀 Features
- Complete Milvus Operations: Full lifecycle management of databases, collections, and indexes
- High-Performance Vector Search: Support for similarity search, hybrid search, and more retrieval methods
- Intelligent Session Management: Efficient connection pooling based on Ristretto cache
- Engineering Architecture: Modular design for easy extension and maintenance
- Middleware Support: Built-in logging, authentication, and other middleware
- Docker Support: Complete containerized deployment solution
- Type Safety: Go's strong type system ensures API safety
📋 Supported Tools
Database Management
milvus_create_database- Create databasemilvus_list_databases- List all databasesmilvus_use_database- Switch database
Collection Management
milvus_create_collection- Create collectionmilvus_drop_collection- Drop collectionmilvus_list_collections- List collectionsmilvus_get_collection_info- Get collection informationmilvus_rename_collection- Rename collectionmilvus_load_collection- Load collection into memorymilvus_release_collection- Release collection from memory
Index Management
milvus_create_index- Create indexmilvus_drop_index- Drop index
Data Operations
milvus_insert_data- Insert datamilvus_upsert- Insert or update datamilvus_delete_entities- Delete entitiesmilvus_query- Conditional querymilvus_vector_search- Vector similarity search
Connection Management
milvus_connector- Establish Milvus connection
🛠️ Installation and Usage
Prerequisites
- Go 1.24 or higher
- Running Milvus instance
Install from Source
git clone https://github.com/tailabs/mcp-milvus.git
cd mcp-milvus
make deps
make build
Or using Go directly:
git clone https://github.com/tailabs/mcp-milvus.git
cd mcp-milvus
go mod download
go build -o mcp-milvus ./cmd/mcp-milvus
Docker Deployment
# Build image
docker build -t mcp-milvus .
# Run container
docker run -p 8080:8080 mcp-milvus
Usage
- Start the server
# Using Makefile
make run
# Or directly
./build/mcp-milvus
- Connect to Milvus
Use the
milvus_connectortool to establish connection:
{
"address": "localhost:19530",
"token": "username:password",
"db_name": "default"
}
- Perform operations After connection is established, you can use other tools for database operations.
🏗️ Project Structure
mcp-milvus/
├── cmd/mcp-milvus/ # Main application entry
├── internal/
│ ├── middleware/ # Middleware (logging, auth, etc.)
│ ├── registry/ # Tool registry
│ ├── schema/ # Schema builder
│ ├── session/ # Session management
│ └── tools/ # Milvus tool implementations
├── Dockerfile # Docker build file
├── go.mod # Go module definition
└── README.md # Project documentation
🔧 Configuration
Environment Variables
LOG_LEVEL: Log level (debug/info/warn/error), default: infoPORT: Service port, default: 8080
Connection Configuration
Supports the following connection parameters:
address: Milvus service addresstoken: Authentication token (format: username:password)db_name: Database name
🤝 Contributing
We welcome all forms of contributions! Please see CONTRIBUTING.md for details.
Development Workflow
- Fork this repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Set up development environment (
make deps && make tools) - Make your changes and test (
make test && make lint) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Available Make Commands
Run make help to see all available commands:
make help # Show all available commands
make build # Build binary
make test # Run tests
make lint # Run linter
make fmt # Format code
make run # Build and run
make dev # Run with live reload
make docker # Build Docker image
make build-all # Build for all platforms
make release # Prepare release
make clean # Clean build artifacts
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.
🔗 Related Links
📞 Support
If you encounter any issues or have questions:
- Check Issues to see if similar issues exist
- Create a new Issue describing your problem
- Join discussions in Discussions
🙏 Acknowledgments
⭐ If this project helps you, please give it a Star!
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.