ScreenshotNeo

BlogHow-to

How to Set Up an MCP Server with Power Automate

Learn the three supported ways to use MCP with Power Automate: PAC CLI locally, Copilot Studio with a remote server, and Process Mining.

By the ScreenshotNeo team1 October 20269 min read

Short answer: “Set up an MCP server with Power Automate” can mean three different things. You can run the Power Platform CLI’s built-in MCP server locally for development, connect an existing HTTPS MCP server to a Copilot Studio agent that can use Power Automate, or add a product-specific MCP connector such as Process Mining. Power Automate cloud flows do not automatically become a generic MCP server.

Choose the route that matches your goal:

Goal Use Transport Main requirement
Use PAC CLI capabilities from an IDE or assistant Route A: PAC CLI MCP Local stdio process .NET 10.0 or higher
Give an agent tools from your own remote MCP server Route B: Copilot Studio MCP tool Reachable HTTPS endpoint Server URL and its authentication
Query Process Mining from an agent Route C: Process Mining MCP connector Power Platform connector Process Mining license, environment, data and permissions

Route A: Run the built-in PAC CLI MCP server locally

Microsoft describes the integrated Power Platform CLI MCP server as intended for local development and testing. It exposes PAC CLI capabilities to an MCP-compatible client; it is not an internet-facing endpoint or a hosted cloud flow. See Microsoft’s PAC CLI MCP documentation.

Prerequisites

  • Install a current Power Platform CLI, or use the documented dnx option.
  • Install .NET 10.0 or higher.
  • Use an MCP-compatible client such as Visual Studio, Visual Studio Code or Claude Code.
  • Sign in to Power Platform with the accounts and tenant permissions required by the PAC commands you intend to run.

Start the server with PAC CLI

pac copilot mcp --run

Leave this process running while your client connects to it. To run the CLI tool without installing PAC CLI, Microsoft documents:

dnx Microsoft.PowerApps.CLI.Tool --yes copilot mcp --run

Register it in an MCP client

A stdio registration starts the process on demand. This example follows Microsoft’s documented shape:

{
  "servers": {
    "pac-mcp": {
      "type": "stdio",
      "command": "dnx",
      "args": [
        "Microsoft.PowerApps.CLI.Tool",
        "--yes",
        "copilot",
        "mcp",
        "--run"
      ]
    }
  }
}

Place the configuration where your client expects its mcp.json. Claude Code can be registered with its claude mcp add-json command, and Microsoft also provides Visual Studio Code setup guidance. The exact file location and registration command depend on the client version.

Try a first request

After the client reports that pac-mcp is connected, ask it to perform a read-only task first, such as showing AI-related tenant settings or listing Dataverse environments in a Markdown table. Review the proposed tool and parameters before allowing a write operation.

Route B: Connect an existing MCP server to a Copilot Studio agent

This route makes Copilot Studio the MCP client. The server runs somewhere reachable over HTTPS, while the agent exposes the server’s tools to its conversations and actions. Microsoft’s setup is documented in Add an MCP server to your agent and Connect your agent to an existing MCP server.

Prerequisites

  • An agent created in the new Copilot Studio experience.
  • An MCP server URL reachable from Copilot Studio. Use the transport and path your server documents; many implementations use HTTPS and a streamable MCP endpoint.
  • Credentials accepted by the server, such as OAuth or another configured authentication method.
  • Permission to create connections in the environment, plus Power Platform data policies that allow the required connector access.

Configure the connection

  1. Open the agent and select the Build tab.
  2. Choose Tools, then add a Model Context Protocol server.
  3. Enter a descriptive name and description.
  4. Enter the server’s HTTPS endpoint and configure its authentication.
  5. Authorize the connection. Copilot Studio contacts the server, negotiates the protocol handshake, and lists the tools it exposes.
  6. Review tool names and descriptions. Save the tool and test it in Preview before publishing.

Microsoft’s standard harness also lets you turn off Allow all and select individual tools. Start with the smallest tool set needed by the agent. Treat tool descriptions as part of your security review: they influence when an agent may select a tool, but they do not replace server-side authorization.

Custom connector option

Microsoft separately documents custom connectors for existing MCP servers. Its sample specification uses an HTTPS /mcp endpoint and the x-ms-agentic-protocol: mcp-streamable-1.0 header. Connector files can be managed from the Power Apps or Power Automate portal. This configures connectivity to a server; it does not turn a cloud flow into a generic MCP host.

Route C: Use the Process Mining MCP connector (preview)

Process Mining is a product-specific connector route documented by Microsoft as a preview. It exposes Process Mining analytics to MCP-compatible clients such as Copilot Studio. Read the Process Mining MCP server reference before depending on it in production.

Prerequisites

  • An active Process Mining license.
  • A configured Power Platform environment with at least one process ingested.
  • Azure AD authentication.
  • An MCP-compatible client, such as a Copilot Studio agent.
  • Process Mining and environment permissions for the signed-in user.

Add Process Mining to an agent

  1. Establish the Process Mining connector connection in the target environment.
  2. Open the Copilot Studio agent’s Tools page.
  3. Select Add a tool, then Connector.
  4. Find Process Mining and add the Process Mining MCP tool.
  5. Choose the correct environment and verify that the connection is active.
  6. Preview the agent and test a read-only analytics question.

The preview reference describes tools for discovering processes and retrieving process details, attributes, metrics, bottlenecks, variants, cases, edges, correlation analysis and filtered results. Longer queries can be asynchronous and can emit server-sent progress updates. The reference currently describes nine tools, but preview tool lists can change.

How authentication, policy and permissions fit together

MCP does not bypass Power Platform security. A successful setup requires all of these layers to agree:

  • Server authentication: the credentials or Entra sign-in accepted by the MCP server.
  • Connection ownership: the user or connection used by Copilot Studio or the connector.
  • Environment access: permissions to the selected Power Platform environment and its data.
  • Tool policy: Power Platform data policies can restrict MCP connector use.
  • Server authorization: the MCP server must enforce access to each tool and resource.

A connector cannot grant access that the signed-in user does not already have. Named connectors also have their own availability and region limits. For example, Microsoft lists Dynamics 365 CX MCP, Sentinel MCP and Box MCP as connector-specific offerings with preview or regional restrictions; check the live connector page for your tenant.

Common errors and fixes

Error or symptom Likely cause Fix
pac copilot mcp is not recognized PAC CLI is missing or not on PATH. Install or update Power Platform CLI, reopen the terminal, then run pac --version.
DNX cannot run the tool .NET is missing or below the documented version. Install .NET 10.0 or higher and confirm with dotnet --version.
Client shows a disconnected stdio server Wrong command, argument order or working directory. Run the exact command in a terminal first, then copy the same command and arguments into the client configuration.
Copilot Studio cannot reach the server The endpoint is private, blocked, uses the wrong path or does not support the expected MCP transport. Use a reachable HTTPS URL, verify the MCP endpoint path and confirm the server supports the transport required by the Copilot Studio documentation.
Handshake succeeds but no tools appear The server returned no tools, returned an invalid schema, or the connection identity lacks permission. Inspect server logs, validate the MCP response, and authorize the connection with an account that can list tools.
401 or 403 response Expired credentials, wrong OAuth audience/scope or insufficient permissions. Reconnect, verify scopes and tenant consent, then test the same identity directly against the server.
Connector is missing from the catalog Preview, region, licensing or tenant policy limitation. Check the connector’s current availability page, environment region, licensing and data policies.
Process Mining connection failure The connector connection is inactive or points at the wrong environment. Reauthenticate the connection, select the environment containing ingested process data and confirm Process Mining permissions.
Agent calls an unsafe or unexpected tool All tools are enabled and descriptions are too broad. Disable Allow all, enable only required tools and add server-side authorization and confirmation for writes.

Performance, reliability and operating cost

Local PAC CLI

  • Startup time includes launching the .NET process and authenticating PAC CLI.
  • Availability depends on the developer machine, terminal session and local network.
  • Use a reproducible client configuration and pin the CLI/tool versions used by a team.
  • Run read-only discovery before write operations so failures are easier to diagnose.

Remote MCP and connectors

  • Keep the endpoint close to the systems it calls and return bounded results; large tool responses increase agent latency and token usage.
  • Use timeouts, retries with backoff and idempotency for operations that may be repeated.
  • Log request IDs, authenticated principal, tool name, duration and result status without storing secrets.
  • Expect preview connectors, regional coverage and tool schemas to change. Recheck the documentation before a production rollout.
  • Power Automate licensing, Copilot Studio licensing, Process Mining licensing and any underlying service charges are separate from the MCP protocol itself. Confirm the current terms for your tenant.

Where ScreenshotNeo fits

If an MCP tool needs website images for documentation, visual regression, agent research or reports, you can expose a screenshot service instead of maintaining browser automation. ScreenshotNeo provides a website screenshot API and MCP server. It accepts one GET request and returns PNG, JPEG, WebP or PDF.

Or skip the browser setup

ScreenshotNeo handles browser capture behind one API call. Cookie and consent banners are accepted and removed before capture, along with more than 60 known consent platforms, newsletter popups and chat widgets. Bot checks, blank pages, timeouts, failed loads and cache hits are not billed; the response identifies the result with X-Page-Verdict and X-Billed headers. Its MCP server provides take_screenshot, get_page_info and capture_pdf tools for Claude, Cursor and other MCP clients.

Read the ScreenshotNeo API documentation for the complete option list, including full-page capture, CSS selectors, device presets, dark mode, custom CSS and JavaScript, waits, request blocking, headers, cookies, geolocation, PDF settings, caching, signed links, asynchronous jobs and bulk capture.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

There is a free plan with 1,000 screenshots per month and no card. Paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.

Decision checklist

  • Are you running tools on a developer machine? Use PAC CLI MCP.
  • Does an agent need a server you already host? Add the HTTPS MCP server in Copilot Studio.
  • Do you need Process Mining analytics? Use its preview connector and meet its license and data prerequisites.
  • Have you confirmed endpoint transport, authentication, environment, permissions, data policies and region?
  • Have you limited enabled tools and tested in Preview before publishing?

FAQ

Can Power Automate host any MCP server?

Not through a general cloud-flow switch. Microsoft documents local PAC CLI hosting, Copilot Studio connections to reachable servers and named connectors. A custom connector configures access to an existing server.

Does PAC CLI MCP require Copilot Studio?

No. PAC CLI MCP is a local stdio server for an MCP-compatible developer client. Copilot Studio is the client path for a remote server or a connector.

Is Process Mining MCP generally available?

Microsoft documents it as a preview. Licensing, environment data, Azure AD and permissions are required, and the tool surface may change.

Can I expose write actions to an agent?

Technically, if the server and connector support them. In practice, enable only necessary tools, enforce authorization on the server and require confirmation for consequential writes.

How do I verify which route I configured?

A local PAC process uses stdio and a command such as pac copilot mcp --run. A remote setup has an HTTPS MCP URL in Copilot Studio. A product connector appears in the connector catalog and uses its documented licensing and region rules.