Connect Claude Desktop to Azure AI Search and Web Search with easy-to-implement MCP servers
The Azure AI Agent Service + Azure AI Search MCP Server is a specialized server designed to enhance the capabilities of AI applications, particularly Claude Desktop. By leveraging the powerful tools and services provided by Azure, this server enables users to perform intelligent searches on both their private documents and public web content using advanced semantic search methods and AI-enhanced query optimization. It offers two main implementations:
Azure AI Agent Service (Recommended) – This implementation uses the Azure AI Agent Service to provide a comprehensive set of tools:
Direct Azure AI Search Implementation – A more direct approach that connects directly to Azure AI Search using three different methods:
This document provides a detailed guide on how to set up and use both implementations, as well as configuration details and integration techniques with other AI clients such as Continue and Cursor.
The Azure AI Agent Service + Azure AI Search MCP Server offers several key features that enhance its utility for various AI applications:
The architecture of the Azure AI Agent Service + Azure AI Search MCP Server leverages the Model Context Protocol (MCP) for a standardized interaction model. Below is an example of how the protocol flow can be represented using Mermaid diagrams:
graph TD
A[AI Application] -->|MCP Client| B[MCP Protocol]
B --> C[MCP Server]
C --> D[Data Source/Tool]
style A fill:#e1f5fe
style C fill:#f3e5f5
style D fill:#e8f5e8
This diagram illustrates the interaction between an AI application (like Claude Desktop), the MCP client, and the server. The data flows between these components are optimized for both efficient processing and real-time communication.
To get started with setting up the Azure AI Agent Service + Azure AI Search MCP Server, follow these steps:
Create a Project Directory:
mkdir mcp-server-azure-ai-search
cd mcp-server-azure-ai-search
Set Up Environment Variables in .env
Files:
echo "PROJECT_CONNECTION_STRING=your-project-connection-string" > .env
echo "MODEL_DEPLOYMENT_NAME=your-model-deployment-name" >> .env
echo "AI_SEARCH_CONNECTION_NAME=your-search-connection-name" >> .env
echo "BING_CONNECTION_NAME=your-bing-connection-name" >> .env
echo "AI_SEARCH_INDEX_NAME=your-index-name" >> .env
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
Create a Virtual Environment and Install Dependencies:
uv venv
.venv\Scripts\activate
uv pip install "mcp[cli]" azure-identity python-dotenv
azure-ai-projects
.
uv pip install "mcp[cli]" azure-search-documents==11.5.2 azure-identity python-dotenv azure-ai-projects
Run the Relevant Script:
python azure_ai_agent_service_server.py
python azure_search_server.py
Configure Claude Desktop:
Add the configuration sample provided in the README to your config.json
file.
This MCP implementation is particularly useful in several AI workflows:
For example, consider a scenario where an AI researcher is looking to analyze recent developments in Large Language Models (LLMs). They can input key terms like "large language models latest", and get relevant documents and web pages with citations directly from the Azure AI Agent Server. Similarly, for a content curation project, researchers can use hybrid searches to find expert opinions on neural networks while citing sources.
The Azure AI Agent Service + Azure AI Search MCP Server is designed to integrate seamlessly with several MCP clients:
MCP Client | Resources | Tools | Prompts |
---|---|---|---|
Claude Desktop | ✅ | ✅ | ✅ |
Continue | ✅ | ✅ | √ |
Cursor | ❌ | ✅ | √ |
The compatibility matrix outlines the level of support each MCP client provides with this server:
This matrix helps users quickly determine if their specific use case is supported by the server implementation.
To ensure robust performance and security, you can configure various aspects of the server:
@mcp.tool()
to integrate additional functionality.How do I troubleshoot if my server is not appearing in Claude Desktop?
.env
file and config.json
configuration to ensure all required environment variables are set correctly.Can I use this server with Continue and Cursor, and if so, what functionalities are supported?
How do I integrate vector search for advanced semantic analysis?
Can I change the language of the server's output?
What should I do if I encounter issues with connection to Azure resources?
.env
file.This comprehensive documentation provides a detailed guide on setting up, configuring, and utilizing the Azure AI Agent Service + Azure AI Search MCP Server. By integrating this server into your AI workflows, you can significantly enhance the capabilities of your applications through advanced search functionalities provided by Azure’s powerful services. The flexible nature of the implementation ensures compatibility with multiple MCP clients and supports a wide range of use cases.
This documentation is designed to help developers integrate advanced search and data retrieval services seamlessly into their AI applications using MongoDB's ModelContextProtocol (MCP). By following these steps, users can leverage state-of-the-art AI tools for various research, content analysis, and web curation tasks.
Learn to connect to MCP servers over HTTP with Python SDK using SSE for efficient protocol communication
Integrate AI with GitHub using MCP Server for profiles repos and issue creation
Build a local personal knowledge base with Markdown files for seamless AI conversations and organized information.
Next-generation MCP server enhances documentation analysis with AI-powered neural processing and multi-language support
Python MCP client for testing servers avoid message limits and customize with API key
Explore MCP servers for weather data and DigitalOcean management with easy setup and API tools