mcp-sdk-functions-hosting-python
Verified Safeby Azure-Samples
Overview
Hosts remote Model Context Protocol (MCP) servers built with Python SDK on Azure Functions as custom handlers for AI agent tools.
Installation
uv run func startEnvironment Variables
- AZURE_ENV_NAME
- AZURE_LOCATION
- AZURE_PRINCIPAL_ID
- VNET_ENABLED
- SERVICE_MANAGEMENT_REFERENCE
- PRE_AUTHORIZED_CLIENT_IDS
- TOKEN_EXCHANGE_AUDIENCE
- ANONYMOUS_SERVER_AUTH
- OVERRIDE_USE_MI_FIC_ASSERTION_CLIENTID
- WEBSITE_AUTH_CLIENT_ID
- WEBSITE_AUTH_AAD_ALLOWED_TENANTS
- WEBSITE_HOSTNAME
Security Notes
The server correctly uses environment variables for sensitive configuration and implements a standard On-Behalf-Of (OBO) flow for Microsoft Graph API access, extracting tokens from headers. It makes calls to legitimate external APIs (NWS, Microsoft Graph). No 'eval' or other directly dangerous patterns are present. The primary security considerations are proper Azure configuration and secret management for the environment variables.
Similar Servers
mcp-sdk-functions-hosting-node
A Node.js server for hosting serverless functions, likely within a Managed Cloud Platform (MCP) SDK context.
mcp-sdk-functions-hosting-dotnet
This project serves as a quickstart and SDK example for hosting serverless functions built with .NET within the Microsoft Connected Platform ecosystem, specifically demonstrating a weather service.
mcp-azure-devops-client-demo
This project serves as a Python client demonstration for interacting with Azure DevOps, showcasing API calls for project management, work item manipulation, or pipeline status.
mcp-server-weather
This server provides a tool to fetch current weather conditions for a specified geographic location using the Open-Meteo API.