Skip to content

Commit 9400228

Browse files
author
gitName
committed
rough draft
1 parent 87edc55 commit 9400228

File tree

4 files changed

+182
-121
lines changed

4 files changed

+182
-121
lines changed

articles/api-management/TOC.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@
236236
items:
237237
- name: AI gateway capabilities in API Management
238238
href: genai-gateway-capabilities.md
239-
- name: Import LLM APIs
239+
- name: Manage LLM APIs
240240
items:
241241
- name: Import Azure AI Foundry API
242242
href: azure-ai-foundry-api.md
@@ -247,13 +247,17 @@
247247
- name: Import Google Gemini API
248248
href: openai-compatible-google-gemini-api.md
249249
- name: Import Amazon Bedrock API
250-
href: amazon-bedrock-passthrough-llm-api.md
251-
- name: Expose REST API as MCP server
252-
href: export-rest-mcp-server.md
253-
- name: Semantic caching for Azure OpenAI API requests
254-
href: azure-openai-enable-semantic-caching.md
255-
- name: Authenticate and authorize to Azure OpenAI
256-
href: api-management-authenticate-authorize-azure-openai.md
250+
href: amazon-bedrock-passthrough-llm-api.
251+
- name: Semantic caching for LLM API requests
252+
href: azure-openai-enable-semantic-caching.md
253+
- name: Authenticate and authorize to Azure OpenAI
254+
href: api-management-authenticate-authorize-azure-openai.md
255+
- name: Manage MCP servers
256+
items:
257+
- name: Expose REST API as MCP server
258+
href: export-rest-mcp-server.md
259+
- name: Connect and govern existing MCP server
260+
href: connect-govern-existing-mcp-server.md
257261
- name: Manage APIs with policies
258262
items:
259263
- name: API Management policies overview

articles/api-management/connect-govern-existing-mcp-server.md

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,35 +14,42 @@ 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-
Azure API Management now supports secure integration with external MCP-compatible servers — tool servers hosted outside of API Management — through its built-in [AI gateway](genai-gateway-capabilities.md). This capability adds to existing support for MCP servers [natively exposed in API Management](export-rest-mcp-server.md) from managed REST APIs. Wit this enhancement, organizations can apply consistent governance, security, and observability to all MCP tools, regardless of where they are hosted.
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).
1818

19-
This capability is essential for enterprises building AI agents and copilots that rely on tools distributed across cloud services, open-source runtimes, and internal platforms. With API Management, you can now centralize access, enforce policies, and monitor usage across your entire AI tool ecosystem.
19+
Example scenarios include:
2020

21-
### Example scenarios
21+
- Proxy [LangServe](https://langchain-ai.github.io/langserve/) or [LangChain](https://python.langchain.com/) tool servers through API Management with per-tool authentication and rate limits.
22+
- Securely expose Azure Logic Apps–based tools to copilots using IP filtering and OAuth.
23+
- Centralize MCP 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.
2225

23-
- Proxy LangServe or LangChain tool servers through API Management with per-tool authentication and rate limits.
24-
- Securely expose Logic App–based tools to copilots using IP filtering and OAuth.
25-
- Centralize tools from Azure Functions and open-source runtimes into Azure API Center.
26-
- Enable GitHub Copilot, Claude, or ChatGPT to interact securely with tools across your enterprise.
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)
2727

28+
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.
2829

2930
## Prerequisites
3031

31-
- An Azure API Management instance with the AI Gateway feature enabled.
32+
+ 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.
33+
+ 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.
3234
- Access to an external MCP-compatible server (for example, hosted in Azure Logic Apps, Azure Functions, LangServe, or other platforms).
3335
- Appropriate credentials to the MCP server (OAuth 2.0 client credentials or API keys) for secure access.
34-
35-
36+
+ To test the MCP server, you can use Visual Studio Code with access to [GitHub Copilot](https://code.visualstudio.com/docs/copilot/setup).
3637

3738
## Connect an existing MCP Server
3839

39-
1. Navigate to your Azure API Management instance in the Azure portal.
40-
2. In the left-hand menu, select **MCP servers** > **+ Create MCP server**.
41-
2. Choose **Connect existing MCP server**.
42-
3. Enter the following details:
40+
1. In the [Azure portal](https://portal.azure.com), navigate to your API Management instance.
41+
1. In the left-hand menu, select **MCP servers** > **+ Create MCP server**.
42+
1. Select **Connect existing MCP server**.
43+
1. Enter the following details for the backend MCP server:
4344
- **Base URL** of the external MCP server.
4445
- **Metadata endpoint** (if available).
4546
- **Tool schema** describing the server’s capabilities.
47+
1. Enter the following details for the frontend MCP server accessed through API Management:
48+
- **Display name** for the MCP server in API Management.
49+
- **Endpoint URL** where the MCP server will be accessible.
50+
51+
[!INCLUDE [api-management-configure-test-mcp-server](../../includes/api-management-configure-test-mcp-server.md)]
52+
4653

4754
## Configure access and security Policies
4855

@@ -77,13 +84,3 @@ With this enhancement, Azure API Management becomes the unified governance layer
7784

7885
By integrating with Azure API Center, all your AI tools become discoverable, auditable, and reusable — regardless of their hosting environment.
7986

80-
## Related content
81-
82-
* [Python sample: Secure remote MCP servers using Azure API Management (experimental)](https://github.com/Azure-Samples/remote-mcp-apim-functions-python)
83-
84-
* [MCP client authorization lab](https://github.com/Azure-Samples/AI-Gateway/tree/main/labs/mcp-client-authorization)
85-
86-
* [Use the Azure API Management extension for VS Code to import and manage APIs](visual-studio-code-tutorial.md)
87-
88-
* [Register and discover remote MCP servers in Azure API Center](../api-center/register-discover-mcp-server.md)
89-

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

Lines changed: 5 additions & 89 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,9 @@ 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. Expose one or more of the API operations as tools that MCP clients can call using the MCP protocol.
1919

20-
In addition to exposing your OpenAPI and HTTP endpoints as MCP servers, you can expose REST APIs managed in API Management such as the following:
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.
2121

22-
* [Azure function app](import-function-app-as-api.md), for accessing serverless APIs
23-
* [Azure logic app](import-logic-app-as-api.md), for automating workflows
24-
* [Azure container app](container.md), for deploying containerized APIs
25-
26-
27-
Using API Management to expose remote MCP servers provides centralized control over authentication, authorization, and monitoring. It simplifies the process of exposing APIs as MCP servers while helping to mitigate common security risks and ensuring scalability.
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.
2823

2924
> [!IMPORTANT]
3025
> This feature is currently in preview. Review the [prerequisites](#prerequisites) to access MCP server features.
@@ -41,9 +36,9 @@ In this article, you learn how to:
4136

4237
+ 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.
4338
+ 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.
44-
+ 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).
39+
+ 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).
4540
> [!NOTE]
46-
> Only HTTP APIs from API Management can be exposed as MCP servers.
41+
> Only HTTP APIs managed in API Management can be exposed as MCP servers.
4742
+ To test the MCP server, you can use Visual Studio Code with access to [GitHub Copilot](https://code.visualstudio.com/docs/copilot/setup).
4843

4944

@@ -62,83 +57,4 @@ The MCP server is created and the API operations are exposed as tools. The MCP s
6257

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

65-
## Configure policies for the MCP server
66-
67-
Configure one or more API Management [policies](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.
68-
69-
For a tutorial on how to configure policies, see [Transform and protect your API](transform-api.md).
70-
71-
To configure policies for the MCP server:
72-
73-
1. In the portal, under **APIs**, select **MCP Servers**.
74-
1. Select the MCP server you created.
75-
1. In the left menu, under **MCP**, select **Policies**.
76-
1. In the policy editor, add or edit the policies you want to apply to the MCP server's tools. The policies are defined in XML format. For example, you can add a policy to limit calls to the MCP server's tools (in this example, 5 calls per 30 second per client IP address).
77-
78-
```xml
79-
<rate-limit-by-key calls="5" renewal-period="30" counter-key="@(context.Request.IpAddress)" remaining-calls-variable-name="remainingCallsPerIP" />
80-
```
81-
82-
:::image type="content" source="media/export-rest-mcp-server/mcp-server-policies-small.png" alt-text="Screenshot of the policy editor for an MCP server." lightbox="media/export-rest-mcp-server/mcp-server-policies.png":::
83-
84-
## Test and use the MCP server
85-
86-
To verify that the MCP server is working, you can use Visual Studio Code to send requests to the MCP server tools.
87-
88-
In Visual Studio Code, use GitHub Copilot chat in agent mode (preview) to add the MCP server and use the tools. For background about MCP servers in Visual Studio Code, see [Use MCP Servers in VS Code (Preview)](https://code.visualstudio.com/docs/copilot/chat/mcp-servers).
89-
90-
> [!TIP]
91-
> If you use the [MCP Inspector](https://modelcontextprotocol.io/docs/tools/inspector) to test an MCP server created by API Management, we recommend using version 0.9.0.
92-
93-
### Add the MCP server in Visual Studio Code
94-
95-
To add the MCP server in Visual Studio Code:
96-
97-
1. Use the **MCP: Add Server** command from the Command Palette.
98-
99-
1. When prompted, select the server type: **HTTP (HTTP or Server Sent Events)**.
100-
1. Enter the **URL of the MCP server** in API Management. Example: `https://<apim-service-name>.azure-api.net/<api-name>-mcp/sse` (for SSE endpoint) or `https://<apim-service-name>.azure-api.net/<api-name>-mcp/mcp` (for MCP endpoint)
101-
1. Enter a **server ID** of your choice.
102-
1. Select whether to save the configuration to your **workspace settings** or **user settings**.
103-
* **Workspace settings** - The server configuration is saved to a `.vscode/mcp.json` file only available in the current workspace.
104-
105-
* **User settings** - The server configuration is added to your global `settings.json` file and is available in all workspaces. The configuration looks similar to the following:
106-
107-
:::image type="content" source="media/export-rest-mcp-server/mcp-servers-visual-studio-code.png" alt-text="Screenshot of MCP servers configured in Visual Studio Code.":::
108-
109-
Add fields to the JSON configuration for settings such as authentication header. The following example shows the configuration for an API Management subscription key passed in a header as in input value. Learn more about the [configuration format](https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_configuration-format)
110-
111-
:::image type="content" source="media/export-rest-mcp-server/mcp-server-with-header-visual-studio-code.png" alt-text="Screenshot of authentication header configuration for an MCP server":::
112-
113-
### Use tools in agent mode
114-
115-
After adding an MCP server, you can use tools in agent mode.
116-
117-
1. In GitHub Copilot chat, select **Agent** mode and select the **Tools** button to see available tools.
118-
119-
:::image type="content" source="media/export-rest-mcp-server/tools-button-visual-studio-code.png" alt-text="Screenshot of Tools button in chat.":::
120-
121-
1. Select one or more tools from the MCP server to be available in the chat.
122-
123-
:::image type="content" source="media/export-rest-mcp-server/select-tools-visual-studio-code.png" alt-text="Screenshot of selecting tools in Visual Studio Code.":::
124-
125-
1. Enter a prompt in the chat to invoke the tool. For example, if you selected a tool to get information about an order, you can ask the agent about an order.
126-
127-
```copilot-prompt
128-
Get information for order 2
129-
```
130-
131-
Select **Continue** to see the results. The agent uses the tool to call the MCP server and returns the results in the chat.
132-
133-
:::image type="content" source="media/export-rest-mcp-server/chat-results-visual-studio-code.png" alt-text="Screenshot of chat results in Visual Studio Code.":::
134-
135-
## Related content
136-
137-
* [Python sample: Secure remote MCP servers using Azure API Management (experimental)](https://github.com/Azure-Samples/remote-mcp-apim-functions-python)
138-
139-
* [MCP client authorization lab](https://github.com/Azure-Samples/AI-Gateway/tree/main/labs/mcp-client-authorization)
140-
141-
* [Use the Azure API Management extension for VS Code to import and manage APIs](visual-studio-code-tutorial.md)
142-
143-
* [Register and discover remote MCP servers in Azure API Center](../api-center/register-discover-mcp-server.md)
144-
60+
[!INCLUDE [api-management-configure-test-mcp-server](../../includes/api-management-configure-test-mcp-server.md)]

0 commit comments

Comments
 (0)