Skip to main content
Glama
andrewcharlwood

power-automate-mcp

README.md
# power-automate-mcp

An MCP server for **Microsoft Power Automate** (cloud flows), driven entirely by the Azure CLI (`az rest`). It is the Power Automate sibling of [`microsoft-planner-mcp`](https://github.com/vyente-ruffin/microsoft-planner-mcp/) and uses the same `azRest` pattern.

## Why `az rest`?

The Azure CLI can mint tokens for both because you authorize **as yourself acting on your own flows**. Every call goes through `az rest`, which is CAE (conditional-access aware), so the only prerequisite is a logged-in Azure CLI:

```
az login
```

## Build

```
npm install
npm run build      # tsc -> dist/index.js
```

## Register with Claude Code

Either add a project-scoped `.mcp.json`:

```json
{
  "mcpServers": {
    "power-automate": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/power-automate-mcp/dist/index.js"],
      "env": { "POWER_AUTOMATE_ENV": "<your-default-environment-id>" }
    }
  }
}
```

…or globally with the CLI:

```
claude mcp add power-automate -s user -- node /path/to/power-automate-mcp/dist/index.js
```

`POWER_AUTOMATE_ENV` is optional: set it to a default environment id so the flow tools can be called without repeating it. Discover ids with `list-environments`.

## Tools

**Environments**
- `list-environments` — all environments you can access (use `name` as the `environment` arg)

**Flows**
- `list-flows` — flows in an environment (name, display name, state)
- `get-flow` — full flow record (definition + connectionReferences)
- `get-flow-definition` — just the workflow definition (triggers + actions)
- `create-flow` — create a flow from a definition (+ optional connectionReferences)
- `update-flow` — PATCH a flow's full `properties`
- `enable-flow` / `disable-flow` — start / stop a flow's triggers
- `delete-flow` — delete a flow

**Triggers / on-demand runs**
- `list-flow-triggers` — a flow's triggers (name + type)
- `run-flow` — trigger a flow on demand (`manual` or `Recurrence`, etc.)

**Run history / diagnostics**
- `list-runs` — recent runs (status, start/end, error) — a health probe
- `get-run` — one run's full record
- `list-run-actions` — per-action results + inputs/outputs SAS links

**Connections**
- `list-connections` — connector connections (ids to build `connectionReferences`)

## Notes

- The flow internal `name` is a GUID (from `list-flows`), not the display name.
- `create-flow` / `update-flow` take the definition / properties as JSON **strings** (the Logic Apps workflow JSON is too freeform for a strict schema). A typical edit is: `get-flow` → tweak `properties` → `update-flow`.
- `connectionReferences` must bind to **existing** connector connections — the API will not mint OAuth connections for you. Connector-less flows (recurrence + HTTP) need none.

TDQS

A3.9/5.0

Scored across 15 tools

Disambiguation5/5

Each tool targets a distinct operation: CRUD on flows, enable/disable, listing flows/runs/connections/environments, and triggering. No overlap; get-flow and get-flow-definition serve different granularity needs.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with hyphens (e.g., create-flow, list-connections, run-flow). No mixed conventions or irregular names.

Tool Count5/5

15 tools is well-scoped for a Power Automate server, covering flow lifecycle, run inspection, environment/connection queries, and on-demand triggering without unnecessary duplication.

Completeness4/5

Covers full CRUD, enable/disable, flow run management, and environment/connection listing. Missing only connection creation (by design) and potentially flow sharing or permissions, but core flow operations are complete.

Maintenance

ActivityInactive
ResponsivenessNo issues