Skip to content

Commit cdff9c1

Browse files
Merge pull request #303543 from tehnoonr/patch-1
Update export-rest-mcp-server.md
2 parents 53c181e + 61a9d49 commit cdff9c1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ In this article, you learn how to:
3737
+ 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).
3838
> [!NOTE]
3939
> Only HTTP APIs from API Management can be exposed as MCP servers.
40+
+ If you’ve enabled diagnostic logging via Application Insights or Azure Monitor at the global scope (All APIs) for your API Management service instance, ensure that the “Number of payload bytes to log” setting for Frontend Response is set to 0. This prevents unintended logging of response bodies across all APIs and helps ensure proper functioning of MCP servers. To log payloads selectively for specific APIs, configure the setting individually at the API scope, allowing targeted control over response logging.
4041
+ To test the MCP server, you can use Visual Studio Code with access to [GitHub Copilot](https://code.visualstudio.com/docs/copilot/setup).
4142

4243

@@ -62,6 +63,8 @@ The MCP server is created and the API operations are exposed as tools. The MCP s
6263
:::image type="content" source="media/export-rest-mcp-server/mcp-server-list.png" alt-text="Screenshot of the MCP server list in the portal.":::
6364
6465
## Configure policies for the MCP server
66+
> [!IMPORTANT]
67+
> Do not access the response body using `context.Response.Body` within MCP server policies. Doing so triggers response buffering, which interferes with the streaming behavior required by MCP servers and may cause them to malfunction.
6568
6669
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.
6770

0 commit comments

Comments
 (0)