Navigation
Azure AI Agent Service MCP Server: Deployment & Scaling - MCP Implementation

Azure AI Agent Service MCP Server: Deployment & Scaling

Empower Azure AI Foundry users with enterprise-grade AI agent deployment, scaling, and management via MCP Server—boost innovation and operational efficiency.

Developer Tools
4.6(198 reviews)
297 saves
138 comments

99% of users reported increased productivity after just one week

About Azure AI Agent Service MCP Server

What is Azure AI Agent Service MCP Server: Deployment & Scaling?

The Azure AI Agent Service MCP Server acts as a bridge between your existing Azure AI Agents and MCP-compatible clients. It leverages Azure AI Foundry infrastructure to connect with agents, models, and tools like Azure AI Search and Bing Web Grounding. This server enables seamless integration, secure authentication via Azure credentials, and isolated conversation memory per session.

Key Features of Azure AI Agent Service MCP Server

  • Agent Interoperability: Directly access and utilize your configured Azure AI Agents through any MCP client.
  • Contextual Continuity: Maintain thread-specific conversation history to ensure contextual accuracy across interactions.
  • Security & Compliance: Uses Azure-managed credentials for authentication, adhering to enterprise-grade security standards.
  • Tool Ecosystem: Supports core functions like agent discovery (list_agents), targeted queries (connect_agent), and default agent routing (query_default_agent).

Azure AI Agent Service MCP Server Features

How to Use Azure AI Agent Service MCP Server

Setup Process

  1. Prepare Azure Environment: Create agents via Azure AI Foundry and note their IDs.
  2. Configure Credentials: Set environment variables including PROJECT_CONNECTION_STRING and optionally DEFAULT_AGENT_ID.
  3. Install Dependencies: Use Python 3.10+ with required packages like mcp[cli] and azure-identity.
  4. Launch Server: Run via Python CLI or UV toolchain from the project's Python directory.

Client Integration

For Claude Desktop users, configure MCP server details in JSON format specifying absolute paths and environment variables. Other clients like Replit or custom apps can connect via standard MCP protocol endpoints.

Use Cases & Scaling Strategies

Common applications include:

  • Enterprise automation workflows requiring agent-based decision-making
  • Customer support systems with contextual memory across support tickets
  • Data analysis pipelines combining search tools with AI agent logic

Azure AI Agent Service MCP Server FAQ

FAQ from Azure AI Agent Service MCP Server

How do I authenticate securely?
Credentials are managed through Azure Identity library using your existing tenant configurations.
Can I use multiple agents simultaneously?
Yes, specify agent IDs in connect_agent calls to route queries appropriately.
What happens if the server goes offline?
Client sessions maintain thread IDs allowing reconnection while preserving conversation state.
Is there a limit on concurrent connections?
Performance scales with Azure resource allocation – adjust VM sizes and instance counts based on traffic patterns.

Content

Azure AI Agent Service MCP Server

This MCP server integrates with Azure AI Foundry to enable connections to your existing Azure AI Agents, utilizing the wide range of models and knowledge tools available within Azure AI Foundry, such as Azure AI Search and Bing Web Grounding.

demo

GitHub watchers GitHub forks GitHub stars

Azure AI Community Discord

Features

  • 🤖 Agent Integration - Connect to your existing Azure AI Agents
  • 🔄 Seamless Workflow - Use your agents directly within any MCP client
  • 🛡️ Secure - All connections use your Azure credentials
  • 🧠 Conversation Memory - Each client session maintains isolated conversation history

Tools

  • connect_agent

    • Connect to a specific Azure AI Agent by ID
    • Inputs:
      • 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
    • Returns: Formatted response from the agent
  • query_default_agent

    • Send a query to the default configured agent
    • Inputs:
      • query (string): The question or request to send to the agent
      • thread_id (string, optional): Thread ID for continuation of conversation
    • Returns: Formatted response from the default agent
  • list_agents

    • List all available Azure AI Agents in your project
    • Returns: List of available agents with their IDs and names

Configuration

Setting up Azure

  1. Create Azure AI Agents through Azure AI Foundry
  2. Note your Azure AI Project connection string
  3. Note your agents' IDs (you'll need these to connect to specific agents)
  4. Authenticate using Azure credentials: az login

Environment Variables

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

Installation

Prerequisites

  • Python 3.10+
  • Azure CLI (az) installed and configured
  • Existing Azure AI Agents with desired capabilities

Setup

# 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

Usage with Claude Desktop

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"
      }
    }
  }
}

Usage with Other MCP Clients

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.

Development Notes

This project follows a polyglot structure with Python code located in the python directory. When running or developing:

  1. Always activate the virtual environment from the project root
  2. Navigate to the python directory when running Python commands
  3. For package installation, ensure you're in the python directory where pyproject.toml is located

License

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.

Related MCP Servers & Clients