Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

remote-mcp-apim-functions-python

MCP.Pizza Chef: Azure-Samples

remote-mcp-apim-functions-python is an MCP server implementation that uses Azure API Management as a secure AI gateway to expose and protect remote MCP servers. It leverages Azure Functions and the latest MCP Authorization specification to enable secure, authorized access to MCP servers remotely, facilitating scalable and secure AI integrations in cloud environments.

Use This MCP server To

Secure remote MCP server access via Azure API Management Implement AI gateways for MCP servers using Azure Functions Enforce MCP Authorization specification for third-party access Deploy scalable MCP servers on Azure cloud infrastructure Manage and monitor MCP server API traffic securely Integrate MCP servers with Azure cloud services and workflows

README

Secure Remote MCP Servers using Azure API Management (Experimental)

Diagram

Azure API Management acts as the AI Gateway for MCP servers.

This sample implements the latest MCP Authorization specification

This is a sequence diagram to understand the flow.

Deploy Remote MCP Server to Azure

  1. Register Microsoft.App resource provider.

    • If you are using Azure CLI, run az provider register --namespace Microsoft.App --wait.
    • If you are using Azure PowerShell, run Register-AzResourceProvider -ProviderNamespace Microsoft.App. Then run (Get-AzResourceProvider -ProviderNamespace Microsoft.App).RegistrationState after some time to check if the registration is complete.
  2. Run this azd command to provision the api management service, function app(with code) and all other required Azure resources

    azd up

MCP Inspector

  1. In a new terminal window, install and run MCP Inspector

    npx @modelcontextprotocol/inspector
  2. CTRL click to load the MCP Inspector web app from the URL displayed by the app (e.g. http://127.0.0.1:6274/#resources)

  3. Set the transport type to SSE

  4. Set the URL to your running API Management SSE endpoint displayed after azd up and Connect:

    https://<apim-servicename-from-azd-output>.azure-api.net/mcp/sse
  5. List Tools. Click on a tool and Run Tool.

remote-mcp-apim-functions-python FAQ

How does Azure API Management enhance MCP server security?
It acts as a secure AI gateway, enforcing authorization and controlling access to remote MCP servers.
What authorization specification does this MCP server implement?
It implements the latest MCP Authorization specification for secure third-party access.
Can this MCP server be deployed on Azure Functions?
Yes, it uses Azure Functions to host and run the MCP server logic.
Is this MCP server suitable for production environments?
It is experimental but designed to enable secure, scalable MCP server deployments on Azure.
How does this server handle API traffic management?
Azure API Management provides monitoring, throttling, and analytics for MCP server APIs.
What programming languages are used in this MCP server?
Primarily Python, along with Azure Bicep and Azure developer tools.
Does this MCP server support multi-tenant AI gateway scenarios?
Yes, Azure API Management supports multi-tenant and multi-environment configurations.
Where can I find deployment instructions?
Deployment steps are provided in the GitHub repository README and Azure documentation.