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
|**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 |
33
-
|**MCP clients**| Protocol clients, inside the host application, that maintain 1:1 connections with servers |
34
-
|**MCP servers**| Lightweight programs that each expose specific capabilities and provide context, tools, and prompts to clients |
35
-
|**MCP protocol**| Transport layer in the middle |
36
-
37
24
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.
38
25
39
-
### Remote versus local MCP servers
40
-
41
-
MCP utilizes a client-host-server architecture 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:
26
+
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:
42
27
43
28
***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.
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. Expose one or more of the API operations as tools that MCP clients can call using the MCP protocol.
18
+
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.
19
19
20
-
Azure API Management also supports secure integration with existing MCP-compatible servers — tool servers hosted outside of API Management - such as Azure logic apps or function apps, or tools hosted in LangServe or LangChain. See [Connect and govern existing MCP server](connect-govern-existing-mcp-server.md) for more information.
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
21
22
-
With support for existing and exposed MCP servers, API Management provides centralized control over authentication, authorization, and monitoring. It simplifies the management of MCP servers while helping to mitigate common security risks and ensuring scalability.
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
23
24
-
> [!IMPORTANT]
25
-
> This feature is currently in preview. Review the [prerequisites](#prerequisites) to access MCP server features.
+ 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). 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.
38
-
+ 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.
38
+
+ 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).
39
+
+ 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.
40
+
+ 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.
39
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).
40
42
> [!NOTE]
41
43
> Only HTTP APIs managed in API Management can be exposed as MCP servers.
@@ -44,15 +46,24 @@ In this article, you learn how to:
44
46
45
47
## Expose API as an MCP server
46
48
49
+
Follow these steps to expose a REST API in API Management as an MCP server:
50
+
47
51
1. In the [Azure portal](https://portal.azure.com), navigate to your API Management instance.
48
-
1. In the left menu, select **APIs** > **MCP Servers** > **+ Create new MCP Server**.
49
-
1. In **API**, select a REST API to expose as an MCP server.
50
-
1. Select one or more **API Operations** to expose as tools. You can select all operations or only specific operations.
52
+
1. In the left menu, under **APIs**, select **MCP servers** > **+ Create new MCP server**.
53
+
1. Select **Expose an API as an MCP server**.
54
+
1. In **Backend API**:
55
+
1. Select a managed **API** to expose as an MCP server.
56
+
1. Select one or more **API operations** to expose as tools. You can select all operations or only specific operations.
57
+
> [!NOTE]
58
+
> You can update the operations exposed as tools later in the **Tools** blade of your MCP server.
59
+
1. In **New MCP server**:
60
+
1. Enter a **Name** and optional **Description** for the MCP server in API Management.
61
+
1. In **Base URL**, configure the final URL where the MCP server will be accessible in API Management.
51
62
1. Select **Create**.
52
63
53
-
:::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":::
64
+
:::image type="content" source="media/export-rest-mcp-server/create-mcp-server.png" alt-text="Screenshot of creating an MCP server in the portal." :::
54
65
55
-
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.
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.
56
67
57
68
58
69
:::image type="content" source="media/export-rest-mcp-server/mcp-server-list.png" alt-text="Screenshot of the MCP server list in the portal.":::
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).
18
+
19
+
Example scenarios include:
20
+
21
+
- Proxy [LangChain](https://python.langchain.com/) or [LangServe](https://python.langchain.com/docs/langserve/) tool servers through API Management with per-server authentication and rate limits.
22
+
- Securely expose Azure Logic Apps–based tools to copilots using IP filtering and OAuth.
23
+
- Centralize MCP server tools from Azure Functions and open-source runtimes into [Azure API Center](../api-center/register-discover-mcp-server.md).
24
+
- Enable GitHub Copilot, Claude by Anthropic, or ChatGPT to interact securely with tools across your enterprise.
25
+
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.
+ 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).
45
+
+ 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.
46
+
+ 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.
47
+
+ Access to an external MCP-compatible server (for example, hosted in Azure Logic Apps, Azure Functions, LangServe, or other platforms).
48
+
+ Appropriate credentials to the MCP server (OAuth 2.0 client credentials or API keys) for secure access.
49
+
+ To test the MCP server, you can use Visual Studio Code with access to [GitHub Copilot](https://code.visualstudio.com/docs/copilot/setup).
50
+
51
+
## Expose an existing MCP Server
52
+
53
+
Follow these steps to expose an existing MCP server to API Management:
54
+
55
+
1. In the [Azure portal](https://portal.azure.com), navigate to your API Management instance.
56
+
1. In the left-hand menu, select **MCP servers** > **+ Create MCP server**.
57
+
1. Select **Connect existing MCP server**.
58
+
1. In **Backend API**:
59
+
1. Enter the existing **MCP server base URL**.
60
+
1. Select a **Transport type**:
61
+
-**Streamable HTTP** (default) - Server delivers data continuously over HTTP as it becomes available
62
+
-**Server-sent events (SSE)** - Server pushes real-time updates to clients. When selected, optionally enter the following paths:
63
+
-`/sse` - path for streaming responses
64
+
-`/messages` - path for receiving tool requests from agents
65
+
1. In **New MCP server**:
66
+
1. Enter a **Name** and optional **Description** for the MCP server in API Management.
67
+
1. In **Base path**, enter a route prefix for tools.
68
+
1. In **Base URL**, configure the final URL where the MCP server will be accessible in API Management.
69
+
1. Select **Create**.
70
+
71
+
:::image type="content" source="media/expose-existing-mcp-server/create-mcp-server-small.png" alt-text="Screenshot of creating an MCP server in the portal." :::
72
+
73
+
The MCP server is connected and is listed in the **MCP servers** pane. The **URL** column shows the MCP server URL that you can call for testing or within a client application.
74
+
75
+
> [!NOTE]
76
+
> API Management doesn't display tools from the existing MCP server. All tool registration and configuration must be done on the existing remote MCP server.
> This feature is in preview. Review the [prerequisites](#prerequisites) to access MCP server features. In preview, API Management supports MCP server tools, but doesn't currently support MCP resources or prompts.
0 commit comments