Mcp Server Azure Ai Search

Mcp Server Azure Ai Search

🚀 Azure AI代理服务 + Azure AI搜索MCP服务器

本项目是一个模型上下文协议(MCP)服务器,可让Claude桌面使用Azure AI服务搜索您的内容。您可以选择使用Azure AI Agent Service(具备文档搜索和网络搜索功能),也可以直接集成Azure AI Search。

🚀 快速开始

此项目旨在通过MCP服务器将Claude Desktop与Azure的AI搜索功能连接起来。用户可按需选择两种实现方式:

  1. 使用Azure AI Agent Service:提供强大的代理服务,支持复杂的查询处理和多数据源搜索。
  2. 直接集成Azure AI Search:快速接入Azure搜索功能,适用于简单的场景。

✨ 主要特性

  • 支持多种数据源搜索(包括文档和网络内容)。
  • 具备高效的查询处理能力。
  • 易于配置和扩展。

📦 安装指南

依赖项安装

  1. 使用Azure AI Agent Service
    pip install "mcp[cli]" azure-search-documents==11.5.2 azure-identity python-dotenv
    
  2. 直接集成Azure AI Search
    pip install "mcp[cli]" azure-search-documents==11.5.2 azure-identity python-dotenv
    

💻 使用示例

基础用法

配置示例

使用Azure AI Agent Service的配置
{
"mcpServers": {
"azure-agent-service": {
"command": "python",
"args": ["path/to/agent_service.py"],
"env": {
"AZURE_AGENT_ENDPOINT": "https://your-endpoint.azure.com",
"API_KEY": "your-api-key"
}
}
}
}
直接集成Azure AI Search的配置
{
"mcpServers": {
"azure-search": {
"command": "python",
"args": ["path/to/search_server.py"],
"env": {
"AZURE_SEARCH_ENDPOINT": "https://your-search-service.search.windows.net",
"INDEX_NAME": "your-index-name",
"API_KEY": "your-api-key"
}
}
}
}

启动服务器

  1. 使用Azure AI Agent Service
    python agent_service.py
    
  2. 直接集成Azure AI Search
    python search_server.py
    

验证功能

  • 在Claude Desktop中输入以下示例查询:
    • "搜索关于AI在Azure搜索索引中的信息"
    • "查找最新大型语言模型(LLM)的发展动态"
    • "使用混合搜索找到神经网络的相关信息"

📚 详细文档

目标

  • 实现Claude Desktop与Azure AI服务的无缝连接。
  • 提供灵活的配置选项,满足不同用户的需求。

🔧 技术细节

常见问题解决

服务器未显示

  • 检查Claude Desktop日志(位于%APPDATA%\Claude\logs\mcp*.log)。
  • 确保文件路径和环境变量配置正确。

Azure AI Agent Service问题

  • 验证Azure AI项目是否正确配置。
  • 确保连接已正确创建并启用。

自定义服务器

  1. 修改工具指令:调整代理服务的指令以更改其处理查询的方式。
  2. 添加新工具:使用@mcp.tool()装饰器集成额外功能。
  3. 自定义响应格式:编辑Claude Desktop返回的响应格式。

📄 许可证

此项目基于MIT License开源。

  • 0 关注
  • 0 收藏,18 浏览
  • system 提出于 2025-09-22 22:00

相似服务问题

相关AI产品