Azure AI Search MCP Server
Enables AI assistants to search, query, and manage Azure AI Search indexes using full-text, semantic, and vector search, alongside index and document operations.
README
Azure AI Search MCP Server
An MCP (Model Context Protocol) server that exposes Azure AI Search functionality as tools for AI assistants.
Features
- Full-text search - Search documents using Azure AI Search
- Semantic/vector search - Perform semantic search with reranking
- Index management - List indexes and get schema information
- Document retrieval - Get documents by key or count documents
Available Tools
| Tool | Description |
|---|---|
search |
Full-text search with filters and field selection |
vector_search |
Semantic search with reranking scores |
list_indexes |
List all available search indexes |
get_index_schema |
Get fields and schema of an index |
get_document |
Retrieve a specific document by key |
get_document_count |
Count documents in an index |
Setup
Prerequisites
- Python 3.10+
- Azure AI Search service
- Azure Search API key or Azure credentials
Installation
-
Clone the repository:
git clone <repository-url> cd aisearch-mcp -
Install dependencies:
pip install -r requirements.txt -
Configure environment variables:
cp .env.example .env # Edit .env with your Azure Search credentials
Configuration
Set the following environment variables in your .env file:
| Variable | Description | Required |
|---|---|---|
AZURE_SEARCH_ENDPOINT |
Azure Search service URL (e.g., https://mysearch.search.windows.net) |
Yes |
AZURE_SEARCH_API_KEY |
Azure Search admin or query key | Yes* |
AZURE_SEARCH_INDEX |
Default search index name | Yes |
MCP_PORT |
Server port (default: 9000) | No |
*If not provided, the server will use DefaultAzureCredential for authentication.
Running the Server
Local
python server.py
The server will start on http://0.0.0.0:9000 with the following endpoints:
- SSE Transport:
GET /sse(establish connection),POST /messages(send messages) - Streamable HTTP:
POST /mcp
Docker
Build and run with Docker:
# Build the image
docker build -t azure-search-mcp .
# Run with environment variables
docker run -p 9000:9000 \
-e AZURE_SEARCH_ENDPOINT=https://your-search.search.windows.net \
-e AZURE_SEARCH_API_KEY=your-api-key \
-e AZURE_SEARCH_INDEX=your-index \
azure-search-mcp
# Or run with .env file
docker run -p 9000:9000 --env-file .env azure-search-mcp
Connecting MCP Clients
VS Code / Claude Desktop (SSE)
Add to your MCP configuration:
{
"mcpServers": {
"azure-search": {
"url": "http://localhost:9000/sse"
}
}
}
Streamable HTTP Clients
{
"mcpServers": {
"azure-search": {
"url": "http://localhost:9000/mcp"
}
}
}
Stdio (Local Process)
For clients that support stdio transport, run directly:
{
"mcpServers": {
"azure-search": {
"command": "python",
"args": ["/path/to/server.py"]
}
}
}
Example Usage
Once connected, you can use the tools through your MCP client:
- Search for hotels: "Search for hotels with pool in Seattle"
- Get index schema: "What fields are in the hotels-sample-index?"
- Count documents: "How many documents are in the index?"
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.