Purpose
mcp-azure is a server based on the Model Context Protocol (MCP) that connects to Azure through the Azure Resource Manager API (the programmatic layer behind the Azure portal). It enables MCP-capable clients (such as Claude Desktop, Claude Code, Cursor, Codex, etc.) to inventory and operate Azure resources, while ensuring through a built-in governance layer that AI agents operate within safe boundaries.
Main Capabilities
Resource Inventory
- List subscriptions, locations, resource groups, and resources
- Retrieve any resource by ARM ID
Operations
- Create resource groups in approved regions
- Merge tags into any resource
- Control virtual machine power state (start / stop / restart / deallocate)
Lifecycle
- Delete resource groups and individual resources, with safeguards
Governance built in
- Access modes
- Subscription / resource group allowlists
- Protected resource groups
- Location allowlist for new resource groups
- Delete gating
- Typed confirmation for high-impact deletions
- Dry-run
- JSON audit logs
Governance and Security Model
Tools are divided by permission level:
- Read (read-only and above):
list_subscriptions、list_locations、list_resource_groups、list_resources、get_resource - Write (read-write and above):
create_resource_group、tag_resource、control_vm - Admin (admin):
delete_resource_group、delete_resource(both requireAZURE_ALLOW_DELETEas well as typed confirmation)
Usage
This tool is published as the npm package @dockndevai/mcp-azure , runs via npx , and uses an Entra ID service principal. It can be added to clients such as Claude Desktop, Cursor, Windsurf, etc. For specific client configuration, see docs/CLIENTS.md; for all environment variables, see .env.example.
Example Prompts
- "List all resource groups in my subscription and the region each resource group is in"
- "Show every resource in the rg-web group"
- "Tag the app-plan resource with env=prod and owner=team-a" (requires read-write)
- "Stop the build-agent virtual machine in rg-ci" (requires read-write)
Running from Source (Development)
The repository provides server.json for the official MCP registry and mcpNamefor npm ownership verification. See PUBLISHING.mdfor details.
Use Cases
- Scenarios where AI agents need to safely inventory Azure resources
- Automation tasks that need to bulk-tag resources or manage virtual machine power state
- Situations where high-risk operations such as resource deletion need to be performed under controlled conditions
- Compliance scenarios that require auditing AI agent operations on Azure resources
Limitations
- Requires an Azure subscription and Entra ID service principal credentials
- Deletion operations require explicitly enabling
AZURE_ALLOW_DELETEand performing typed confirmation - Creation of new resource groups is restricted by the location allowlist
- Details such as specifically supported regions and subscription types are not yet provided