Azure MCP Server on Azure Container Apps
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Azure MCP server on Azure Container Apps
A remote Model Context Protocol (MCP) server that lets Claude (or any MCP client) explore, monitor and - if you allow it - operate your own Azure resources, in plain language.
Deploy it to your own subscription with one button, the Azure portal, or Azure Cloud Shell - nothing to install locally.
Runs as a managed identity: no Azure keys anywhere. Azure RBAC decides what it can see and do.
Sign in with Microsoft Entra ID: add it to Claude with just the URL (or use an API key for simple clients).
Read-only by default: write actions (start/stop/restart, scale, tags) are off until you turn them on, and every one needs
confirm=trueand is audit-logged.Generic: works with any resource type through Azure Resource Graph, Azure Monitor, Activity Log, Resource Health, Advisor and Cost Management.
flowchart LR
U[You] --> C[Claude / VS Code / any MCP client]
C -- "HTTPS + OAuth (Entra ID)<br/>or API key" --> S
subgraph RG[Your resource group]
S[Container App<br/>MCP server /mcp] --- MI[Managed identity]
S -. logs .-> LA[Log Analytics]
end
S -- sign-in --> E[Microsoft Entra ID]
MI -- "RBAC: Reader (+ optional write roles)" --> ARM[Azure Resource Manager<br/>Resource Graph · Monitor · Cost Management · Advisor]
ARM --> R[(Your subscriptions<br/>and resources)]Contents
Related MCP server: Azure SQL MCP Server
Tools
Tool | What it does |
| subscriptions the server can access |
| resource groups with location and tags |
| any KQL query over Azure Resource Graph (all resource types, across subscriptions) |
| full JSON of any resource by ID (API version picked automatically) |
| Azure Monitor metrics for any resource, with min/max/avg summary |
| who did what, when (by subscription, resource group or resource) |
| is a resource available, degraded or down - and why |
| Azure Advisor cost / security / reliability / performance advice |
| month-to-date (or last month) cost by resource group, service, resource... |
| KQL over a Log Analytics workspace (only if |
Write tools (only with ALLOW_WRITE_ACTIONS=true, each needs confirm=true):
vm_power_action (start / stop / deallocate / restart), restart_web_app, scale_container_app (min/max replicas),
set_tags, remove_tags, resource_action (POST an allow-listed action such as restart on any resource).
Quick deploy
All three options use the prebuilt public image ghcr.io/chikkujimmy/mcp-server-azure-container-apps.
You need an Azure subscription where you can create resources; assigning the identity's Reader role needs Owner or User Access Administrator.
Option 1 - Deploy to Azure button
Creates a resource group with a user-assigned managed identity, a Log Analytics workspace, a Container Apps environment (Consumption, scale to zero) and the app with public HTTPS ingress, and gives the identity Reader on the subscription (untick Assign Reader On Subscription to do it yourself, e.g. per resource group).
Leave Auth Mode = apikey for the first deployment (the API key is generated for you).
After it finishes, open the deployment's Outputs:
mcpUrlis your server URL,entraRedirectUriis what the Entra app needs.The API key is in the Container App → Security → Secrets → mcp-api-key (show value).
For Claude, switch to Entra ID: create the app registration (docs/entra-app.md), then redeploy the same template with Auth Mode = entra, the Entra Client Id and Entra Client Secret (and ideally Allowed Users). The template then also creates a small storage account that keeps sign-ins across restarts.
Template source: infra/main.bicep (compiled to infra/azuredeploy.json).
Option 2 - Azure Cloud Shell (one command, does Entra too)
Open Azure Cloud Shell (Bash) and run:
git clone https://github.com/chikkujimmy/mcp-server-azure-container-apps.git
cd mcp-server-azure-container-apps
bash deploy/cloudshell-deploy.sh --auth entra --location eastusIt deploys the template, creates and configures the Entra app registration (redirect URI, mcp.access scope,
v2 tokens, client secret), restricts sign-in to you (ALLOWED_USERS), and prints the MCP URL.
Secrets are kept in ~/.azure-mcp/<prefix>.secrets (mode 600), never printed. Useful options:
Option | Meaning |
| where the identity gets Reader (default: the subscription) |
| limit the server to these subscriptions |
| register the write tools |
| who may sign in (emails / object IDs) |
| API-key mode instead of Entra |
| keep one replica warm (no cold starts, costs more) |
Run bash deploy/cloudshell-deploy.sh --help for all options. Re-run it any time to change settings.
Option 3 - Azure portal, click by click
docs/deploy-portal.md walks through every screen: resource group, managed identity, Reader role, Container App with the GHCR image, secrets, and the switch to Entra ID.
Subscriptions and RBAC
The server sees exactly what its managed identity is allowed to see:
Reader on a subscription or resource group - all read tools, including cost data.
Log Analytics Reader on a workspace -
log_analytics_query.Write roles only when write actions are on, scoped as narrowly as possible: Virtual Machine Contributor, Website Contributor, Container Apps Contributor, Tag Contributor - avoid Contributor/Owner.
AZURE_SUBSCRIPTION_IDSoptionally narrows it to a list of subscriptions.
Least-privilege table and az role assignment commands: docs/rbac.md.
Authentication
There is no unauthenticated mode for a public endpoint: the server refuses to start without AUTH_MODE
(none is accepted only when listening on 127.0.0.1 for local development).
Microsoft Entra ID (AUTH_MODE=entra) - recommended
The server is an OAuth 2.1 authorization server for MCP clients (protected-resource metadata, dynamic client registration / client ID metadata documents, PKCE) and hands the actual sign-in to Entra ID. MCP clients therefore need only the URL. You need a single-tenant app registration with:
redirect URI (Web):
https://<your-app-url>/auth/callbackExpose an API: Application ID URI
api://<client-id>, scopemcp.accessmanifest:
requestedAccessTokenVersion: 2a client secret
Step by step: docs/entra-app.md (the Cloud Shell script does it for you).
Azure calls still run as the managed identity, so restrict who can sign in: ALLOWED_USERS and/or
Assignment required on the Enterprise application.
API key (AUTH_MODE=apikey)
Clients send Authorization: Bearer <key>. The key must be 32+ characters and is compared in constant time.
Good for VS Code, Claude Code, scripts and testing. Claude.ai / Claude Desktop custom connectors expect OAuth, so use Entra for those.
Connect Claude
Claude.ai and Claude Desktop (custom connectors; availability depends on your Claude plan):
Settings → Connectors → Add custom connector.
Name:
Azure; URL: your MCP URL, e.g.https://azmcp-mcp.<something>.<region>.azurecontainerapps.io/mcp. Leave the advanced OAuth client ID / secret empty.Add → Connect → sign in with your Microsoft account → accept the consent screen.
In a chat, enable the connector from the tools menu and ask away.
(Team/Enterprise: an owner adds the connector under organization settings first.) If the first connect times out, the app may be waking from zero - try again, or set min replicas to 1.
VS Code, Claude Code and other clients
VS Code (.vscode/mcp.json) - Entra mode, VS Code handles the sign-in:
{ "servers": { "azure": { "type": "http", "url": "https://<your-app-url>/mcp" } } }API-key mode:
{
"servers": {
"azure": {
"type": "http",
"url": "https://<your-app-url>/mcp",
"headers": { "Authorization": "Bearer ${input:azure-mcp-key}" }
}
},
"inputs": [ { "id": "azure-mcp-key", "type": "promptString", "description": "Azure MCP API key", "password": true } ]
}Claude Code: claude mcp add --transport http azure https://<your-app-url>/mcp (then /mcp to sign in), or add
--header "Authorization: Bearer <key>" in API-key mode.
Example prompts
List all VMs that are stopped but not deallocated. (still billed for compute)
Which resources cost the most this month?
Show the CPU of my App Service over the last 24 hours.
Who deleted something in resource group X yesterday?
What does Azure Advisor recommend for cost?
Is anything in my subscription unhealthy right now?
Find every resource without an
ownertag.Restart container app Y. (write actions on - Claude asks you to confirm first)
Scale container app Y to 0-2 replicas and tag it
env=demo. (write actions on)
Write actions
Off by default. Turn them on with ALLOW_WRITE_ACTIONS=true (template parameter Allow Write Actions, or
--allow-writes) and give the identity a role that permits the action.
Every write tool requires
confirm=true; without it nothing is sent to Azure.Tools carry MCP annotations (
readOnlyHint=false,destructiveHintwhere relevant) so clients ask you before running them.resource_actiononly accepts actions listed inWRITE_ACTION_ALLOWLIST(defaultstart,stop,restart).Each write is logged as one JSON line (
write_action: who, what, parameters, outcome, time) in the container log / Log Analytics.RBAC is the real boundary: without the role, Azure refuses the call no matter what.
Configuration reference
Env var | Default | Meaning |
| (required) |
|
| API key, 32+ characters (apikey mode) | |
| Entra app registration (entra mode) | |
| 32+ random characters; signs the server's own tokens (entra mode); keep stable | |
|
| scope name exposed by the app registration |
| (anyone who can sign in) | comma-separated emails / UPNs / object IDs |
| storage account for sign-in state (survives restarts) | |
| Claude, VS Code, localhost | extra client redirect URIs ( |
| the Container App URL | set when using a custom domain |
| client ID of the user-assigned managed identity | |
| (all visible) | comma-separated allow-list of subscriptions |
|
| register the write tools |
|
| actions |
| enables | |
|
| row cap for list-style results |
| comma-separated tool modules to skip (e.g. | |
|
|
Security notes
Public endpoint, always authenticated. Only
/healthzis open (it returns{"status":"ok"}and nothing else).Azure access = the managed identity's roles. Start with Reader; add write roles narrowly. Everyone allowed to sign in shares those permissions, so use
ALLOWED_USERSand/or Assignment required.No secrets in the image or repo. Secrets live in Container Apps secrets; Azure access uses the managed identity.
Read-only by default,
confirm=trueand an action allow-list for writes, JSON audit log for every write.Resource IDs are validated (format, no path tricks, allowed subscriptions) before any Azure call; errors are returned as short messages without stack traces.
Prompt injection: resource names, tags and log lines are data from your environment and can contain text aimed at the model. Keep writes off unless you need them, and read the confirmation prompts.
Rotate the Entra client secret before it expires; rotate the API key by updating the secret and restarting the revision.
Want it off the internet? Container Apps supports internal ingress in a VNet - then only clients inside your network can reach it (Claude.ai's cloud connectors can't).
Add your own tools
Drop a Python file in server/tools/ with a register(mcp) function - it is picked up automatically.
See server/tools/README.md.
Cost
With the defaults (Consumption plan, 0.25 vCPU / 0.5 GiB, scale to zero) a personal setup usually stays within
the Container Apps monthly free grant; Log Analytics charges for ingested logs beyond its free allowance (this
server logs very little) and the optional storage account costs cents. Keeping one replica always on
(minReplicas=1) costs a few dollars a month or more depending on region. Check the
Azure pricing calculator for your region.
Teardown
Delete the resource group - that removes the app, environment, identity, logs and storage:
az group delete -n rg-azure-mcpAlso delete the Entra app registration (Entra ID → App registrations) and any role assignments you made outside the resource group (subscription → Access control (IAM) → Role assignments; orphaned ones show as Identity not found).
Local development
Optional - the server runs anywhere Python 3.11+ runs (Linux, macOS, Windows). With uv:
az login # local runs use your Azure CLI sign-in instead of a managed identity
cd server
# stdio, for a local MCP client:
MCP_TRANSPORT=stdio uv run --with-requirements requirements.txt app.py
# or HTTP on localhost without auth:
MCP_HOST=127.0.0.1 AUTH_MODE=none uv run --with-requirements requirements.txt app.py # http://127.0.0.1:8000/mcpWithout uv: python -m venv .venv, activate it, pip install -r server/requirements.txt, then python server/app.py
with the same environment variables (on Windows set them with set / $env:).
Tests (Azure is mocked; no subscription needed):
pip install -r server/requirements.txt -r requirements-dev.txt
pytest -qBuild the image yourself: docker build -t azure-mcp . - or let the GitHub Actions workflow publish it to GHCR on every push to main and on v* tags.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Connect MCP clients to 2,000+ AI models without managing provider API keys.
Cited, standards-aware compliance overlay for AI assistants (ISO, NIST, FedRAMP, IRAP), over MCP.
Remote MCP for Copilot CLI switch gate MCP, structured receipts, audit logs, and reviewer-ready evid
Use AI models for chat, image, and video generation from Claude Code and other MCP hosts.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables natural language interaction with Azure services through Claude Desktop, supporting resource management, subscription handling, and tenant selection with secure authentication.919MIT
- FlicenseAqualityDmaintenanceEnables querying, exploring, and interacting with Azure SQL databases through MCP-compatible clients like Claude Desktop.5-
- AlicenseNot gradedqualityCmaintenanceEnables Claude Desktop to use MCP tools hosted in Azure Container Apps, secured with Microsoft Entra ID sign-in, and provides hello and whoami tools to confirm connectivity and the signed-in Microsoft account.Apache 2.0
- AlicenseNot gradedqualityCmaintenanceConnects AI assistants directly to Azure so users can manage infrastructure, resources, costs, security, and identities through plain-English conversation using their own Entra ID/RBAC permissions.MIT