This is a quickstart template to easily build and deploy a custom remote MCP server to the cloud using Azure Functions with Python, and then load the MCP tools in Foundry Agent Service
Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"foundry-agent-service-remote-mcp-python": {
"command": "<see-readme>",
"args": []
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
name: Remote MCP with Azure Functions (Python) description: Run a remote MCP server on Azure functions. urlFragment: foundry-agent-service-remote-mcp-python
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in cloud / developer-tools
Manage Supabase projects — databases, auth, storage, and edge functions
⚡ A Simple / Speedy / Secure Link Shortener with Analytics, 100% run on Cloudflare.
XcodeBuildMCP provides tools for Xcode project management, simulator management, and app utilities.
A Model Context Protocol (MCP) server and CLI that provides tools for agent use when working on iOS and macOS projects.
MCP Security Weekly
Get CVE alerts and security updates for Foundry Agent Service Remote Mcp Python and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
This is a quickstart template to easily run an Azure AI Foundry Agent Service client and then add a custom remote MCP server to the cloud using Azure Functions Remote MCP. You can clone/restore/run on your local machine with debugging, and azd up to have it in the cloud in a couple minutes. The MCP server is secured by design using keys and HTTPS, and allows more options for OAuth using built-in auth and/or API Management as well as network isolation using VNET.
If you're looking for this sample in more languages check out the .NET/C# and Node.js/TypeScript versions.
Below is the architecture diagram for the Remote MCP Server using Azure Functions with Foundry Agent Service:

4.0.7030Run this azd command to provision the function app, with any required Azure resources including AI Foundry Agent Service, and deploy your code:
azd up
Note: You'll be prompted to specify an
agentLocationduring deployment. This must be one of the AI Foundry supported regions:westus,westus2,uaenorth,southindia, orswitzerlandnorth. This location is used specifically for AI resources (AI Services, Search, Cosmos DB) and can be different from your main deployment location.
Additionally, API Management can be used for improved security and policies over your MCP Server, and App Service built-in authentication can be used to set up your favorite OAuth provider including Entra.
Your client will need a key in order to invoke the new hosted SSE endpoint, which will be of the form https://<funcappname>.azurewebsites.net/runtime/webhooks/mcp/sse. The hosted function requires a system key by default which can be obtained from the portal or the CLI (az functionapp keys list --resource-group <resource_group> --name <function_app_name>). Obtain the system key named mcp_extension.
Change to the agent folder in a new terminal window:
cd agent
Create a .env file based on the example provided. Copy the .env.example file:
copy .env.example .env
Edit the .env file with your deployed function app details:
# Azure AI Project Configuration
PROJECT_ENDPOINT=https: