Skip to main content
Glama

Milvus MCP Server

This program is a Milvus vector database access service designed for large language models, following the Model Context Protocol (MCP) standard. It can serve as an external vector database interaction tool for large language models (such as Antigravity).

It supports Milvus 2.6 vector databases and includes a built-in OpenAI-compatible Embedding service (e.g., Tongyi Qianwen text-embedding-v4), allowing large models to perform semantic searches directly using natural language.


💡 Key Features

  1. Vector Search: Supports semantic search for text input (automatic embedding) and raw vector search.

  2. Built-in Embedding: Integrates an OpenAI-compatible endpoint; large models can pass text to be automatically converted into vectors, eliminating the need for external embedding services.

  3. Collection Lifecycle Management: Create, view, and delete collections, with automatic indexing and loading upon creation.

  4. Data Read/Write: Supports vector data insertion and conditional deletion.

  5. Multi-connection Management: Define multiple named connections via a JSON configuration file; a single MCP Server instance can serve multiple Milvus instances.

  6. Security Design: drop_collection and delete_entities are independent tools that can be toggled separately in the MCP client; drop_collection additionally requires a confirmDrop=true parameter as a double-safety measure.

  7. Hybrid Search: Supports combined queries of vector similarity search + scalar filtering.


Related MCP server: Qdrant MCP Server

⚙️ Requirements

  1. Node.js Environment: Requires Node.js version v18 or higher.

  2. Milvus Instance: Requires an accessible Milvus 2.6 service instance.

  3. Embedding API: Requires an OpenAI-compatible embedding service endpoint (e.g., Tongyi Qianwen Bailian platform).

  4. Dependencies: Run npm install --omit=dev on the host machine to install dependencies.


🛠 Installation and Build

1. Build from Source

npm install
npm run build

Build artifacts will be stored in the ./dist directory.

2. Global Local Installation

npm link

After execution, you can use the global command milvus-mcp-server to quickly invoke the service from anywhere in the system.


📝 Configuration File

Use a JSON file to configure Milvus connections and the embedding service.

Configuration Example

{
  "connections": [
    {
      "name": "my-milvus",
      "address": "localhost:19530",
      "username": "root",
      "password": "Milvus",
      "database": "default",
      "description": "本地开发 Milvus 实例,存储文档和图片的向量索引"
    }
  ],
  "embedding": {
    "baseUrl": "https://dashscope.aliyuncs.com/compatible-mode/v1",
    "apiKey": "sk-your-api-key",
    "model": "text-embedding-v4",
    "dimensions": 1024
  }
}

Connection Field Descriptions

Field

Type

Required

Description

name

string

Unique identifier for the connection

address

string

Milvus service address, format host:port

username

string

Username

password

string

Password

database

string

Database name, defaults to "default"

description

string

Business description of the connection

Embedding Field Descriptions

Field

Type

Required

Description

baseUrl

string

OpenAI-compatible API endpoint

apiKey

string

API Key

model

string

Model name, e.g., "text-embedding-v4"

dimensions

number

Output vector dimensions. text-embedding-v4 supports: 2048, 1536, 1024, 768, 512, 256, 128, 64


🚀 Startup and Usage

milvus-mcp-server --config <path-to-config.json>

Parameter List:

  • -c, --config <path>: Configuration file path (required).


🧠 MCP Client Configuration Example

Taking a standard MCP Client (like Antigravity) as an example:

{
  "mcpServers": {
    "MilvusMCP": {
      "command": "node",
      "args": [
        "绝对路径/milvus_mcp_server/dist/index.js",
        "--config", "绝对路径/milvus-config.json"
      ]
    }
  }
}

🧰 Tools Available to the Model

1. list_milvus_connections

  • Description: Lists all configured Milvus connection information (sanitized, excluding passwords).

  • Parameters: None.

2. list_collections

  • Description: Lists all collections under a specified connection.

  • Parameters:

    • connectionName (String): Target connection name.

3. describe_collection

  • Description: Retrieves detailed schema information for a collection, including field definitions, indexes, and row counts.

  • Parameters:

    • connectionName (String): Target connection name.

    • collectionName (String): Collection name.

4. create_collection

  • Description: Creates a new collection. Automatically creates an AUTOINDEX for the vector field and loads the collection, making it immediately searchable.

  • Parameters:

    • connectionName (String): Target connection name.

    • collectionName (String): New collection name.

    • description (String, optional): Collection description.

    • fields (Array): Array of field definitions, each containing name, dataType, isPrimaryKey?, autoId?, dimension?, maxLength?, description?.

5. drop_collection

  • Description: Permanently deletes a collection and all its data. Irreversible operation.

  • Parameters:

    • connectionName (String): Target connection name.

    • collectionName (String): Name of the collection to delete.

    • confirmDrop (Boolean): Must be set to true to execute the deletion. Safety double-confirmation mechanism.

  • Toggle Control: This tool can be enabled or disabled individually in the MCP client.

6. insert_vectors

  • Description: Inserts data into a collection. Each data item is a JSON object containing field values (including the vector field).

  • Parameters:

    • connectionName (String): Target connection name.

    • collectionName (String): Target collection name.

    • data (Array): Array of data.

7. delete_entities

  • Description: Deletes entities based on a filter expression.

  • Parameters:

    • connectionName (String): Target connection name.

    • collectionName (String): Target collection name.

    • filter (String): Milvus filter expression, e.g., 'id in [1, 2, 3]'.

  • Toggle Control: This tool can be enabled or disabled individually in the MCP client.

8. vector_search

  • Description: Vector similarity search. Supports passing text (automatically calls the embedding service to convert to a vector) or a raw vector.

  • Parameters:

    • connectionName (String): Target connection name.

    • collectionName (String): Target collection name.

    • text (String, optional): Search text, choose one between text and vector.

    • vector (Number[], optional): Raw search vector, choose one between text and vector.

    • topK (Number, optional): Number of results to return, defaults to 10.

    • filter (String, optional): Scalar filter expression.

    • outputFields (String[], optional): List of fields to return.

9. query_entities

  • Description: Queries entities based on scalar conditions, not involving vector search.

  • Parameters:

    • connectionName (String): Target connection name.

    • collectionName (String): Target collection name.

    • filter (String): Milvus filter expression.

    • outputFields (String[], optional): List of fields to return.

    • limit (Number, optional): Maximum number of results to return, defaults to 100.

10. hybrid_search

  • Description: Combined query of vector search + scalar filtering. The difference from vector_search is that filter is a required parameter.

  • Parameters:

    • connectionName (String): Target connection name.

    • collectionName (String): Target collection name.

    • text (String, optional): Search text, choose one between text and vector.

    • vector (Number[], optional): Raw search vector, choose one between text and vector.

    • filter (String): Required, scalar filter expression.

    • topK (Number, optional): Number of results to return, defaults to 10.

    • outputFields (String[], optional): List of fields to return.

F
license - not found
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    C
    maintenance
    An integration server implementing the Model Context Protocol that enables LLM applications to interact with Milvus vector database functionality, allowing vector search, collection management, and data operations through natural language.
    240
    Apache 2.0
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables semantic search and document management using a local Qdrant vector database with OpenAI embeddings. Supports natural language queries, metadata filtering, and collection management for AI-powered document retrieval.
    164
    36
    MIT
  • A
    license
    A
    quality
    A
    maintenance
    Enables LLMs to interact with MySQL databases through standardized protocol, supporting database management, table operations, data queries, and modifications with configurable permission controls.
    15
    69
    1
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Enables AI agents to interact with Milvus vector databases and Zilliz Cloud through natural language, allowing users to create clusters, manage collections, insert vector data, and perform semantic searches directly from their AI assistants.
    16
    34
    Apache 2.0

View all related MCP servers

Related MCP Connectors

  • GibsonAI MCP server: manage your databases with natural language

  • Query PostgreSQL databases in plain English — LLM-generated, safety-validated SQL.

  • Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/hcheng666/milvus_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server