mcp-azure
mcp-azure
一个适用于 Azure 的 Model Context Protocol 服务器(通过 Azure Resource Manager API —— Azure Portal 背后的程序化层)。它让支持 MCP 的客户端(Claude Desktop、Claude Code、Cursor、Codex 等)能够清点和操作 Azure 资源,并通过一层治理机制,让 AI 代理始终处于安全的边界内。
提供的功能
清点 —— 列出订阅、位置、资源组和资源;可按 ARM id 获取任意资源。
操作 —— 在允许的区域创建资源组、为任意资源合并标签,以及控制虚拟机电源状态(启动 / 停止 / 重启 / 解除分配)。
生命周期 —— 在安全防护下删除资源组和单个资源。
内置治理 —— 访问模式、订阅/资源组允许列表、受保护资源组、新建资源组的区域允许列表、删除门控、高风险删除需要逐字确认、演练模式(dry-run)以及 JSON 审计日志。
Related MCP server: Azure MCP Server
治理与安全模型
关注点 | 标志 | 默认值 | 效果 |
服务器能做什么? |
|
|
|
允许哪些订阅? |
| (all) | 对其他订阅的操作将被拒绝。 |
允许哪些资源组? |
| (all) | 对资源组白名单之外的操作将被拒绝。 |
一直只读的资源组 |
| (无) | 可读,但永远不可修改。 |
允许的区域 |
| (任意) | 新的资源组只能在这些区域创建。 |
允许删除吗? |
|
| 删除操作需要此开关 并 处于 |
逐字确认 |
|
| 删除操作要求 |
演练(dry-run) |
|
| 读/写权限工具会校验并记录意图,然后返回。 |
审计轨迹 |
|
| 每次受保护的操作都会向 stderr 写入一行 JSON。 |
工具
读(read-only+):list_subscriptions、list_locations、list_resource_groups、list_resources、get_resource
写(read-write+):create_resource_group、tag_resource、control_vm
管理(admin):delete_resource_group、delete_resource(两者都需要 AZURE_ALLOW_DELETE 以及手写的 confirm 参数)
快速开始 —— 集成到你的代理中
已在 npm 上发布,包名为 @dockndevai/mcp-azure。通过 npx 并使用 Entra ID 服务主体即可运行。所有客户端配置见 docs/CLIENTS.md,所有环境变量见 .env.example。
Claude Code
claude mcp add azure -e AZURE_TENANT_ID="…" -e AZURE_CLIENT_ID="…" -e AZURE_CLIENT_SECRET="…" -e AZURE_SUBSCRIPTION_ID="…" -e AZURE_MODE="read-only" -- npx -y @dockndevai/mcp-azureClaude Desktop · Cursor · Windsurf
{
"mcpServers": {
"azure": {
"command": "npx",
"args": ["-y", "@dockndevai/mcp-azure"],
"env": {
"AZURE_TENANT_ID": "…",
"AZURE_CLIENT_ID": "…",
"AZURE_CLIENT_SECRET": "…",
"AZURE_SUBSCRIPTION_ID": "…",
"AZURE_MODE": "read-only"
}
}
}
}示例提示
"列出我的订阅中的所有资源组,以及每个资源组所在的区域"
"显示 rg-web 资源组中的所有资源"
"给 app-plan 资源加上 env=prod 和 owner=team-a 标签" (需要 read-write)
"停止 rg-ci 中的 build-agent VM" (需要 read-write)
从源码运行(开发模式)
npm install
npm run build
node dist/index.js # with the environment variables set开发
npm run dev
npm test # governance policy: modes, scoping, location allowlist, delete + confirmation
npm run typecheck发布
提供一个用于官方 MCP 注册表的 server.json,并通过 mcpName 对 npm 所有权进行验证。详见 PUBLISHING.md。
许可证
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides tools for listing and querying Azure resources directly from any MCP client, allowing you to efficiently browse your Azure infrastructure and analyze costs without leaving your workflow.3
- AlicenseNot gradedqualityDmaintenanceAn MCP server for interacting with Azure. Contains some common Compute and Networking actions, and extensible to add many more.1Apache 2.0
- AlicenseNot gradedqualityCmaintenanceAn MCP server that exposes core Azure services as read-mostly tools any MCP client can call, including Blob Storage, Key Vault, Service Bus, and Resource Manager.1MIT
- AlicenseAqualityBmaintenanceEnables natural-language queries about Azure resource compliance, including VM compliance, patch status, orphaned RBAC, and infrastructure health, through read-only MCP tools.3MIT
Related MCP Connectors
Remote MCP for Copilot CLI switch gate MCP, structured receipts, audit logs, and reviewer-ready evid
Remote MCP for A2A caller identity, scope policy, verdict receipts, and audit history.
The MCP server for Azure DevOps, bringing the power of Azure DevOps directly to your agents.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dockndevai/mcp-azure'
If you have feedback or need assistance with the MCP directory API, please join our Discord server