Local Power Automate MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Local Power Automate MCP Servershow me my recent flow runs"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Local Power Automate MCP Server
A self-hosted Model Context Protocol (MCP) server that lets an AI assistant (GitHub Copilot CLI, etc.) inspect and manage your Microsoft Power Automate cloud flows — and the Dataverse records behind them — directly from your own machine, using your own identity.
✅ Runs locally as a stdio subprocess of the MCP host (e.g. Copilot CLI).
✅ Authenticates with your
az loginsession (Azure CLI credential), falling back to an interactive browser sign-in.✅ No third-party SaaS — no flow data ever leaves your device. The process talks straight to
https://api.flow.microsoft.comand your environment's Dataverse Web API over HTTPS.✅ Safe by default — every write to Dataverse requires an explicit
confirm=True; without it you get a dry-run preview and nothing changes.
It was built as a privacy-safe alternative to hosted offerings that route your tenant's flow data through an external vendor's cloud.
Table of contents
Integrate with your MCP host — Copilot CLI, VS Code, Claude
Tool reference — what each of the 11 tools is for
How it works
The server exposes a set of tools to your MCP host. When the assistant calls a tool, the server:
Acquires a bearer token for the right API using your local Azure CLI login (tokens are cached per scope and refreshed automatically).
Calls one of two Microsoft APIs:
the Power Automate REST API (
https://api.flow.microsoft.com) for listing environments, flows, runs, and turning flows on/off; orthe environment's Dataverse Web API (
https://<org>.crm.dynamics.com/api/data/v9.2) for reading/updating environment variables and raw flow definitions.
Returns compact JSON (truncated if it would overflow the model's context).
Nothing runs at import time, so the server starts instantly and only prompts for auth on the first tool call.
Prerequisites
Python 3.10+ on your
PATH(python --version).Azure CLI installed and signed in — install, then run
az loginonce.Python packages (installed in Setup):
mcp,azure-identity,requests.An MCP host that launches stdio servers (e.g. GitHub Copilot CLI).
Setup
1. Get the code
git clone https://github.com/prasadgd9022/power-automate-mcp.git
cd power-automate-mcp2. Install dependencies
python -m pip install -r requirements.txt3. Sign in to Azure
az loginThe server requests a token for https://service.flow.microsoft.com/ (Flow API)
and, for the Dataverse skills, an org-scoped token for your environment — both
minted from this same session.
4. Register the server with your MCP host
Pick your host below and follow the matching steps in
Integrate with your MCP host. In every case you
point the host at the absolute path to server.py and run it over stdio.
There is also a
SETUP.mdwritten for an AI agent to perform this registration for you automatically in the Copilot CLI.
Integrate with your MCP host
This server is a standard stdio MCP server, so any MCP-capable client can run it. The launch command is always the same:
python <ABSOLUTE_PATH_TO>/power-automate-mcp/server.py --transport stdioReplace <ABSOLUTE_PATH_TO> with the folder where you cloned the repo, and use
whichever interpreter is on your PATH (python, py -3, or python3). On
Windows, escape backslashes in JSON — e.g.
"C:\\Users\\you\\power-automate-mcp\\server.py". In every client, if the config
file already exists, merge the power-automate entry into the existing
servers object rather than overwriting the file.
GitHub Copilot CLI
Config file:
Windows:
%USERPROFILE%\.copilot\mcp-config.jsonmacOS / Linux:
$HOME/.copilot/mcp-config.json
{
"mcpServers": {
"power-automate": {
"type": "stdio",
"tools": ["*"],
"command": "python",
"args": ["<ABSOLUTE_PATH_TO>/power-automate-mcp/server.py", "--transport", "stdio"]
}
}
}Then restart the Copilot CLI so it picks up the new server. Verify with
/mcp inside the CLI, which should list power-automate and its 11 tools.
VS Code (Copilot Chat — Agent mode)
VS Code discovers MCP servers from a workspace file at .vscode/mcp.json
(or your user settings.json under "mcp"). Note the key is servers, not
mcpServers:
// .vscode/mcp.json
{
"servers": {
"power-automate": {
"type": "stdio",
"command": "python",
"args": ["<ABSOLUTE_PATH_TO>/power-automate-mcp/server.py", "--transport", "stdio"]
}
}
}Save the file, then click Start on the server shown above the block (or run MCP: List Servers from the Command Palette). Open Copilot Chat, switch to Agent mode, and the 11 tools appear in the tools picker. Requires a recent VS Code with MCP support enabled.
Claude Desktop
Edit Claude Desktop's config (Settings → Developer → Edit Config, or open it directly):
Windows:
%APPDATA%\Claude\claude_desktop_config.jsonmacOS:
~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"power-automate": {
"command": "python",
"args": ["<ABSOLUTE_PATH_TO>/power-automate-mcp/server.py", "--transport", "stdio"]
}
}
}Fully quit and reopen Claude Desktop (not just close the window). The server
appears under the tools/plugin (🔌) icon in the chat box. If it fails to load,
use an absolute interpreter path (e.g. C:\\Python312\\python.exe or the output
of which python3) as command.
Claude Code (CLI)
Register it with one command (run from anywhere):
claude mcp add power-automate -- python <ABSOLUTE_PATH_TO>/power-automate-mcp/server.py --transport stdioCheck it registered with claude mcp list, then use /mcp inside a claude
session to confirm the tools are available.
Verify it works
From the repo folder:
python probe.pyExpected output (auth prompt may appear on first run):
TOOLS: ['check_auth', 'list_environments', 'list_flows', 'get_flow', 'get_flow_runs', 'get_flow_run_details', 'set_flow_state', 'get_environment_variable', 'update_environment_variable', 'get_flow_definition', 'update_flow_definition']
CHECK_AUTH_OK: { ... "authenticated": true, "environmentCount": N ... }If TOOLS prints but auth fails, the server is registered correctly and the
issue is just sign-in — run az login again.
Tool reference
11 tools. 8 are read-only; 3 write. All environment arguments are optional — omit them to use your default environment.
Read-only tools
Tool | What it's for | Key args |
| Confirm the server can authenticate and list the environments you can reach. Run this first. | – |
| List every Power Platform environment visible to your account (name, display name, default flag, region). | – |
| List cloud flows in an environment that you own or that are shared with you. |
|
| Get a flow's full definition from the Flow REST API (triggers, actions, connection references). |
|
| Get recent run history for a flow (status, start/end, error codes). Great for triage. |
|
| Get full details of a single run, including the error payload. |
|
| Read an environment variable's definition, default value, and per-environment current value (from Dataverse). Use before updating one to see the value id. |
|
| Read a flow's underlying Dataverse |
|
Write tools
Tool | What it's for | Key args |
| Enable ( |
|
| Update an environment variable's current value only (per-environment override) — the safe way to repoint a flow's function-app URL, connection string, etc. without editing the flow. The shared default is left untouched. |
|
| Advanced. Overwrite a flow's entire |
|
Example prompts
Once registered, you can ask your assistant things like:
"List my Power Automate environments."
"Show the last 10 runs for flow
<flow-id>and tell me why the failures failed.""Read the environment variable
contoso_ApiBaseUrlin my dev environment.""Repoint
contoso_ApiBaseUrltohttps://new-endpoint/...— preview first, then apply." (dry-run, thenconfirm=True)"Disable flow
<flow-id>."
Safety model
The three write tools are designed to be hard to misuse:
update_environment_variableandupdate_flow_definitionrequireconfirm=True. Called withconfirm=False(the default) they return a dry-run preview (old value → new value, or a validity check) and change nothing.update_environment_variableonly touches the per-environment current value. The shared default value — and therefore other environments such as Production — are left untouched. This makes it the preferred way to repoint a URL or connection string for a single environment.update_flow_definitionis the advanced escape hatch. It fully overwrites the flow'sclientdata(definition + connection references), so the string you pass must be complete and valid. Recommended flow:get_flow_definitionand keep the returnedclientdata,make your minimal edit to that JSON,
call with
confirm=Falseto preview / validate JSON,call with
confirm=Trueto apply.
set_flow_statesimply starts/stops a flow (no dry-run — enabling/disabling is easily reversible).
Configuration (env vars)
All optional — the defaults work for standard commercial Microsoft 365 tenants.
Variable | Default | Purpose |
| – | Supply a raw bearer token (skips CLI/browser). Advanced/CI. |
|
| Token scope for the Flow API. |
|
| Flow API host (change for sovereign clouds). |
|
| Flow API version. |
|
| Dataverse Web API version (write skills). |
|
| HTTP timeout in seconds. |
|
| Truncate oversized tool payloads. |
Troubleshooting
Could not acquire a token/ auth errors — runaz login, then retry. On Windows you can warm the cache withaz account get-access-token --scope https://service.flow.microsoft.com/.default.list_flowsreturns 0 flows — the Flow REST API only lists flows you own or are shared with. Flows owned by a service account or another user won't appear; reach them directly by id withget_flow/get_flow_definition.Dataverse tool says the environment has no linked instance — the write skills require a Dataverse-backed environment (most standard environments are).
403 Forbiddenfrom Dataverse — your account lacks permission on that environment's Dataverse org; this is expected for environments you can't administer.
Uninstall
Remove the power-automate block from your MCP host's config
(~/.copilot/mcp-config.json for Copilot CLI), restart the host, and delete this
folder.
License
MIT.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/prasadgd9022/power-automate-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server