BYO OAuth2 — Azure-hosted MCP starter (build your own MCP on Functions)
Companion to tool-mcp-custom-oauth.md. Use this when you want to build the MCP server yourself on Azure Functions (rather than register an OAuth app against a third-party MCP). Deploying the sample template creates the Function App and its Entra app registration, so four of the five BYO OAuth2 connection inputs come straight from its outputs — you only add a client secret.
Run the steps in order. They set env vars (FUNC, RG, APPID, IDURI, TENANT) that later steps reuse. Then return to tool-mcp-custom-oauth.md § A. Imperative CLI with the inputs.
Step 1 — Scaffold and provision the Function App + Entra app.
bash
azd init --template remote-mcp-functions-python -e mcpserver-python