Skip to main content
Glama

mcp-azure

CI License: MIT npm

一个适用于 AzureModel 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

治理与安全模型

关注点

标志

默认值

效果

服务器能做什么?

AZURE_MODE

read-only

read-only → 清点;read-write → 创建资源组、打标签、VM 电源;admin → 删除。超出当前模式的工具永不注册

允许哪些订阅?

AZURE_SUBSCRIPTION_ALLOWLIST

(all)

对其他订阅的操作将被拒绝。

允许哪些资源组?

AZURE_RESOURCE_GROUP_ALLOWLIST

(all)

对资源组白名单之外的操作将被拒绝。

一直只读的资源组

AZURE_PROTECTED_RESOURCE_GROUPS

(无)

可读,但永远不可修改。

允许的区域

AZURE_LOCATION_ALLOWLIST

(任意)

新的资源组只能在这些区域创建。

允许删除吗?

AZURE_ALLOW_DELETE

false

删除操作需要此开关 处于 admin 模式。

逐字确认

AZURE_REQUIRE_CONFIRMATION

true

删除操作要求 confirm 等于目标名称 —— 而不是一个布尔值。

演练(dry-run)

AZURE_DRY_RUN

false

读/写权限工具会校验并记录意图,然后返回。

审计轨迹

AZURE_AUDIT_LOG

true

每次受保护的操作都会向 stderr 写入一行 JSON。

工具

读(read-only+)list_subscriptionslist_locationslist_resource_groupslist_resourcesget_resource

写(read-write+)create_resource_grouptag_resourcecontrol_vm

管理(admindelete_resource_groupdelete_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-azure

Claude 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

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • F
    license
    Not graded
    quality
    D
    maintenance
    Provides 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
  • A
    license
    Not graded
    quality
    C
    maintenance
    An 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.
    1
    MIT

View all related MCP servers

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.

View all MCP Connectors

Latest Blog Posts

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