Mcp Server Azure Ai Agents

Mcp Server Azure Ai Agents

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

本项目提供了一个模型上下文协议(MCP)服务器,可让 Claude Desktop 借助 Azure AI 服务搜索您的内容。您可以选择 Azure AI Agent Service(支持文档搜索和网络搜索),也可以直接集成 Azure AI Search。

🚀 快速开始

此项目提供了一个 MCP 服务器,使 Claude Desktop 能够通过 Azure AI 服务开展搜索和信息检索工作。它支持两种集成方式,您既可以使用具备代理功能的 Azure AI Agent Service,也能直接集成 Azure AI Search。

✨ 主要特性

  • 文档搜索:能够从 Azure 搜索索引里查找所需信息。
  • 网络搜索:可借助 Azure AI Agent Service 进行网络搜索。
  • 混合搜索:可将文档搜索与网络搜索的结果相结合。
  • 自定义工具:能通过 @mcp.tool() 装饰器添加新的工具。

📦 安装指南

Azure AI Agent Service 实现

步骤

  1. 创建 .env 文件,并添加如下内容:
AZURE_AI_API_KEY=your-api-key
  1. 安装依赖项:
pip install "mcp[cli]" azure-ai-legacy-chatbots==0.4.0 python-dotenv
  1. 使用 azure_ai_agent_service_server.py 脚本启动服务器。

Azure AI 搜索直接集成

步骤

  1. 创建 .env 文件,并添加如下内容:
AZURE_SEARCH_SERVICE_ENDPOINT=https://your-service-name.search.windows.net
AZURE_SEARCH_INDEX_NAME=your-index-name
AZURE_SEARCH_API_KEY=your-api-key
  1. 安装依赖项:
pip install "mcp[cli]" azure-search-documents==11.5.2 python-dotenv
  1. 使用 azure_search_server.py 脚本启动服务器。

📚 详细文档

快速链接

要求

  • Python:需使用 3.8 或更高版本。
  • Azure 帐户:用于访问 Azure AI 代理服务和 Azure Search。

测试服务器

  1. 重启 Claude Desktop 以加载新配置。
  2. 在输入字段底部右侧查找 MCP 工具图标(锤子图标)。
  3. 尝试以下查询:
    • "搜索我的 Azure 搜索索引中的 AI 信息"
    • "在网络上搜索最新的 LLM 发展动态"
    • "使用混合搜索查找神经网络的相关信息"

故障排除

  • 服务器未显示
    • 检查 Claude Desktop 日志(位于 %APPDATA%\Claude\logs\mcp*.log)。
    • 验证文件路径和环境变量配置。
    • 测试直接运行服务器:python azure_ai_agent_service_server.pyuv run python.azure_ai_agent_service_server.py
  • Azure AI Agent Service 问题
    • 确保 Azure AI 项目正确配置。
    • 验证连接是否存在且配置正确。
    • 检查 Azure 身份验证状态。

自定义您的服务器

  • 修改工具指令:可调整每个代理的指令,从而改变其处理查询的方式。
  • 添加新工具:使用 @mcp.tool() 装饰器集成新的工具。
  • 自定义响应格式:编辑 Claude Desktop 返回的响应格式。
  • 调整网络搜索参数:修改网络搜索工具以专注于特定领域。

📄 许可证

此项目根据 MIT License 开源。

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

相似服务问题

相关AI产品