
C# 與 Windows API 交互的“秘密武器”:結(jié)構(gòu)體和聯(lián)合體
Milvus 提供了?milvus-mcp-server?來對接各種AI Agent。支持包括:更新向量數(shù)據(jù)、創(chuàng)建索引、混合檢索(向量+全文)、多向量列檢索等多種能力。?(鏈接:https://github.com/modelcontextprotocol/servers)目前通過Milvus MCP Server,我們能使用大模型,完全無代碼化的實(shí)現(xiàn)下面這些能力:
接下來將重點(diǎn)介紹如何使用 Milvus- Mcp- Server 來搭建智能搜索 Agent,并分別使用 Cline 和 Cursor 進(jìn)行部署展示。
啟動 MCP 之前,請確保環(huán)境滿足以下條件
下載并安裝VsCode,下載地址(鏈接:https://code.visualstudio.com/)
下載milvus-mcp-server(git clone鏈接:https://github.com/zilliztech/mcp-server-milvus)
正在運(yùn)行的阿里云Milvus實(shí)例創(chuàng)建步驟:
在 API Provider 中選擇 OpenRouter,點(diǎn)擊 Get API Key。
在瀏覽器中登錄并獲取 API KEY
在 Model 選擇 Deepseek-chat-v3,然后點(diǎn)擊右上角 Done,完成配置。
點(diǎn)擊 Cline 右上角 MCP Server 配置,然后點(diǎn)擊 Configure MCP Servers
在 cline_mcp_settings.json 完成以下配置,其中:command 需要配置 uv 的安裝路徑
directory 需要配置 Milvus MCP Project 下載地址
milvus-uri 需要配置阿里云 Milvus 實(shí)例公網(wǎng)地址(實(shí)例需開通創(chuàng)建并配置公網(wǎng)IP:https://x.sm.cn/9AFmBIR)
milvus-token 需要配置用戶名密碼
{
"mcpServers":?{
"milvus":?{
"command":?"/Path/to/uv/.local/bin/uv",
"args":?[
"--directory",
"/Path/to/mcpserver/mcp-server-milvus/src/mcp_server_milvus",
"run",
"server.py",
"--milvus-uri",
"http://c-xxxxxxxxxxxxx.milvus.aliyuncs.com:19530",
"--milvus-token",
"root:you_password"
],
"disabled":?true,
"autoApprove":?[]
}
}
}
完成以上配置后,點(diǎn)擊開啟開關(guān),并點(diǎn)擊右上角 Done,完成 Milvus MCP Server 配置。
在示例 Milvus 集群中,可以看到有4個 Collection。
在 Cline 對話框中,輸入:在我的 milvus 數(shù)據(jù)庫里有哪些 Collection?
在 Cline 對話框中,輸入:在’milvus_overview’ Collection 中找到包含"Unstruct"的數(shù)據(jù)?輸出結(jié)果會自動進(jìn)行調(diào)優(yōu),若首次輸出結(jié)果不理想,可再次搜索
下載并安裝Cursor,下載地址:https://www.cursor.com/cn。
在 Beta Features 中選擇 Early Access
升級Cursor,并保證版本高于0.47
打開 Clone 的 Milvus Mcp Project,在根目錄創(chuàng)建 .cursor 文件夾,并在其中 mcp.json文件
在 mcp.json 完成以下配置,其中:command 需要配置uv的安裝路徑
directory 需要配置Milvus MCP Project 下載地址
milvus-uri 需要配置阿里云Milvus實(shí)例公網(wǎng)地址(實(shí)例需開通創(chuàng)建并配置公網(wǎng)IP:https://x.sm.cn/9AFmBIR)
milvus-token 需要配置用戶名密碼
{
"mcpServers":?{
"milvus":?{
"command":?"/Path/to/uv/.local/bin/uv",
"args":?[
"--directory",
"/Path/to/mcpserver/mcp-server-milvus/src/mcp_server_milvus",
"run",
"server.py",
"--milvus-uri",
"http://c-xxxxxxxxxxxxx.milvus.aliyuncs.com:19530",
"--milvus-token",
"root:you_password"
],
"disabled":?true,
"autoApprove":?[]
}
}
}
完成配置后,可以Cursor配置中的MCP欄目檢查。
模式選擇Agent,LLM選擇claude-3.7
在Cursor對話框中,輸入:在我的milvus數(shù)據(jù)庫里有哪些Collection?
如您想體驗(yàn)阿里云 Milvus 的相關(guān)能力,歡迎在阿里云官網(wǎng)搜索向量檢索服務(wù) Milvus 版進(jìn)行體驗(yàn)。(鏈接:https://www.aliyun.com/product/milvus)產(chǎn)品新用戶也可免費(fèi)領(lǐng)取1個月試用資格。(鏈接:https://x.sm.cn/Gu4NrPh)此外,阿里云為了回饋新老用戶,推出了重大優(yōu)惠:阿里云向量檢索服務(wù) Milvus 版 | 限時年付5折!購買地址:https://x.sm.cn/As9rKC6
原文轉(zhuǎn)載自:https://mp.weixin.qq.com/s/juDoXA9egkuSTEaSWQqW7Q
C# 與 Windows API 交互的“秘密武器”:結(jié)構(gòu)體和聯(lián)合體
免費(fèi)強(qiáng)大的API開發(fā)和調(diào)試工具——Reqable
SpringBoot中6種API版本控制策略
更智能的Kubernetes AI推理路由:Gateway API推理擴(kuò)展
超越 API:MCP 如何成為 AI 時代的“萬能適配器”?
從零開始的機(jī)器學(xué)習(xí)實(shí)踐指南
2025年最佳語音轉(zhuǎn)文字API比較:一個報表31項(xiàng)指標(biāo)近200條數(shù)據(jù)
使用DeepSeek和Claude繪制出高質(zhì)量的SVG 圖片
18種最佳 RAG 技術(shù)