Back to MCP directory
publicPublicdnsLocal runtime

mcp-server-azure-ai-search

该项目提供两种MCP服务器实现,将Claude Desktop与Azure搜索能力连接,支持通过Azure AI代理服务(推荐)或直接Azure AI搜索集成来搜索文档和网络内容。

article

README

🚀 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开源。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client