Mcp Azure

io.github.dockndevai由 GitHub 帳號 dockndevai 發布v0.3.0更新於 Oct 24, 2026

Azure Resource Manager inventory & ops for AI agents — governed, confirmation-gated.

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理透過 Azure Resource Manager 盤點並操作 Azure 資源,具備存取模式、允許清單與確認機制。

可以做什麼
列出訂閱、位置、資源群組與資源,並依 ARM id 取得任一資源(唯讀模式以上)。在核准區域建立資源群組、為資源合併標籤,以及啟動、停止、重新啟動或解除配置虛擬機器(讀寫模式以上)。刪除資源群組與個別資源,需管理員模式、刪除開關與輸入名稱確認。內建治理:存取模式、訂閱與資源群組允許清單、受保護資源群組、位置允許清單、試執行與寫入 stderr 的 JSON 稽核記錄。
適用情境
適合讓助理在聊天用戶端中檢視或管理 Azure 基礎設施,例如列出資源群組、為資源加上標籤或停止虛擬機器,同時把代理限制在既定界線內。僅需盤點時使用唯讀模式即可。
執行需求
透過 npx 從 npm 套件在本機執行,需要 Node.js。需要 Entra ID 服務主體:AZURE_TENANT_ID、AZURE_CLIENT_ID 與 AZURE_CLIENT_SECRET,可選 AZURE_SUBSCRIPTION_ID 與 AZURE_MODE。需要連線至 Azure Resource Manager 的網路。僅支援桌面用戶端。
安裝前請注意
服務主體密鑰 AZURE_CLIENT_SECRET 是可存取 Azure 的憑證,應盡量縮小其角色權限。讀寫與管理員模式可建立、加標籤、開關機並刪除真實 Azure 資源,刪除需同時啟用 AZURE_ALLOW_DELETE 與管理員模式。除非確有需要,保持預設唯讀模式、允許清單與確認機制。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mcp Azure,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

mcp-azure

[CI] [License: MIT] [npm]

A Model Context Protocol server for Azure (via the Azure Resource Manager API — the programmatic layer behind the Azure Portal). It lets an MCP-capable client (Claude Desktop, Claude Code, Cursor, Codex, …) inventory and operate Azure resources — with a governance layer that keeps an AI agent inside safe boundaries.

What this offers

  • Inventory — list subscriptions, locations, resource groups, and resources; get any resource by ARM id.
  • Operations — create resource groups (in approved regions), merge tags onto any resource, and control VM power state (start / stop / restart / deallocate).
  • Lifecycle — delete resource groups and individual resources, guarded.
  • Governance built in — access modes, subscription/resource-group allowlists, protected resource groups, a location allowlist for new groups, delete gating, typed confirmation for high-impact deletes, dry-run, and JSON audit logging.

Governance & security model

ConcernFlagDefaultEffect
What can the server do?AZURE_MODEread-onlyread-only → inventory; read-write → create RG, tag, VM power; admin → deletes. Tools above the mode are never registered.
Which subscriptions?AZURE_SUBSCRIPTION_ALLOWLIST(all)Operations on other subscriptions are refused.
Which resource groups?AZURE_RESOURCE_GROUP_ALLOWLIST(all)Operations outside the list are refused.
Read-only-forever groupsAZURE_PROTECTED_RESOURCE_GROUPS(none)Readable, never mutable.
Approved regionsAZURE_LOCATION_ALLOWLIST(any)New resource groups may only be created here.
Can it delete?AZURE_ALLOW_DELETEfalseDeletes need this and admin mode.
Typed confirmationAZURE_REQUIRE_CONFIRMATIONtrueDeletes require confirm to equal the target name — not just a boolean.
PreviewAZURE_DRY_RUNfalseWrite/admin tools validate + log intent, then return.
Audit trailAZURE_AUDIT_LOGtrueJSON line to stderr per guarded operation.
Interactive confirmation(automatic)—Destructive & high-impact actions prompt the human to approve via MCP elicitation before running; clients without elicitation fall back to the *_ALLOW_* gate.

Tools

Read (read-only+): list_subscriptions, list_locations, list_resource_groups, list_resources, get_resource

Write (read-write+): create_resource_group, tag_resource, control_vm

Admin (admin): delete_resource_group, delete_resource (both need AZURE_ALLOW_DELETE + typed confirm)

Quickstart — add to your agent

Published on npm as @dockndevai/mcp-azure. Runs via npx with an Entra ID service principal. See docs/CLIENTS.md for every client and .env.example for all variables.

Claude Code

bash
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

json
{  "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"      }    }  }}

Example prompts

  • "List all resource groups in my subscription and which region each is in"
  • "Show every resource in the rg-web group"
  • "Tag the app-plan resource with env=prod and owner=team-a" (needs read-write)
  • "Stop the build-agent VM in rg-ci" (needs read-write)

Run from source (development)

bash
npm installnpm run buildnode dist/index.js   # with the environment variables set

Develop

bash
npm run devnpm test          # governance policy: modes, scoping, location allowlist, delete + confirmationnpm run typecheck

Publishing

Ships a server.json for the official MCP registry and an mcpName for npm ownership validation. See PUBLISHING.md.

License

MIT

來源:README.md,提交 1a5bb0c

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

2
  1. v0.3.0最新Sep 29, 2026
  2. v0.2.2Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分