mcp-milvus

tailabs/mcp-milvus

3.3

If you are the rightful owner of mcp-milvus 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.

MCP Milvus is a Model Context Protocol server designed for the Milvus vector database, offering a comprehensive suite of vector database operations.

Tools
  1. milvus_create_database

    Create database

  2. milvus_list_databases

    List all databases

  3. milvus_use_database

    Switch database

  4. milvus_create_collection

    Create collection

  5. milvus_drop_collection

    Drop collection

  6. milvus_list_collections

    List collections

  7. milvus_get_collection_info

    Get collection information

  8. milvus_rename_collection

    Rename collection

  9. milvus_load_collection

    Load collection into memory

  10. milvus_release_collection

    Release collection from memory

  11. milvus_create_index

    Create index

  12. milvus_drop_index

    Drop index

  13. milvus_insert_data

    Insert data

  14. milvus_upsert

    Insert or update data

  15. milvus_delete_entities

    Delete entities

  16. milvus_query

    Conditional query

  17. milvus_vector_search

    Vector similarity search

  18. milvus_connector

    Establish Milvus connection

MCP 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 database
  • milvus_list_databases - List all databases
  • milvus_use_database - Switch database

Collection Management

  • milvus_create_collection - Create collection
  • milvus_drop_collection - Drop collection
  • milvus_list_collections - List collections
  • milvus_get_collection_info - Get collection information
  • milvus_rename_collection - Rename collection
  • milvus_load_collection - Load collection into memory
  • milvus_release_collection - Release collection from memory

Index Management

  • milvus_create_index - Create index
  • milvus_drop_index - Drop index

Data Operations

  • milvus_insert_data - Insert data
  • milvus_upsert - Insert or update data
  • milvus_delete_entities - Delete entities
  • milvus_query - Conditional query
  • milvus_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

  1. Start the server
# Using Makefile
make run

# Or directly
./build/mcp-milvus
  1. Connect to Milvus Use the milvus_connector tool to establish connection:
{
  "address": "localhost:19530",
  "token": "username:password",
  "db_name": "default"
}
  1. 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: info
  • PORT: Service port, default: 8080

Connection Configuration

Supports the following connection parameters:

  • address: Milvus service address
  • token: Authentication token (format: username:password)
  • db_name: Database name

šŸ¤ Contributing

We welcome all forms of contributions! Please see for details.

Development Workflow

  1. Fork this repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Set up development environment (make deps && make tools)
  4. Make your changes and test (make test && make lint)
  5. Commit your changes (git commit -m 'Add some AmazingFeature')
  6. Push to the branch (git push origin feature/AmazingFeature)
  7. 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 file for details.

šŸ”— Related Links

šŸ“ž Support

If you encounter any issues or have questions:

  1. Check Issues to see if similar issues exist
  2. Create a new Issue describing your problem
  3. Join discussions in Discussions

šŸ™ Acknowledgments

  • Milvus - Excellent vector database
  • MCP Go - Go implementation of MCP
  • All contributors and users

⭐ If this project helps you, please give it a Star!