Labsco
MCP SERVER

Azure AI Search MCP Server

by farzad528

Query your Azure AI Search index by keyword, vector or hybrid — or route through Azure AI Agent Service and get cited web results too.

Vector Stores & RAG Retrieval
Summary
One index, three ways to search it — or an agent that adds the open web.

Choosing between the two servers is choosing between reach and setup: direct to Azure AI Search is one endpoint, one key and three query modes, while the Agent Service route wants a project with search and Bing connections wired first and pays that back with cited public sources next to your own documents. If your index is not vectorised yet, start with keyword search — it is the only mode that will return anything useful.

What it is

Two Python servers in one repository, and you pick one. The direct server talks straight to Azure AI Search and offers three retrieval modes over your index: keyword for exact lexical matches, vector for semantic similarity over embeddings, and hybrid for both in a single call, each returning the top results formatted as markdown. The Agent Service server goes through Azure AI Agent Service instead, which puts the same index behind an agent and adds Bing web grounding, so an answer can carry citations to public sources alongside your own documents.

What you get
  • Keyword search over your index — exact lexical matching, returning as many results as you ask for
  • Vector search over the same index, matching on embedding similarity rather than wording
  • Hybrid search combining lexical and vector matching in one call
  • Document search through Azure AI Agent Service, with the agent's own processing applied to the results
  • Bing web search through that same agent, returning citations to the original sources
  • Results rendered as markdown rather than raw response payloads
Requirements

Python 3.10 or newer and an Azure AI Search service whose index already contains vectorised text — the vector and hybrid modes have nothing to match on otherwise. The direct server takes the search endpoint, the index name and an API key. The Agent Service path asks for more: an Azure AI Project with connections to AI Search and to Bing, a model deployment name, and an `az login` for the identity behind them. Either script is launched by absolute path from the virtual environment you install into.