Introducing Model Context Protocol (MCP) in Azure AI Foundry: Create an MCP Server with Azure AI Agent Service

Table of Contents
- What is Model Context Protocol (MCP)?
- Get Started
- Prerequisites
- Step-by-Step Integration
- Practical Usage
- Real-World Impact
- Conclusion
What is Model Context Protocol (MCP)?
Model Context Protocol (MCP) is an open standard designed to seamlessly connect AI assistants with diverse data sources, enabling context-aware interactions. MCP allows AI applications to intelligently retrieve, process, and leverage information across private document repositories and public web sources, significantly enhancing their functionality. Azure AI Agent Service is a fully managed service designed to empower developers to securely build, deploy, and scale high-quality, and extensible AI agents without needing to manage the underlying compute and storage resources. Model Context Protocol (MCP) is now integrated with Azure AI Agent Service. MCP creates a common language that lets AI models dynamically use agents that have access to knowledge and tools. MCP combined with Azure AI Agent Service gives knowledge retrieval from public and private data sources, including real-time web data using Grounding with Bing Search and internal private data with Azure AI Search, with more sources like SharePoint and Fabric coming soon.
Get Started
Prerequisites
Ensure you have:
- Python 3.10+
- Claude Desktop or another MCP-compatible client
- Azure CLI configured
- Existing Azure AI Agents configured in Azure AI Foundry
Step-by-Step Integration
Step 1: Azure Configuration Configure your Azure AI Agents in Azure AI Foundry. Retrieve your Azure AI Project connection string and agent IDs. Authenticate Azure CLI.
Step 2: Setting Environment Variables
Create a .env
file in your project’s root.
Step 3: Server Installation and Execution Set up a virtual environment and install dependencies. Start the MCP server.
Step 4: Configure Claude Desktop (or another MCP client) Update your MCP client configuration to integrate the MCP server.
Practical Usage
Your MCP server provides several useful methods and can leverage various tools configured with your agents, including Azure AI Search and Bing Web Grounding. Tools like connecting to a specific Azure AI agent, querying the default configured agent, and listing available agents are available.
Real-World Impact
Integrating Azure AI Agent Service with MCP-compatible clients like Claude Desktop enhances productivity by directly embedding conversational AI capabilities into desktop workflows. It provides scalable, secure AI interactions without extensive custom integration and reduces development complexity with standardized MCP-based connections.
Conclusion
By using MCP, developers can significantly extend the capabilities of desktop clients, integrating powerful Azure AI Agents easily and effectively. For .NET developers, explore how you can leverage MCP within your projects using Semantic Kernel. Check out this step-by-step guide to learn more. We invite you to explore further customizations and share your feedback or questions!