
zilliztech/mcp-server-milvus 是从 https://github.com/zilliztech/mcp-server-milvus. 导入的 MCP 服务器候选
概览
zilliztech/mcp-server-milvus 是从 https://github.com/zilliztech/mcp-server-milvus. 导入的 MCP 服务器候选
概述(AI 翻译)
模型上下文协议(MCP)是一种开放协议,能够实现LLM应用与外部数据源及工具之间的无缝集成。无论你是在构建AI驱动的IDE、增强聊天界面,还是创建自定义AI工作流,MCP都提供了一种标准化的方式,将LLM与所需的上下文连接起来。
该仓库包含一个MCP服务器,提供访问Milvus向量数据库功能的访问。
先修条件
在使用该MCP服务器之前,请确保您具备:
- Python 3.10 或更高版本
- 运行中的 Milvus 实例(本地或远程)
- 安装了UV(推荐用于服务器运行)
用途
推荐使用该MCP服务器的方法是直接运行uv,无需安装。以下是Claude桌面和光标的配置方式。
如果你想克隆仓库:
然后你可以直接运行服务器:
或者,你也可以更改 src/mcp_server_milvus/ 目录中的 .env 文件,设置环境变量,并用以下命令运行服务器:
重要:.env 文件的优先级会高于命令行参数。
运行模式
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
MCP Server for Milvus
The Model Context Protocol (MCP) is an open protocol that enables seamless integration between LLM applications and external data sources and tools. Whether you’re building an AI-powered IDE, enhancing a chat interface, or creating custom AI workflows, MCP provides a standardized way to connect LLMs with the context they need.
This repository contains a MCP server that provides access to Milvus vector database functionality.
Prerequisites
Before using this MCP server, ensure you have:
- Python 3.10 or higher
- A running Milvus instance (local or remote)
- uv installed (recommended for running the server)
Usage
The recommended way to use this MCP server is to run it directly with uv without installation. This is how both Claude Desktop and Cursor are configured to use it in the examples below.
If you want to clone the repository:
git clone https://github.com/zilliztech/mcp-server-milvus.git
cd mcp-server-milvus
Then you can run the server directly:
uv run src/mcp_server_milvus/server.py --milvus-uri http://localhost:19530
Alternatively you can change the .env file in the src/mcp_server_milvus/ directory to set the environment variables and run the server with the following command:
uv run src/mcp_server_milvus/server.py
Important: the .env file will have higher priority than the command line arguments.
Running Modes
The server supports two running modes: stdio (default) and SSE (Server-Sent Events).
Stdio Mode (Default)
-
Description: Communicates with the client via standard input/output. This is the default mode if no mode is specified.
-
Usage:
uv run src/mcp_server_milvus/server.py --milvus-uri http://localhost:19530
SSE Mode
-
Description: Uses HTTP Server-Sent Events for communication. This mode allows multiple clients to connect via HTTP and is suitable for web-based applications.
-
Usage:
uv run src/mcp_server_milvus/server.py --sse --milvus-uri http://localhost:19530 --port 8000--sse: Enables SSE mode.--port: Specifies the port for the SSE server (default: 8000).
-
Debugging in SSE Mode:
If you want to debug in SSE mode, after starting the SSE service, enter the following command:
mcp dev src/mcp_server_milvus/server.pyThe output will be similar to:
% mcp dev src/mcp_server_milvus/merged_server.py Starting MCP inspector... ⚙️ Proxy server listening on port 6277 🔍 MCP Inspector is up and running at http://127.0.0.1:6274 🚀You can then access the MCP Inspector at
http://127.0.0.1:6274for testing.
Streamable HTTP Mode
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →配置
{
"mcpServers": {
"milvus-sse": {
"url": "http://your_sse_host:port/sse",
"disabled": false,
"autoApprove": []
}
}
}