Mcp Power Automate

io.github.kaael1由 GitHub 帳號 kaael1 發布v0.4.1更新於 Nov 3, 2026

Local MCP for Power Automate with browser-backed auth, target locking, review diff, and rollback.

概覽

AI 產生的概覽

本機 MCP 伺服器加上 Chromium 擴充功能,透過已登入的瀏覽器工作階段,讓助理檢視、編輯、驗證、執行並還原 Microsoft Power Automate 雲端流程。

可以做什麼
  • 偵測並鎖定目標流程、列出流程並讀取流程定義
  • 預覽、驗證、儲存、檢視差異並還原流程更新
  • 檢視近期執行、最新執行詳情與動作層級失敗,並等待執行完成
  • 叫用安全的手動或請求觸發流程,並取得觸發回呼網址
  • 列出非受控 Dataverse 解決方案、其元件與環境變數,將現有流程加入解決方案並在解決方案中建立空白流程
  • 建立與複製流程
適用情境
適合想讓 AI 用戶端參與實際 Power Automate 雲端流程工作的情況:讀取流程、做小幅且可審閱的修改、排查失敗的執行、測試觸發程序,或把流程整理進 Dataverse 解決方案,且不想設定 Microsoft Entra 應用程式註冊。
執行需求
透過 npx 從 npm 套件在本機執行,需要 Node.js。需要 Chrome 或 Edge 等 Chromium 瀏覽器,並在開發人員模式下載入隨套件提供的擴充功能,且已登入 Power Automate。本機橋接服務監聽 127.0.0.1:17373,可用 POWER_AUTOMATE_BRIDGE_PORT 變更。
安裝前請注意
擴充功能會從瀏覽器工作階段擷取 Power Automate、Power Platform/BAP 與 Dataverse 權杖,瀏覽器工作階段即為即時授權來源,權杖保留在本機。寫入類工具可儲存流程變更、建立或複製流程、將流程加入解決方案並叫用觸發程序,可能啟動實際執行;請先預覽、驗證並檢視差異,並優先使用測試或預備環境的流程。解決方案寫入僅限將流程加入非受控解決方案。

安裝

在 SourceWeft 中

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

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

其他 MCP 客戶端

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

README

[MCP Power Automate cover: inspect, validate, edit, and revert Power Automate flows with an MCP agent]

MCP Power Automate

Local-first MCP server and Chromium extension for AI-assisted Microsoft Power Automate work.

Use your existing logged-in browser session to let an MCP client inspect, validate, edit, run, review, and revert Power Automate cloud flows. No Microsoft Entra ID app registration, admin consent flow, or custom enterprise application setup is required to get started.

Early public signal: 15,000+ LinkedIn post views and 14 GitHub stars while the project is still small, practical, and moving fast.

Why It Exists

Power Automate is powerful, but AI agents need more than raw convenience before they should touch real flows. This project keeps the workflow visible and reversible:

  • The browser extension captures the active Power Automate context and compatible tokens from your own Chromium session.
  • The MCP server exposes a v1 command surface for targeting, reading, previewing, validating, saving, run inspection, and rollback.
  • The extension stays mostly passive: status, diagnostics, and review surfaces instead of mystery buttons that hide what changed.
  • Local state, snapshots, and backups stay on your machine.

What It Can Do

AreaCapabilities
ContextDetect browser-captured flows, list flows, and explicitly lock onto a target flow.
Safe editingRead the flow, preview the smallest candidate update, validate, save, review the diff, and revert.
DebuggingInspect recent runs, latest run details, and action-level failures.
TestingInvoke safe manual/request trigger flows and wait for the resulting run.
SolutionsList unmanaged Dataverse solutions, inspect solution components and environment variables, add existing flows, and create blank flows inside solutions.

Write operations are deliberately scoped. The MCP does not expose solution deletion, component deletion, managed-solution modification, environment-variable writes, or blind production edits as the default path.

Quickstart

Register the MCP in Codex:

powershell
codex mcp add power-automate-local -- npx -y @kaael1/mcp-power-automate

Find the packaged extension path:

powershell
npx -y @kaael1/mcp-power-automate extension-path

Load that folder in Chromium:

  1. Open chrome://extensions or edge://extensions.
  2. Enable Developer Mode.
  3. Choose Load unpacked.
  4. Select the folder printed by extension-path.

Then open or focus a Power Automate flow page. The extension captures the session and target context automatically.

Check readiness:

powershell
npx -y @kaael1/mcp-power-automate doctor

Recommended Agent Loop

For a supervised edit, ask your MCP client to follow this loop:

  1. doctor
  2. get_context
  3. connect_flow
  4. get_flow
  5. preview_flow_update
  6. validate_flow
  7. apply_flow_update
  8. get_last_update
  9. validate_flow again when available

For run inspection and manual/request trigger tests, use list_runs, get_latest_run, get_run, get_run_actions, wait_for_run, get_trigger_callback_url, and invoke_trigger.

For Dataverse solution work, use list_solutions, list_solution_components, list_environment_variables, add_flow_to_solution, and create_flow_in_solution. Solution writes are intentionally limited to adding cloud flows to unmanaged solutions.

Public v1 Tools

text
get_contextdoctorconnect_flowlist_flowslist_solutionslist_solution_componentslist_environment_variablesadd_flow_to_solutionget_flowpreview_flow_updatevalidate_flowapply_flow_updateget_last_updaterevert_last_updatelist_runsget_latest_runget_runget_run_actionswait_for_runget_trigger_callback_urlinvoke_triggercreate_flowcreate_flow_in_solutionclone_flow

Safety Model

  • Inspect with get_context, connect_flow, and get_flow before any write.
  • Preview with preview_flow_update before saving.
  • Validate before and after meaningful edits when Power Automate accepts validation.
  • Review get_last_update after save so the diff is visible.
  • Use revert_last_update when the saved result is wrong.
  • Prefer test or staging flows before production flows.

If Power Automate rejects a save because of a connection permission problem, the MCP reports CONNECTION_AUTHORIZATION_FAILED and waits for the user to fix that connection in Power Automate. If the service rejects a field such as retryPolicy, the MCP reports SCHEMA_VALIDATION_FAILED with the rejected member so the agent can correct the candidate flow instead of guessing.

Browser-Backed Auth

The extension can capture Power Automate, Power Platform/BAP, and Dataverse-audience tokens from your logged-in browser session. When those tokens are present, get_context and /health expose readiness details such as canManageSolutions.

This means the MCP can work without a new Microsoft Entra app registration, but it also means the browser session remains the live authority. If a token expires or a permission is missing, reopen or focus the relevant Power Automate, Power Apps, or Dataverse page and retry after capture.

HTTP Bridge

The local bridge listens on 127.0.0.1:17373.

  • GET /health is kept for simple probes.
  • GET /v1/health returns bridge identity and readiness.
  • GET /v1/context returns the same context used by the MCP.
  • GET /v1/commands lists the public v1 command surface.
  • POST /v1/commands/:name runs any public v1 command with a JSON body.

Only the process that owns the bridge port executes stateful work. If another process already owns the port, new MCP instances refuse to reuse it; stop the existing bridge process or choose a different POWER_AUTOMATE_BRIDGE_PORT.

Development

powershell
npm installnpm run typechecknpm run lintnpm run testnpm run buildnpm run pack:dry-run

For a local clone, prefer registering Codex against the built server from this checkout:

powershell
npm run build$nodePath = (Get-Command node).Source$serverPath = Join-Path (Get-Location) "dist/server/index.js"codex mcp add power-automate-local -- $nodePath $serverPath

If an older local entry exists, remove it first:

powershell
codex mcp remove power-automate-local

Load the browser extension from dist/extension after rebuilding. Runtime state lives in data/ and must not be committed.

Docs

Package Links

License

MIT. See LICENSE.

來源:README.md,提交 841ec1f

工具

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

版本歷史

1
  1. v0.4.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

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

  • 已宣告認證方式10 分

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

  • 已列出工具15 分

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

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