Azure AI Search MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Azure AI Search MCP Serverlist all indexes in my Azure Search service"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Azure AI Search MCP Server
A powerful Model Context Protocol (MCP) server that enables AI assistants to manage Azure AI Search services. Deploy on Cloudflare Workers for global edge performance or run locally for development.
๐ Quick Start
Fastest Setup: Connect to Deployed Server
# For Claude Code
claude mcp add --transport sse azure-search https://azure-search-mcp.lfd.workers.dev/sse \
--header "X-Azure-Search-Endpoint: https://your-service.search.windows.net" \
--header "X-Azure-Search-Api-Key: your-api-key"
# For Claude Desktop - add to config file
{
"mcpServers": {
"azure-search": {
"command": "npx",
"args": ["mcp-remote", "https://azure-search-mcp.lfd.workers.dev/sse"]
}
}
}That's it! Start using Azure Search in your AI assistant immediately.
Related MCP server: Hermes Search MCP Server
๐ Table of Contents
โจ Features
๐ Complete Azure Search Management - Full control over indexes, documents, data sources, indexers, and skillsets
๐ค Intelligent Response Handling - Automatic summarization of large responses using GPT-4o-mini
๐ Smart Pagination - Efficient handling of large result sets with cursor-based pagination
๐ Edge Deployment - Fast, globally distributed via Cloudflare Workers
๐ Multiple Transports - SSE (Server-Sent Events) and HTTP support
โก Direct API Access - No OAuth complexity, uses Azure Search API keys
๐ก๏ธ Built-in Safety - Confirmation prompts for destructive operations
๐ Real-time Resources - Live monitoring of indexes, indexers, and service stats
๐ฆ Prerequisites
Required
Azure AI Search Service with:
Endpoint URL (e.g.,
https://your-service.search.windows.net)Admin API key (found in Azure Portal โ Your Search Service โ Keys)
Optional
Azure OpenAI (for intelligent summarization):
Endpoint, API key, and deployment name (e.g.,
gpt-4o-mini)
Cloudflare Account (for custom deployment)
Node.js 18+ (for local development)
๐ง Installation
Option 1: Use the Deployed Server (Recommended)
The server is already deployed and ready to use at:
Base URL:
https://azure-search-mcp.lfd.workers.devSSE Endpoint:
https://azure-search-mcp.lfd.workers.dev/sseHTTP Endpoint:
https://azure-search-mcp.lfd.workers.dev/mcp
Connect with Claude Code
# SSE Transport (recommended)
claude mcp add --transport sse azure-search https://azure-search-mcp.lfd.workers.dev/sse \
--header "X-Azure-Search-Endpoint: https://your-service.search.windows.net" \
--header "X-Azure-Search-Api-Key: your-api-key"
# HTTP Transport
claude mcp add --transport http azure-search https://azure-search-mcp.lfd.workers.dev/mcp \
--header "X-Azure-Search-Endpoint: https://your-service.search.windows.net" \
--header "X-Azure-Search-Api-Key: your-api-key"Connect with Claude Desktop
Add to your configuration file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.jsonLinux:
~/.config/claude/claude_desktop_config.json
{
"mcpServers": {
"azure-search": {
"command": "npx",
"args": ["mcp-remote", "https://azure-search-mcp.lfd.workers.dev/sse"],
"env": {
"AZURE_SEARCH_ENDPOINT": "https://your-service.search.windows.net",
"AZURE_SEARCH_API_KEY": "your-api-key"
}
}
}
}Option 2: Deploy Your Own Instance
# Clone repository
git clone https://github.com/henryperkins/my-mcp-github.git
cd my-mcp-github
# Install dependencies
npm install
# Configure secrets
wrangler secret put AZURE_SEARCH_ENDPOINT
wrangler secret put AZURE_SEARCH_API_KEY
wrangler secret put AZURE_OPENAI_ENDPOINT # Optional
wrangler secret put AZURE_OPENAI_API_KEY # Optional
# Deploy to Cloudflare
npm run deployOption 3: Run Locally
# Clone and install
git clone https://github.com/henryperkins/my-mcp-github.git
cd my-mcp-github
npm install
# Create .dev.vars file
cat > .dev.vars << EOF
AZURE_SEARCH_ENDPOINT=https://your-service.search.windows.net
AZURE_SEARCH_API_KEY=your-api-key
AZURE_OPENAI_ENDPOINT=https://your-openai.openai.azure.com/ # Optional
AZURE_OPENAI_API_KEY=your-openai-key # Optional
EOF
# Run development server
npm run dev # Available at http://localhost:8788
# Or run with mock data (no Azure required)
npm run dev:mock๐ Usage Guide
How to Interact with the Server
Once connected, you can interact naturally with your AI assistant. The server handles all the complexity behind the scenes.
Example Conversations
You: Show me all search indexes with their document counts
Claude: I'll list all the search indexes with their statistics.
[Lists indexes with document counts, storage sizes, and features]
You: Search for "laptop" in the products index with price under $1000
Claude: I'll search for laptops under $1000 in your products index.
[Returns filtered search results with relevant products]
You: Create an indexer to sync data from blob storage every hour
Claude: I'll create an indexer with hourly synchronization from your blob storage.
[Sets up the indexer with the specified schedule]Verifying Connection
After adding the server, verify it's working:
# In Claude Code
/mcp
# Check specific server
claude mcp get azure-search
# List all servers
claude mcp list๐ ๏ธ Available Operations
The server provides comprehensive Azure Search management through these tools:
๐ Index Management (IndexManagement)
Operation | Description | Key Parameters |
| List all indexes with stats |
|
| Get index definition |
|
| Create new index |
|
| Update index schema |
|
| Delete index |
|
| Get index statistics |
|
Templates available: documentSearch, productCatalog, hybridSearch, knowledgeBase
๐ Document Operations (DocumentOperations)
Operation | Description | Key Parameters |
| Search documents |
|
| Get document by ID |
|
| Count documents |
|
| Upload new documents |
|
| Update existing documents |
|
| Delete documents |
|
๐ Data Source Management (DataSourceManagement)
Operation | Description | Key Parameters |
| List data sources | - |
| Get data source details |
|
| Create blob storage source |
|
| Delete data source |
|
| Test connection |
|
โ๏ธ Indexer Management (IndexerManagement)
Operation | Description | Key Parameters |
| List all indexers | - |
| Get indexer config |
|
| Create new indexer |
|
| Run indexer now |
|
| Reset change tracking |
|
| Get execution history |
|
๐ง Skillset Management (SkillsetManagement)
Operation | Description | Key Parameters |
| List AI enrichment skillsets | - |
| Get skillset definition |
|
| Create skillset |
|
| Validate configuration |
|
๐ง Service Utilities (ServiceUtilities)
Operation | Description | Key Parameters |
| Get service quotas/usage | - |
| Test text analyzers |
|
| List synonym maps | - |
| Manage synonyms |
|
๐ก Examples
Creating a Product Catalog Index
You: Create a product catalog index named "products-v2" with English language support
Claude: I'll create a product catalog index with English language support for you.
[Creates index with appropriate fields for product data including name, description,
price, category, with proper analyzers for English text]Complex Search with Filters
You: Search the orders index for pending orders from last week, sorted by amount
Claude: I'll search for pending orders from the last week, sorted by amount.
[Executes search with date filter, status filter, and ordering]Setting Up Data Sync
You: Set up a complete data pipeline from my blob storage to a new search index
Claude: I'll help you set up a complete data pipeline. This will involve:
1. Creating a data source connection to your blob storage
2. Creating a target index with appropriate schema
3. Setting up an indexer to sync data
[Proceeds with step-by-step setup]๐ Troubleshooting
Common Issues and Solutions
"Connection closed" or "Not connected" Error
# Remove and re-add the server
claude mcp remove azure-search
claude mcp add --transport sse azure-search https://azure-search-mcp.lfd.workers.dev/sse \
--header "X-Azure-Search-Endpoint: https://your-service.search.windows.net" \
--header "X-Azure-Search-Api-Key: your-api-key"Authentication Failures
โ Verify API key has admin permissions
โ Check endpoint URL format (should end with
.search.windows.net)โ Ensure no extra spaces in credentials
โ Confirm service is not in free tier (some operations require paid tiers)
Large Response Issues
Responses >20KB are automatically summarized
Configure Azure OpenAI for best results:
wrangler secret put AZURE_OPENAI_ENDPOINT wrangler secret put AZURE_OPENAI_API_KEYUse pagination:
pageSizeandcursorparametersUse
selectto limit returned fields
Rate Limiting (429 Errors)
Implement exponential backoff
Reduce request frequency
Consider upgrading service tier
Windows-Specific Issues
For native Windows (not WSL), use cmd wrapper:
claude mcp add my-server -- cmd /c npx -y @azure/search-mcpDebugging Tips
Enable verbose logging:
You: Set logging level to debugCheck server status:
/mcpTest with mock data:
AZURE_SEARCH_MOCK=true npm run devInspect raw responses:
curl -X POST https://azure-search-mcp.lfd.workers.dev/mcp \ -H "Content-Type: application/json" \ -H "Accept: application/json, text/event-stream" \ -d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
๐งช Development
Local Development Setup
# Install dependencies
npm install
# Type checking
npm run type-check
# Run tests
npm test
# Generate Cloudflare types
npm run cf-typegen
# Watch logs
wrangler tailProject Structure
azure-search-mcp/
โโโ src/
โ โโโ index-dynamic.ts # Main MCP server with dynamic tools
โ โโโ dynamic-tools/ # Tool implementations
โ โ โโโ base/ # Base classes and interfaces
โ โ โโโ IndexTool.ts # Index management operations
โ โ โโโ DocumentTool.ts # Document operations
โ โ โโโ ... # Other tools
โ โโโ azure-search-client.ts # Azure Search REST client
โ โโโ azure-openai-client.ts # OpenAI integration
โ โโโ resources.ts # MCP resource definitions
โ โโโ utils/ # Helper functions
โโโ docs/ # Documentation
โโโ test/ # Test files
โโโ wrangler.toml # Cloudflare configurationEnvironment Variables
Variable | Required | Description |
| Yes | Your Azure Search service URL |
| Yes | Admin API key |
| No | Azure OpenAI endpoint for summarization |
| No | Azure OpenAI API key |
| No | Deployment name (default: gpt-4o-mini) |
๐๏ธ Architecture
Technical Stack
Runtime: Cloudflare Workers with Durable Objects
Protocol: Model Context Protocol (MCP) v2.0
Language: TypeScript
APIs:
Azure Search REST API (2025-08-01-preview)
Azure OpenAI API (2024-08-01-preview)
Key Design Decisions
Dynamic Tool System: Multi-operation tools reduce overhead and improve performance
Response Management: Automatic summarization/truncation for large payloads
Direct API Access: Uses REST API instead of SDK for Workers compatibility
Edge Deployment: Global distribution via Cloudflare's network
No OAuth: Simplified authentication using API keys
Performance Optimizations
Concurrent operations with controlled parallelism
Response caching for frequently accessed data
Streaming support for large result sets
Automatic pagination (max 50 items default)
Intelligent field selection to reduce payload size
๐ค Contributing
Contributions are welcome! Please:
Fork the repository
Create a feature branch
Add tests for new functionality
Ensure all tests pass
Submit a pull request
๐ License
MIT License - See LICENSE file for details
๐ Support
Issues: GitHub Issues
Discussions: GitHub Discussions
MCP Documentation: modelcontextprotocol.io
Azure Search Docs: docs.microsoft.com
๐ Acknowledgments
Built on the Model Context Protocol by Anthropic
Powered by Cloudflare Workers
Integrates with Azure AI Search and Azure OpenAI
Version: 2.0.0 | Last Updated: December 2024
This server cannot be installed
Maintenance
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/henryperkins/my-mcp-github'
If you have feedback or need assistance with the MCP directory API, please join our Discord server