You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Expose REST API in API Management as MCP server | Microsoft Docs
3
-
description: Learn how to...
3
+
description: Learn how to expose a REST API in Azure API Management as an MCP server, enabling API operations as tools accessible via the Model Context Protocol (MCP).
4
4
author: dlepow
5
-
6
5
ms.service: azure-api-management
7
6
ms.topic: how-to
8
-
ms.date: 05/05/2025
7
+
ms.date: 05/06/2025
9
8
ms.author: danlep
10
9
---
10
+
11
11
# Expose REST API in API Management as an MCP server
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. You can expose one or more of the API operations as tools that can be called by clients using the MCP protocol.
16
16
17
17
> [!NOTE]
18
-
> Only the API definition can be exported directly from API Management to Postman. Other information such as policies or subscription keys isn't exported.
18
+
> This feature is currently in preview.
19
+
20
+
In this article, you learn how to:
21
+
22
+
* Expose a REST API in API Management as an MCP server
23
+
* Test the generated MCP server
24
+
19
25
20
26
## Prerequisites
21
27
22
28
+ Complete the following quickstart: [Create an Azure API Management instance](get-started-create-service-instance.md).
23
-
+ Make sure that your instance manages a REST API that you'd like to expose as an MCP serer.
24
-
29
+
+ Make sure that your instance manages 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).
25
30
> [!NOTE]
26
-
> You can only expose HTTP APIs from API Management as MCP servers.
27
-
+ To test the MCP server, you can use a tool like [MCP Inspector](
31
+
> Only expose HTTP APIs from API Management can be exposed as MCP servers.
32
+
+ To test the MCP server, you can use a tool like [MCP Inspector](https://modelcontextprotocol.io/docs/tools/inspector)
1. In the portal, under **APIs**, select **MCP Servers** > **+ Create new MCP Server**.
35
39
1. In **API**, select a REST API to expose as an MCP server.
36
40
1. Select one or more **API Operations** to expose as tools. You can select all operations or only specific operations.
37
41
1. Select **Create**.
38
42
39
-
:::image type="content" source="media/export-rest-mcp-server/create-mcp-server.png" alt-text="Screenshot of creating an MCP server in the portal.":::
43
+
:::image type="content" source="media/export-rest-mcp-server/create-mcp-server-small.png" alt-text="Screenshot of creating an MCP server in the portal." lightbox="media/export-rest-mcp-server/create-mcp-server.png":::
40
44
41
-
The MCP server is created and the API operations are exposed as tools. The MCP server is listed in the **MCP Servers**blade. The **URL** column shows the endpoint of the MCP server that you can call for testing or within a client application.
45
+
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.
42
46
43
47
44
48
:::image type="content" source="media/export-rest-mcp-server/mcp-server-list.png" alt-text="Screenshot of the MCP server list in the portal.":::
@@ -55,15 +59,21 @@ To use MCP inspector:
55
59
```bash
56
60
npx @modelcontextprotocol/inspector
57
61
```
58
-
1. Select **Transport Type** of **SSE**.
59
-
1. In **URL**, enter the MCP server URL that's configured in API Management.
60
-
1. Under **Authentication**, provide credentials of the underlying API if required in API Management. For example, if a subscription key is required, enter `Ocp-Apim-Subscription-Key` in **Header Name**, and provide the key value in **Bearer token**.
61
-
1. Select **Connect** to connect to the MCP server.
|**URL**| Enter the MCP server URL that's configured in API Management. |
69
+
| **Authentication** | Optionally, provide credentials of the underlying API if required in API Management. For example, if a subscription key is required, enter `Ocp-Apim-Subscription-Key` in **Header Name**, and provide the key value in **Bearer token**. |
70
+
1. Select **Connect** to connect to the MCP server.
62
71
1. In **Tools**, select **List Tools**, and select a tool configured in the MCP server.
63
72
1. Enter any required parameters for the tool, and select **Run Tool** to run the tool. The results are displayed in the **Tool Result** pane.
64
73
65
74
:::image type="content" source="media/export-rest-mcp-server/test-mcp-inspector.png" alt-text="Screenshot of testing an MCP server tool in MCP Inspector.":::
66
75
67
76
## Related content
68
77
78
+
* [Register and discover remote MCP servers in Azure API Center](../api-center/register-discover-mcp-server.md)
0 commit comments