Get the FREE Ultimate OpenClaw Setup Guide →

mcp -azure-ai-agents

Model Context Protocol Servers for Azure AI Search

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio farzad528-mcp-server-azure-ai-agents C:\\path\\to\\.venv\\Scripts\\python.exe C:\\path\\to\\azure_search_server.py \
  --env AZURE_SEARCH_API_KEY="your-api-key" \
  --env AZURE_SEARCH_INDEX_NAME="your-index-name" \
  --env AZURE_SEARCH_SERVICE_ENDPOINT="https://your-service-name.search.windows.net"

How to use

This MCP server provides two integration options for Claude Desktop to access Azure AI search capabilities. The recommended route is the Azure AI Agent Service implementation, which bundles an Azure AI Search tool for document search alongside a Bing Web grounding tool for web results, both accessible via Claude. The direct Azure AI Search implementation offers three search modes—Keyword, Vector, and Hybrid—for direct Azure AI Search usage without the Agent Service layer. Use the shown MCP server entries to configure Claude Desktop so that queries can be routed through either path, depending on your data sources and privacy considerations. Once configured, Claude can perform AI-enhanced document searches, retrieve web results with citations, and optionally blend keyword and semantic vector results for richer answers.

How to install

Prerequisites:

  • Python 3.10 or higher
  • Claude Desktop installed
  • Access to Azure AI services (Azure AI Search, optional Azure AI Project + Bing connection)

Recommended steps (Agent Service path):

  1. Create and activate a Python virtual environment:
# Windows example
python -m venv .venv
.\.venv\Scripts\activate
  1. Install MCP CLI and Azure dependencies:
pip install "mcp[cli]" azure-identity python-dotenv azure-ai-projects
  1. Prepare environment file and start scripts (as shown in the config):
# Example .env content
PROJECT_CONNECTION_STRING=your-project-connection-string
MODEL_DEPLOYMENT_NAME=your-model-deployment-name
AI_SEARCH_CONNECTION_NAME=your-search-connection-name
BING_CONNECTION_NAME=your-bing-connection-name
AI_SEARCH_INDEX_NAME=your-index-name
  1. Ensure you have the Azure AI Agent Service server script available at the referenced path (azure_ai_agent_service_server.py) and the Python executable path for your venv.

Direct Azure AI Search path: steps are similar but point to azure_search_server.py and environment variables for the Azure Search endpoint/index/key.

  1. Create and activate a Python virtual environment and install dependencies:
python -m venv .venv
.\\.venv\\Scripts\\activate
pip install "mcp[cli]" azure-search-documents==11.5.2 azure-identity python-dotenv
  1. Place the azure_search_server.py script at the specified path and configure your environment as shown in the examples.
  2. Launch Claude Desktop and apply the MCP configuration with the appropriate paths and env vars.

Note: Replace all path placeholders with actual locations on your system before use.

Additional notes

Tips and common issues:

  • Ensure environment variables are correctly set in the MCP configuration and correspond to the actual Azure resources you created.
  • If Claude Desktop fails to display the MCP server, check the logs under %APPDATA%\Claude\logs for Windows and verify that the Python paths and script locations in the config match your filesystem.
  • For the Agent Service path, make sure the Azure AI Project includes the required connections (Azure AI Search, Bing) and that you have authenticated with az login if needed.
  • The Direct Azure AI Search path requires a valid endpoint, index name, and API key; keep these secrets secure and do not commit them to version control.
  • You can switch between implementations by updating Claude Desktop configuration without changing code, allowing experimentation with data sources.
  • If you encounter compatibility issues, confirm Python version compatibility with the installed packages and consider updating to the latest MCP CLI release.

Related MCP Servers

Sponsor this space

Reach thousands of developers