Skip to content

Commit 2010eb4

Browse files
author
gitName
committed
refactor with overview
1 parent 0d2fe11 commit 2010eb4

File tree

7 files changed

+199
-73
lines changed

7 files changed

+199
-73
lines changed

articles/api-management/TOC.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,8 @@
254254
href: api-management-authenticate-authorize-azure-openai.md
255255
- name: Manage MCP servers
256256
items:
257+
- name: MCP server capabilities
258+
href: mcp-server-overview.md
257259
- name: Expose REST API as MCP server
258260
href: export-rest-mcp-server.md
259261
- name: Expose existing MCP server

articles/api-management/export-rest-mcp-server.md

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn how to expose a REST API in Azure API Management as an MCP se
44
author: dlepow
55
ms.service: azure-api-management
66
ms.topic: how-to
7-
ms.date: 07/14/2025
7+
ms.date: 07/18/2025
88
ms.author: danlep
99
ms.collection: ce-skilling-ai-copilot
1010
ms.custom:
@@ -17,38 +17,34 @@ ms.custom:
1717

1818
In API Management, you can expose a REST API managed in API Management as a remote [Model Context Protocol (MCP)](https://www.anthropic.com/news/model-context-protocol) server through its built-in [AI gateway](genai-gateway-capabilities.md). Expose one or more of the API operations as tools that MCP clients can call using the MCP protocol.
1919

20-
Azure API Management also supports secure integration with existing MCP-compatible servers - tool servers hosted outside of API Management. For more information, see [Expose an existing MCP server](expose-existing-mcp-server.md).
21-
22-
API Management provides centralized control over MCP server authentication, authorization, and monitoring. It simplifies the management of MCP servers while helping to mitigate common security risks and ensuring scalability.
23-
2420
[!INCLUDE [preview-callout-mcp-servers](includes/preview/preview-callout-mcp-servers.md)]
2521

26-
In this article, you learn how to:
22+
Azure API Management also supports secure integration with existing MCP-compatible servers - tool servers hosted outside of API Management. For more information, see [Expose an existing MCP server](expose-existing-mcp-server.md).
23+
24+
Learn more about:
2725

28-
* Expose a REST API in API Management as an MCP server
29-
* Configure policies for the MCP server
30-
* Secure access to the MCP server
31-
* Monitor the MCP server
32-
* Validate and use the MCP server
26+
* [MCP server support in API Management](mcp-server-overview.md)
27+
* [AI gateway capabilities](genai-gateway-capabilities.md)
3328

34-
[!INCLUDE [about-mcp-servers](../api-center/includes/about-mcp-servers.md)]
3529

3630
## Prerequisites
3731

3832
+ If you don't already have an API Management instance, complete the following quickstart: [Create an Azure API Management instance](get-started-create-service-instance.md).
3933
+ Your API Management instance must be in one of the supported service tiers for preview: classic Basic, Standard, Premium, Basic v2, Standard v2, or Premium v2.
4034
+ If your instance is in the classic Basic, Standard, or Premium tier, you must join the **AI Gateway Early** [update group](configure-service-update-settings.md) to access MCP server features. It can take up to 2 hours for the update to be applied.
41-
+ Make sure that your instance manages an HTTP-compatible API (any API imported as a REST API) that you'd like to expose as an MCP server. To import a sample API, see [Import and publish your first API](import-and-publish.md).
35+
+ Make sure that your instance manages an HTTP-compatible API (any API imported as a REST API, including APIs imported from Azure resources) that you'd like to expose as an MCP server. To import a sample API, see [Import and publish your first API](import-and-publish.md).
4236
> [!NOTE]
4337
> Only HTTP APIs managed in API Management can be exposed as MCP servers.
4438
+ To test the MCP server, you can use Visual Studio Code with access to [GitHub Copilot](https://code.visualstudio.com/docs/copilot/setup).
4539

4640

4741
## Expose API as an MCP server
4842

49-
Follow these steps to expose a REST API in API Management as an MCP server:
43+
Follow these steps to expose a managed REST API in API Management as an MCP server:
5044

5145
1. In the [Azure portal](https://portal.azure.com), navigate to your API Management instance.
46+
[!INCLUDE [preview-callout-mcp-feature-flag](includes/preview/preview-callout-mcp-feature-flag.md)]
47+
5248
1. In the left menu, under **APIs**, select **MCP servers** > **+ Create new MCP server**.
5349
1. Select **Expose an API as an MCP server**.
5450
1. In **Backend API**:
@@ -63,7 +59,7 @@ Follow these steps to expose a REST API in API Management as an MCP server:
6359

6460
:::image type="content" source="media/export-rest-mcp-server/create-mcp-server.png" alt-text="Screenshot of creating an MCP server in the portal." :::
6561

66-
The MCP server is created and the API operations are exposed as tools. The MCP server is listed in the **MCP servers** pane. The **URL** column shows the endpoint of the MCP server that you can call for testing or within a client application.
62+
The MCP server is created and the API operations are exposed as tools. The MCP server is listed in the **MCP servers** pane. The **URL** column shows the endpoint of the MCP server that you can call for testing or within a client application.
6763

6864

6965
:::image type="content" source="media/export-rest-mcp-server/mcp-server-list.png" alt-text="Screenshot of the MCP server list in the portal.":::

articles/api-management/expose-existing-mcp-server.md

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ ms.custom:
1414

1515
[!INCLUDE [api-management-availability-premium-standard-basic-premiumv2-standardv2-basicv2](../../includes/api-management-availability-premium-standard-basic-premiumv2-standardv2-basicv2.md)]
1616

17-
This article shows how Azure API Management supports secure integration with existing MCP-compatible servers - tool servers hosted outside of API Management - through its built-in [AI gateway](genai-gateway-capabilities.md).
17+
This article shows how to use API Management to expose and govern an existing MCP-compatible server - a tool server hosted outside of API Management. Expose the server's tools through API Management so that MCP clients can call them using the MCP protocol.
18+
19+
[!INCLUDE [preview-callout-mcp-servers](includes/preview/preview-callout-mcp-servers.md)]
1820

1921
Example scenarios include:
2022

@@ -23,21 +25,13 @@ Example scenarios include:
2325
- Centralize MCP server tools from Azure Functions and open-source runtimes into [Azure API Center](../api-center/register-discover-mcp-server.md).
2426
- Enable GitHub Copilot, Claude by Anthropic, or ChatGPT to interact securely with tools across your enterprise.
2527

26-
API Management also supports MCP servers natively exposed in API Management from managed REST APIs. For more information, see [Expose a REST API as an MCP server](export-rest-mcp-server.md)
27-
28-
API Management provides centralized control over MCP server authentication, authorization, and monitoring. It simplifies the management of MCP servers while helping to mitigate common security risks and ensuring scalability.
28+
API Management also supports MCP servers natively exposed in API Management from managed REST APIs. For more information, see [Expose a REST API as an MCP server](export-rest-mcp-server.md).
2929

30-
[!INCLUDE [preview-callout-mcp-servers](includes/preview/preview-callout-mcp-servers.md)]
31-
32-
In this article, you learn how to:
30+
Learn more about:
3331

34-
* Connect API Management to an existing MCP server
35-
* Configure policies for the MCP server
36-
* Secure access to the MCP server
37-
* Monitor the MCP server
38-
* Validate and use the MCP server
32+
* [MCP server support in API Management](mcp-server-overview.md)
33+
* [AI gateway capabilities](genai-gateway-capabilities.md)
3934

40-
[!INCLUDE [about-mcp-servers](../api-center/includes/about-mcp-servers.md)]
4135

4236
## Prerequisites
4337

@@ -53,6 +47,8 @@ In this article, you learn how to:
5347
Follow these steps to expose an existing MCP server to API Management:
5448

5549
1. In the [Azure portal](https://portal.azure.com), navigate to your API Management instance.
50+
[!INCLUDE [preview-callout-mcp-feature-flag](includes/preview/preview-callout-mcp-feature-flag.md)]
51+
5652
1. In the left-hand menu, select **MCP servers** > **+ Create MCP server**.
5753
1. Select **Connect existing MCP server**.
5854
1. In **Backend API**:
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
ms.service: azure-api-management
3+
ms.topic: include
4+
author: dlepow
5+
ms.author: danlep
6+
ms.date: 07/16/2025
7+
---
8+
9+
> [!IMPORTANT]
10+
> If your instance is in the classic Basic, Standard, or Premium tier, access the portal at the following URL: `https://portal.azure.com/?Microsoft_Azure_ApiManagement=mcp`
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
---
2+
title: Overview of MCP servers in Azure API Management
3+
description: Learn about Model Context Protocol (MCP) servers in Azure API Management, their architecture, and how they enable AI agents to access external data sources.
4+
author: dlepow
5+
ms.service: azure-api-management
6+
ms.topic: concept-article
7+
ms.date: 07/18/2025
8+
ms.author: danlep
9+
ms.custom:
10+
---
11+
12+
# About MCP servers in Azure API Management
13+
14+
This article introduces features in Azure API Management that you can use to manage Model Context Protocol (MCP) servers. MCP servers allow AI agents to access external data sources, such as databases or APIs, through a standardized protocol.
15+
16+
Use API Management to securely expose and govern API operations as tools for large language models (LLMs) and AI agents like GitHub Copilot, ChatGPT, Claude, and more. API Management provides centralized control over MCP server authentication, authorization, and monitoring. It simplifies the management of MCP servers while helping to mitigate common security risks and ensuring scalability.
17+
18+
19+
## MCP concepts and architecture
20+
21+
AI agents are becoming widely adopted because of enhanced LLM capabilities. However, even the most advanced models face limitations because of their isolation from external data. Each new data source potentially requires custom implementations to extract, prepare, and make data accessible for the models.
22+
23+
The [model context protocol](https://www.anthropic.com/news/model-context-protocol) (MCP) helps solve this problem. MCP is an open standard for connecting AI models and agents with external data sources such as local data sources (databases or computer files) or remote services (systems available over the internet, such as remote databases or APIs).
24+
25+
MCP follows a client-server architecture where a host application can connect to multiple servers. Whenever your MCP host or client needs a tool, it connects to the MCP server. The MCP server then connects to, for example, a database or an API. MCP hosts and servers connect with each other through the MCP protocol.
26+
27+
The following diagram illustrates the MCP architecture:
28+
29+
:::image type="content" source="media/mcp-server-overview/mcp-architecture.png" alt-text="Diagram of model context protocol (MCP) architecture.":::
30+
31+
The architecture consists of the following components:
32+
33+
| Component | Description |
34+
|----------------|-------------------------------------------------------------------------------------------------|
35+
| **MCP hosts** | LLM applications such as chat apps or AI assistants in your IDEs (like GitHub Copilot in Visual Studio Code) that need to access external capabilities |
36+
| **MCP clients**| Protocol clients, inside the host application, that maintain 1:1 connections with servers |
37+
| **MCP servers**| Lightweight programs that each expose specific capabilities and provide context, tools, and prompts to clients |
38+
| **MCP protocol**| Transport layer in the middle |
39+
40+
The MCP architecture is built on [JSON-RPC 2.0 for messaging](https://modelcontextprotocol.io/docs/concepts/architecture). Communication between clients and servers occurs over defined transport layers, and supports primarily two modes of operation:
41+
42+
* **Remote MCP servers** - MCP clients connect to MCP servers over the internet, establishing a connection using HTTP and server-sent events (SSE), and authorizing the MCP client access to resources on the user's account using OAuth.
43+
44+
* **Local MCP servers** MCP clients connect to MCP servers on the same machine, using standard input/output as a local transport method.
45+
46+
Azure API Management supports the remote MCP server mode, using native features of API Management and [capabilities of the AI gateway](./genai-gateway-capabilities.md).
47+
48+
> [!NOTE]
49+
> MCP server support in API Management is in preview. In preview, API Management supports MCP server tools, but doesn't currently support MCP resources or prompts.
50+
51+
52+
## MCP server endpoints
53+
54+
55+
[TBD]
56+
<!-- Add a section about MCP server endpoints, including SSE and Streamable HTTP endpoints -->
57+
58+
## Expose MCP servers in API Management
59+
60+
API Management supports two ways to expose MCP servers:
61+
62+
* **Expose a REST API as an MCP server** - Use this option to expose any REST API managed in API Management as an MCP server, including APIs imported from Azure resources. The API operations are exposed as tools that can be called by MCP clients. For more information, see [Expose REST API in API Management as MCP server](export-rest-mcp-server.md).
63+
64+
65+
66+
* **Expose an existing MCP server** - Use this option to expose an existing MCP-compatible server, such as a LangChain or LangServe tool server, or an MCP server created in Azure Logic Apps, or Azure Functions. For more information, see [Expose an existing MCP server](expose-existing-mcp-server.md).
67+
68+
69+
## Govern MCP servers
70+
71+
Configure one or more API Management [policies](../articles/api-management/api-management-howto-policies.md) to help manage the MCP server. The policies are applied to all API operations exposed as tools in the MCP server and can be used to control access, authentication, and other aspects of the tools.
72+
73+
Configure policies such as the following::
74+
75+
* **Rate limiting and quota enforcement** - Limit the number of requests per time period to the MCP server's tools, and set usage quotas for clients or subscriptions.
76+
* **Authentication and authorization** - Require and validate incoming requests using JSON web tokens (JWT) or Microsoft Entra ID tokens for secure access.
77+
* **IP filtering** - Restrict access to the MCP server's tools based on client IP addresses.
78+
* **Caching** - Cache responses from the MCP server's tools to improve performance and reduce backend load.
79+
80+
81+
## Secure access to the MCP server
82+
83+
You can secure both inbound access to the MCP server (from an MCP client to API Management) and outbound access (from API Management to the MCP server backend).
84+
85+
### Secure inbound access
86+
87+
One option to secure inbound access is to configure a policy to validate a JSON web token (JWT) in the incoming requests. This ensures that only authorized clients can access the MCP server. Use the [validate-jwt](../articles/api-management/validate-jwt-policy.md) or [validate-azure-ad-token](../articles/api-management/validate-azure-ad-token-policy.md) policy to validate the JWT token in the incoming requests. For example:
88+
89+
<!-- update to validate-azure-ad-token-policy.md if preferred -->
90+
```xml
91+
<validate-jwt header-name="Authorization" failed-validation-httpcode="401" failed-validation-error-message="Unauthorized. Access token is missing or invalid.">
92+
<openid-config url="https://login.microsoftonline.com/{tenant-id}/v2.0/.well-known/openid-configuration" />
93+
<audiences>
94+
<audience>your-client-id</audience>
95+
</audiences>
96+
<issuers>
97+
<issuer>https://sts.windows.net/{tenant-id}/</issuer>
98+
</issuers>
99+
</validate-jwt>
100+
101+
```
102+
103+
> [!IMPORTANT]
104+
> When you use an MCP server in API Management, incoming headers like **Authorization** aren't automatically passed to your backend API. If your backend needs a token, you can add it as an input parameter in your API definition. Alternatively, use policies like `get-authorization-context` and `set-header` to generate and attach the token, as noted in the following section.
105+
106+
107+
### Secure outbound access
108+
109+
You can use API Management's [credential manager](../articles/api-management/credentials-overview.md) to securely inject secrets or tokens for calls to a backend API. At a high level, the process is as follows:
110+
111+
1. Register an application in a supported identity provider.
112+
1. Create a credential provider resource in API Management to manage the credentials from the identity provider.
113+
1. Configure a connection to the provider in API Management.
114+
1. Configure `get-authorization-context` and `set-header` policies to fetch the token credentials and present them in an **Authorization** header of the API requests.
115+
116+
For a step-by-step guide to call an example backend API using credentials generated in credential manager, see [Configure credential manager - GitHub](../articles/api-management/credentials-how-to-github.md).
117+
118+
119+
## Monitoring
120+
121+
To monitor MCP servers in Azure API Management, you can use API Management's built-in [integration with Azure Monitor](monitor-api-management.md) for gateway activity. This allows you to:
122+
123+
* Track diagnostic logs, request/response traces, and usage metrics for MCP server endpoints.
124+
* Analyze traffic patterns, performance, and errors using Azure Monitor workbooks, metrics, and logs.
125+
* Send logs to Azure Log Analytics for advanced querying and analysis.
126+
* Use [Azure Application Insights](api-management-howto-app-insights.md) for detailed telemetry and performance monitoring of MCP servers.
127+
* Set up alerts for specific events or thresholds.
128+
* View monitoring data in the Azure portal under your API Management instance’s **Monitoring** or **Logs** panes.
129+
130+
For more information, see [Monitor API Management](monitor-api-management.md).
131+
132+
133+
## Discover MCP servers
134+
135+
Use [Azure API Center](../api-center/register-discover-mcp-server.md) to register and discover MCP servers in your organization. Azure API Center provides a centralized location for managing MCP servers, including those exposed in API Management and those hosted outside of API Management.
136+
137+
138+
139+
## Availability
140+
141+
<!-- availability in workspaces?-->
142+
143+
144+
MCP servers in API Management are available in the following service tiers:
145+
146+
* **Classic tiers**: Basic, Standard, Premium
147+
* **v2 tiers**: Basic v2, Standard v2, Premium v2
148+
149+
> [!NOTE]
150+
> In the classic tiers, you must join the [AI Gateway Early update group](configure-service-update-settings.md) to access MCP server features, and access the portal at a feature-specific URL.
151+
152+
## Related content
153+
154+
* [Python sample: Secure remote MCP servers using Azure API Management (experimental)](https://github.com/Azure-Samples/remote-mcp-apim-functions-python)
155+
156+
* [MCP client authorization lab](https://github.com/Azure-Samples/AI-Gateway/tree/main/labs/mcp-client-authorization)
157+
158+
* [Use the Azure API Management extension for VS Code to import and manage APIs](../articles/api-management/visual-studio-code-tutorial.md)
159+
160+
* [Register and discover remote MCP servers in Azure API Center](../articles/api-center/register-discover-mcp-server.md)
161+
162+
* [Expose REST API in API Management as an MCP server](../articles/api-management/export-rest-mcp-server.md)
163+
164+
* [Expose and govern existing MCP server](../articles/api-management/expose-existing-mcp-server.md)
56.8 KB
Loading

0 commit comments

Comments
 (0)