{
  "markdown": "<p align=\"center\">\n  <img src=\"./assets/readme-cover.png\" alt=\"MCP Power Automate cover: inspect, validate, edit, and revert Power Automate flows with an MCP agent\" width=\"720\" />\n</p>\n\n# MCP Power Automate\n\nLocal-first MCP server and Chromium extension for AI-assisted Microsoft Power Automate work.\n\nUse 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.\n\n> Early public signal: 15,000+ LinkedIn post views and 14 GitHub stars while the project is still small, practical, and moving fast.\n\n## Why It Exists\n\nPower 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:\n\n- The browser extension captures the active Power Automate context and compatible tokens from your own Chromium session.\n- The MCP server exposes a v1 command surface for targeting, reading, previewing, validating, saving, run inspection, and rollback.\n- The extension stays mostly passive: status, diagnostics, and review surfaces instead of mystery buttons that hide what changed.\n- Local state, snapshots, and backups stay on your machine.\n\n## What It Can Do\n\n| Area | Capabilities |\n| --- | --- |\n| Context | Detect browser-captured flows, list flows, and explicitly lock onto a target flow. |\n| Safe editing | Read the flow, preview the smallest candidate update, validate, save, review the diff, and revert. |\n| Debugging | Inspect recent runs, latest run details, and action-level failures. |\n| Testing | Invoke safe manual/request trigger flows and wait for the resulting run. |\n| Solutions | List unmanaged Dataverse solutions, inspect solution components and environment variables, add existing flows, and create blank flows inside solutions. |\n\nWrite 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.\n\n## Quickstart\n\nRegister the MCP in Codex:\n\n```powershell\ncodex mcp add power-automate-local -- npx -y @kaael1/mcp-power-automate\n```\n\nFind the packaged extension path:\n\n```powershell\nnpx -y @kaael1/mcp-power-automate extension-path\n```\n\nLoad that folder in Chromium:\n\n1. Open `chrome://extensions` or `edge://extensions`.\n2. Enable Developer Mode.\n3. Choose `Load unpacked`.\n4. Select the folder printed by `extension-path`.\n\nThen open or focus a Power Automate flow page. The extension captures the session and target context automatically.\n\nCheck readiness:\n\n```powershell\nnpx -y @kaael1/mcp-power-automate doctor\n```\n\n## Recommended Agent Loop\n\nFor a supervised edit, ask your MCP client to follow this loop:\n\n1. `doctor`\n2. `get_context`\n3. `connect_flow`\n4. `get_flow`\n5. `preview_flow_update`\n6. `validate_flow`\n7. `apply_flow_update`\n8. `get_last_update`\n9. `validate_flow` again when available\n\nFor 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`.\n\nFor 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.\n\n## Public v1 Tools\n\n```text\nget_context\ndoctor\nconnect_flow\nlist_flows\nlist_solutions\nlist_solution_components\nlist_environment_variables\nadd_flow_to_solution\nget_flow\npreview_flow_update\nvalidate_flow\napply_flow_update\nget_last_update\nrevert_last_update\nlist_runs\nget_latest_run\nget_run\nget_run_actions\nwait_for_run\nget_trigger_callback_url\ninvoke_trigger\ncreate_flow\ncreate_flow_in_solution\nclone_flow\n```\n\n## Safety Model\n\n- Inspect with `get_context`, `connect_flow`, and `get_flow` before any write.\n- Preview with `preview_flow_update` before saving.\n- Validate before and after meaningful edits when Power Automate accepts validation.\n- Review `get_last_update` after save so the diff is visible.\n- Use `revert_last_update` when the saved result is wrong.\n- Prefer test or staging flows before production flows.\n\nIf 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.\n\n## Browser-Backed Auth\n\nThe 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`.\n\nThis 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.\n\n## HTTP Bridge\n\nThe local bridge listens on `127.0.0.1:17373`.\n\n- `GET /health` is kept for simple probes.\n- `GET /v1/health` returns bridge identity and readiness.\n- `GET /v1/context` returns the same context used by the MCP.\n- `GET /v1/commands` lists the public v1 command surface.\n- `POST /v1/commands/:name` runs any public v1 command with a JSON body.\n\nOnly 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`.\n\n## Development\n\n```powershell\nnpm install\nnpm run typecheck\nnpm run lint\nnpm run test\nnpm run build\nnpm run pack:dry-run\n```\n\nFor a local clone, prefer registering Codex against the built server from this checkout:\n\n```powershell\nnpm run build\n$nodePath = (Get-Command node).Source\n$serverPath = Join-Path (Get-Location) \"dist/server/index.js\"\ncodex mcp add power-automate-local -- $nodePath $serverPath\n```\n\nIf an older local entry exists, remove it first:\n\n```powershell\ncodex mcp remove power-automate-local\n```\n\nLoad the browser extension from `dist/extension` after rebuilding. Runtime state lives in `data/` and must not be committed.\n\n## Docs\n\n- [Launch kit](docs/launch-kit.md)\n- [Multi-provider distribution](docs/multi-provider-distribution.md)\n- [Publishing](PUBLISHING.md)\n- [Codex skill bundle](skills/power-automate-mcp/README.md)\n\n## Package Links\n\n- GitHub: https://github.com/kaael1/mcp-power-automate\n- npm: https://www.npmjs.com/package/@kaael1/mcp-power-automate\n- MCP Registry: https://registry.modelcontextprotocol.io/v0/servers?search=io.github.kaael1/mcp-power-automate\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n",
  "bytes": 6987,
  "sha": "23d7bb341f5f38c3765b0d52d36116808194b0f943e01d615841f75fa614b8cd",
  "repo_slug": "kaael1/mcp-power-automate",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_kaael1_mcp_power_automate_648313b9/readme"
}