SP

synergy2test/powerautomate-mcp-docs

Developer tools
0 stars 7 forks Quality 66 Trend 0MIT

An MCP (Model Context Protocol) server that connects Claude to Microsoft Power Automate. Create, manage, and deploy Power Automate flows using natural language.

Overview

An MCP (Model Context Protocol) server that connects Claude to Microsoft Power Automate. Create, manage, and deploy Power Automate flows using natural language. - - Build flows from natural language descriptions with guided wizard - - Automatic testing with intelligent error diagnosis - - Pre-flight checks with best practices scoring (0-100) - - List, update, clone, and delete flows - - Interactive Power Automate expression reference - - Full knowledge of 400+ connectors and schemas - - Works on Windows, macOS, and Linux - Node.js 20+ - Microsoft 365 work account with Power Automate access - Azure AD app registration (see below) - : libsecret for secure token storage This interactive wizard will: 1. Sign you in via browser 2. Discover your Power Automate environments 3. Create the configuration file : ~/Library/Application Support/Claude/claude_desktop_config.json : %APPDATA%\Claude\claude_desktop_config.json : ~/.config/Claude/claude_desktop_config.json Restart Claude.

README

Power Automate MCP Server

An MCP (Model Context Protocol) server that connects Claude to Microsoft Power Automate. Create, manage, and deploy Power Automate flows using natural language.

Features

  • Create Flows - Build flows from natural language descriptions with guided wizard
  • Test & Debug - Automatic testing with intelligent error diagnosis
  • Validate - Pre-flight checks with best practices scoring (0-100)
  • Manage Flows - List, update, clone, and delete flows
  • Expression Help - Interactive Power Automate expression reference
  • Connector Intelligence - Full knowledge of 400+ connectors and schemas
  • Cross-Platform - Works on Windows, macOS, and Linux

Installation

Prerequisites

  • Node.js 20+
  • Microsoft 365 work account with Power Automate access
  • Azure AD app registration (see below)
  • Linux only: libsecret for secure token storage
    # Ubuntu/Debian
    sudo apt-get install libsecret-1-dev gnome-keyring
    
    # Fedora/RHEL
    sudo dnf install libsecret-devel gnome-keyring
    

Install from npm

npm install -g powerautomate-mcp

First-Time Setup

powerautomate-mcp --setup

This interactive wizard will:

  1. Sign you in via browser
  2. Discover your Power Automate environments
  3. Create the configuration file

Register with Claude

Add to your Claude configuration:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json Linux: ~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "powerautomate": {
      "command": "powerautomate-mcp"
    }
  }
}

Restart Claude. The Power Automate tools will appear automatically.


Azure AD App Registration (Required)

Before using this MCP server, an Azure AD app registration must be configured in your tenant. This requires Global Administrator or Application Administrator role.

Who Needs to Do This?

Role Action Required
IT Admin / Global Admin Create app registration, grant admin consent
End Users Just run powerautomate-mcp --setup after admin completes setup
# Requires: Azure CLI (https://aka.ms/installazurecli)
# Requires: Global Admin or Application Administrator role

az login
./scripts/Register-PublishedApp.ps1

The script will:

  1. Create the app registration
  2. Configure required permissions
  3. Output the admin consent URL

Option 2: Manual Setup

  1. Go to Azure Portal > Microsoft Entra ID > App registrations > New registration

  2. Configure basic settings:

    • Name: Power Automate MCP
    • Supported account types: Accounts in any organizational directory (multi-tenant)
    • Redirect URI: Select “Public client/native” and enter:
      https://login.microsoftonline.com/common/oauth2/nativeclient
      
  3. After creation, go to Authentication and enable:

    • Allow public client flows: Yes
  4. Go to API permissions > Add a permission and add:

    API Permission Type
    Microsoft Graph User.Read Delegated
    Power Automate (Flow Service) Flows.Read.All Delegated
    Power Automate (Flow Service) Flows.Manage.All Delegated
  5. Click Grant admin consent for [Your Tenant] (requires admin role)

After creating the app, admin consent is required for users to authenticate:

https://login.microsoftonline.com/common/adminconsent?client_id=YOUR_CLIENT_ID

Replace YOUR_CLIENT_ID with the Application (client) ID from your app registration.


Usage Examples

Create a flow that sends me an email every morning with the weather forecast
Test my "Daily Report" flow and tell me if there are any errors
What connectors are available for working with SharePoint?
Help me write an expression to format a date as "January 1, 2024"

Available Tools

Core Flow Operations

Tool Description
list_flows List flows in an environment
get_flow Get full flow definition
create_flow Create a new flow
update_flow Modify an existing flow
delete_flow Delete a flow
toggle_flow Enable or disable a flow
clone_flow Copy flow to another environment

Testing & Debugging

Tool Description
test_flow Run flow with automatic diagnosis
run_flow Trigger a manual flow
get_runs Get flow run history
diagnose_flow Analyze failures with fix suggestions
validate_flow Validate with best practices score

Planning & Help

Tool Description
plan_flow Interactive flow planning wizard
build_flow Simple flow builder from description
get_expression_help Expression syntax reference
search_connectors Find connectors by name
get_action_schema Get connector action parameters

Security

This server implements security best practices:

  • Secure Token Storage: DPAPI (Windows), Keychain (macOS), libsecret (Linux)
  • Input Validation: OData injection protection, query sanitization
  • Error Sanitization: PII redacted from logs and error messages
  • No Plaintext Secrets: Tokens never stored in plaintext

Architecture

Claude  powerautomate-mcp  Power Automate APIs
                          |
                          +-- MSAL Auth (device code flow)
                          +-- SQLite Schema Cache (400+ connectors)
                          +-- Secure Token Storage (OS keychain)

License

MIT

Support

For issues and feature requests, please open an issue in this repository.

View the full README on GitHub

Install

This server does not publish a one-line install command.

Open the repository installation guide New to MCP? Start with the mcpskill.org guide →

Configuration

{ "mcpServers": { "powerautomate": { "command": "powerautomate-mcp" } } }