The Azure AI Agent Service MCP Server integrates with Azure AI Foundry to enable seamless connections to your existing Azure AI Agents. This server leverages the wide range of models and knowledge tools available within Azure AI Foundry, such as Azure AI Search and Bing Web Grounding, to provide a robust and secure interaction platform.
connect_agent
agent_id
(string): The ID of the Azure AI Agent to connect to.query
(string): The question or request to send to the agent.thread_id
(string, optional): Thread ID for continuation of conversation.query_default_agent
query
(string): The question or request to send to the agent.thread_id
(string, optional): Thread ID for continuation of conversation.list_agents
az login
.This server requires the following environment variables:
# Required
PROJECT_CONNECTION_STRING=your-project-connection-string
# Optional (configure default agent)
DEFAULT_AGENT_ID=your-default-agent-id
(az)
installed and configured.# Setup environment
python -m venv .venv
.venv\Scripts\activate # On Windows
source .venv/bin/activate # On macOS/Linux
# Install dependencies
pip install mcp[cli] azure-identity python-dotenv azure-ai-projects aiohttp
# Run server directly (from ./src/python)
python -m azure_agent_mcp_server
If you prefer using uv:
# Setup environment with uv
uv venv
.venv\Scripts\activate # On Windows
source .venv/bin/activate # On macOS/Linux
# Install dependencies
uv add mcp[cli] azure-identity python-dotenv azure-ai-projects aiohttp
# Run server (F)
uv run -m azure_agent_mcp_server
To use with Claude Desktop, add the following to your configuration file:
{
"mcpServers": {
"azure-agent": {
"command": "uv",
"args": [\
"--directory",\
"/ABSOLUTE/PATH/TO/PARENT/FOLDER",\
"run",\
"-m",\
"azure_agent_mcp_server"\
],
"env": {
"PROJECT_CONNECTION_STRING": "your-project-connection-string",
"DEFAULT_AGENT_ID": "your-default-agent-id"
}
}
}
}
If you don't want to use uv
, you can use python:
{
"mcpServers": {
"azure-agent": {
"command": "python",
"args": [\
"-m",\
"azure_agent_mcp_server"\
],
"cwd": "/ABSOLUTE/PATH/TO/PARENT/FOLDER",
"env": {
"PYTHONPATH": "/ABSOLUTE/PATH/TO/PARENT/FOLDER",
"PROJECT_CONNECTION_STRING": "your-project-connection-string",
"DEFAULT_AGENT_ID": "your-default-agent-id"
}
}
}
}
This server follows the MCP protocol specification and can be used with any MCP-compatible client. Refer to your client's documentation for specific instructions on how to connect to external MCP servers.
This project follows a polyglot structure with Python code located in the python directory. When running or developing:
This project is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
A MCP Server for Azure AI Foundry.