Back to Home
Azure-Samples icon

mcp-sdk-functions-hosting-python

Verified Safe

by 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

Run Command
uv run func start

Environment 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

Stats

Interest Score25
Security Score9
Cost ClassLow
Avg Tokens100
Stars42
Forks18
Last Update2025-12-16

Tags

Azure FunctionsMCPPythonServerlessAI Agent Tools