Not able to set/forward headers in MCP server policy when using MCP server from REST API in APIM

Patrice Ferrot 0 Reputation points
2025-08-20T15:42:56.0033333+00:00
  • I have a REST API exposed as MCP server, following the documentation here
  • REST API has validate-jwt policy
  • MCP server also has validate-jwt policy
  • Problem: I cannot get the Authorization header to be forwarded from the MCP server to the API, even though I followed the instructions and added the necessary set-header policy as per the documentation here
  • I even tried to set hardcoded headers with various names (other than Authorization) in the MCP server policy: they are never available in the API

Can you please suggest how to set headers in the MCP server policy so they are available in the API policy when using the "Expose REST API as an MCP server" feature?

Thanks in advance!

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.