rag-mcp-server
Generates embeddings for queries using Azure OpenAI, enabling hybrid vector and keyword search over an Azure AI Search index.
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., "@rag-mcp-serversearch for 'MCP server architecture'"
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.
rag-mcp-server
An MCP (Model Context Protocol) server that exposes Azure AI Search as a tool. Connect it to any MCP-compatible client (Claude Desktop, MCP Inspector, etc.) to give it hybrid vector + keyword search over your own document index.
What it does
Exposes a single MCP tool:
search_documents(query: str, top_k: int = 5) -> strGenerates an embedding for the query using Azure OpenAI, runs a hybrid search against Azure AI Search, and returns the top matching document chunks with source and metadata.
Related MCP server: Elasticsearch MCP Server
Prerequisites
Python 3.11+
An Azure AI Search index with a
content_vectorfieldAn Azure OpenAI embedding deployment (e.g.
text-embedding-3-small)
Quick Start
Run locally with Python
# 1. Clone and enter the directory
git clone <repo-url>
cd rag-mcp
# 2. Create a virtual environment and install dependencies
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt
# 3. Configure credentials
cp .env.example .env
# Edit .env and fill in your Azure endpoints and API keys
# 4. Start the server
python server.pyServer listens at http://localhost:8001/mcp.
Run with Docker
cp .env.example .env
# Edit .env and fill in your Azure endpoints and API keys
docker compose up --buildEnvironment Variables
Copy .env.example to .env and fill in the values:
Variable | Description |
| Azure OpenAI resource endpoint |
| API key for the embedding deployment |
| Embedding model deployment name |
| Azure AI Search service endpoint |
| Azure AI Search admin or query key |
| Name of the search index to query |
Testing with MCP Inspector
MCP Inspector is an interactive UI for calling MCP tools manually.
# Terminal 1 — start the server
python server.py
# Terminal 2 — open the inspector
npx @modelcontextprotocol/inspectorOpen the URL printed by the inspector (e.g. http://localhost:5173), set transport to Streamable HTTP, enter http://localhost:8001/mcp, and click Connect. Navigate to the Tools tab to call search_documents.
Connect to Claude Desktop
Add the following to your claude_desktop_config.json:
{
"mcpServers": {
"rag-mcp": {
"type": "streamable-http",
"url": "http://localhost:8001/mcp"
}
}
}Run the Automated Test
With the server running, execute the MCP client test:
python test.pyPasses three assertions: tool is registered, no server-side error, and results contain formatted document chunks.
Deploy to Azure Container Apps
See deploy.ps1 for a full Azure CLI deployment script. Fill in your resource group at the top of the file, then run:
.\deploy.ps1The script builds and pushes the Docker image to ACR, creates a Container Apps environment, and deploys the server with a public HTTPS endpoint.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/Hizafa-Nadeem/rag-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server