Azure MCP Server

July 29, 2026 · View on GitHub

Deploy the Azure MCP Server 2.0-beta as a remote, HTTPS-accessible MCP server on Azure Container Apps. Clients such as Microsoft Foundry agents and Microsoft Copilot Studio can securely invoke MCP tools that perform Azure operations on the user's behalf via the OBO flow.

If you have feedback for this template, please open an issue in the microsoft/mcp repo.

Prerequisites

Quick Start

azd up

You'll be prompted for an environment name, subscription, and resource group.

This deploys read-only Azure Storage tools over HTTPS. To customize server startup flags, see the Azure MCP Server docs.

Post-deployment steps

Required — After azd up completes, you must add the server's API scope to the client app registration:

  1. Run azd env get-values and note ENTRA_APP_CLIENT_CLIENT_ID.
  2. In the Azure Portal, find the client app registration by that ID.
  3. Go to API permissionsAdd a permissionMy APIs tab.
  4. Select the server app registration and add the Mcp.Tools.ReadWrite scope.
  5. Grant admin consent for the added permissions.

If the server app doesn't appear under My APIs, see EntraIdConfig.md.

What Gets Deployed

ResourcePurpose
Container AppHosts the Azure MCP Server (storage namespace)
User-assigned managed identityClient credential for the OBO flow
Entra App Registration (Server)OAuth 2.0 auth with Mcp.Tools.ReadWrite scope; OBO token exchange for downstream Azure services
Entra App Registration (Client)Used by clients (e.g. Power Apps custom connector) to connect to the server
Application InsightsTelemetry and monitoring (enabled by default)

Note: Both app registrations are created in the same tenant. The client app is pre-authorized on the server app, bypassing explicit consent. See known issues if you prefer explicit consent.

Deployment Outputs

azd env get-values

Key outputs:

CONTAINER_APP_URL="https://..."
ENTRA_APP_CLIENT_CLIENT_ID="<client_app_id>"
ENTRA_APP_SERVER_CLIENT_ID="<server_app_id>"

Entra ID Configuration

The template provisions the following automatically:

  • Federated Identity Credential on the server app (backed by the user-assigned managed identity)
  • Azure Resource Manager and Azure Storage API scopes on the server app

You only need to grant admin consent for the storage API permissions. To add tools beyond storage, add the corresponding API permissions to the server app registration.

See EntraIdConfig.md for details on consent, adding API permissions, and managing client credentials.

Template Structure

ModuleDescription
main.bicepOrchestrates all resource deployments
entra-app.bicepEntra App registrations and federated credentials
aca-infrastructure.bicepContainer App hosting the MCP Server
aca-storage-managed-identity.bicepUser-assigned managed identity
application-insights.bicepApplication Insights (conditional)

Test the Server

See Usage.md.

Clean Up

azd down

azd down does not delete Entra app registrations. Delete them manually in the Azure Portal using the ENTRA_APP_CLIENT_CLIENT_ID and ENTRA_APP_SERVER_CLIENT_ID values.

To clean up Power Platform resources (custom connector, connection, Copilot Studio agent), use the Power Platform UI.