Sponsored by Deepsite.site

Azure AI Search MCP Server

Created By
farzad5289 months ago
Model Context Protocol Servers for Azure AI Search
Content

Azure AI Search MCP Server

A Model Context Protocol (MCP) server that integrates with Azure AI Search, enabling Claude Desktop to query your search indexes using keyword, vector, or hybrid methods.

demo


Overview

This project provides an MCP server implementation that connects Claude Desktop with Azure AI Search. The server supports three search methods:

  • Keyword Search: Exact lexical matches.
  • Vector Search: Semantic similarity using vector embeddings.
  • Hybrid Search: A combination of keyword and vector searches.

Features

  • Seamless Integration: Connect Claude Desktop with Azure AI Search.
  • Multiple Search Methods: Supports keyword, vector, and hybrid searches.
  • Customizable: Easy to extend with additional tools or modify search logic.

Requirements

  • Python: Version 3.10 or higher
  • Azure AI Search Service: Configured with an index containing vectorized text data
  • Claude Desktop: Latest version
  • Operating System: Windows or macOS (instructions provided for Windows, but adaptable)

Quick Start Guide

1. Installation

  1. Set Up Project Directory:

    mkdir mcp-server-azure-ai-search
    cd mcp-server-azure-ai-search
    
  2. Create a .env File:

    echo "AZURE_SEARCH_SERVICE_ENDPOINT=https://your-service-name.search.windows.net" > .env
    echo "AZURE_SEARCH_INDEX_NAME=your-index-name" >> .env
    echo "AZURE_SEARCH_API_KEY=your-api-key" >> .env
    

2. Set Up Virtual Environment

  1. Create and Activate the Virtual Environment:

    uv venv
    .venv\Scripts\activate
    
  2. Install Dependencies:

    uv pip install "mcp[cli]" azure-search-documents==11.5.2 azure-identity python-dotenv
    

3. Server Script

Create a file named azure_search_server.py. This script:

  • Loads configuration from the .env file.
  • Initializes the Azure AI Search client.
  • Defines search functions for keyword, vector, and hybrid searches.
  • Registers these functions as MCP tools for Claude Desktop.

For detailed implementation, refer to the inline comments within the script.


Configuring Claude Desktop

  1. Open Claude Desktop.

  2. Navigate to Settings > Developer > Edit Config.

  3. Add the following configuration (update paths and credentials):

    {
      "mcpServers": {
        "azure-search": {
          "command": "C:path\tomcp-server-azure-ai-search.venvScriptspython.exe",
          "args": ["C:path\tomcp-server-azure-ai-searchazure_search_server.py"],
          "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"
          }
        }
      }
    }
    

Note: Replace C:\path\to\mcp-server-azure-ai-search with your actual project path.


Testing the Server

  1. Restart Claude Desktop to load the new configuration.
  2. Look for the MCP tools icon (hammer icon) in the bottom-right of the input field.
  3. Try queries such as:
    • "Can you search for information about AI in my Azure Search index?"
    • "Search for vector databases using the vector search tool."
    • "Find information about neural networks using hybrid search."

Troubleshooting

  • Server Not Appearing:
    • Check Claude Desktop logs (typically found at %APPDATA%\Claude\logs\mcp*.log on Windows).
    • Verify file paths and environment variables in the configuration.
    • Test running the server directly via python azure_search_server.py. or uv run python azure_search_server.py

Customizing Your Server

  • Modify Search Logic: Adjust the search methods in the AzureSearchClient class.
  • Add New Tools: Use the @mcp.tool() decorator to integrate additional search functionalities.
  • Customize Output: Edit the markdown formatting function for search results.

License

This project is licensed under the MIT License.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
ChatWiseThe second fastest AI chatbot™
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Serper MCP ServerA Serper MCP Server
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
DeepChatYour AI Partner on Desktop
Tavily Mcp
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Playwright McpPlaywright MCP server
WindsurfThe new purpose-built IDE to harness magic
CursorThe AI Code Editor
Amap Maps高德地图官方 MCP Server