microsoft/setup
Set up Power Automate CLI prerequisites. Use when the user is new, something isn't working, or they need help getting started.
npx skills add https://github.com/microsoft/power-platform-skills --skill setup
You are helping a non-technical user get the Power Automate plugin working for the first time. Be friendly, use plain language, and never assume they know terminal commands. Walk them through each step one at a time.
Run silently:
node --version 2>&1
v18.x.x or higher): Tell them "Node.js is installed" and move on.brew install node" (or direct them to nodejs.org)node --version.Run silently:
az --version 2>&1
winget install Microsoft.AzureCLI" or direct them to https://aka.ms/installazurecliwindowsbrew install azure-cli"az --version.Check if they're already logged in:
az account show --output json 2>&1
user.name field) and ask if that's the right account. az login
This will open their browser. Tell them: "A browser window should open. Sign in with your work account — the one you use for Power Automate."
After login completes, confirm it worked by running az account show again.
Verify token access — this catches permission issues early:
az account get-access-token --resource https://service.flow.microsoft.com --output json 2>&1
The plugin talks to Power Automate through the FlowAgent MCP server, which is
launched automatically from the plugin's .mcp.json via a small Node
bootstrap that resolves PLUGIN_ROOT / CLAUDE_PLUGIN_ROOT and imports
server/mcp.mjs.
flowagent-* / mcp__flowagent__* tools appear in your tool list: tellthem "The Power Automate tools are connected" and move on.
confirmation before fixing:
Tell them: "The FlowAgent MCP server isn't wired up yet. I can fix this
by adding it to your ~/.copilot/mcp-config.json. Shall I go ahead?"
If they confirm, fix it:
node -e "const fs=require('fs'),p=require('path'),d=p.join(process.env.HOME||process.env.USERPROFILE,'.copilot','installed-plugins');try{const find=(dir)=>{for(const e of fs.readdirSync(dir,{withFileTypes:true})){const f=p.join(dir,e.name);if(e.isDirectory())try{const r=find(f);if(r)return r}catch{}if(e.name==='mcp.mjs'&&dir.split(p.sep).includes('power-automate'))return dir}return null};const r=find(d);if(r)console.log(JSON.stringify({found:true,serverDir:r,mcpMjs:p.join(r,'mcp.mjs')}));else console.log(JSON.stringify({found:false}))}catch(e){console.log(JSON.stringify({found:false,error:e.message}))}"
~/.copilot/mcp-config.json, add the flowagent MCPentry, and write it back:
node -e "const fs=require('fs'),p=require('path');const cfgPath=p.join(process.env.HOME||process.env.USERPROFILE,'.copilot','mcp-config.json');let cfg;try{cfg=JSON.parse(fs.readFileSync(cfgPath,'utf8'))}catch{cfg={mcpServers:{}}};if(!cfg.mcpServers)cfg.mcpServers={};if(cfg.mcpServers.flowagent){console.log('already registered');process.exit(0)}const pluginDir=p.join(process.env.HOME||process.env.USERPROFILE,'.copilot','installed-plugins');const find=(dir)=>{for(const e of fs.readdirSync(dir,{withFileTypes:true})){const f=p.join(dir,e.name);if(e.isDirectory())try{const r=find(f);if(r)return r}catch{}if(e.name==='mcp.mjs'&&dir.split(p.sep).includes('power-automate'))return dir}return null};const srvDir=find(pluginDir);if(!srvDir){console.log('mcp.mjs not found');process.exit(1)}const mcpPath=p.join(srvDir,'mcp.mjs');cfg.mcpServers.flowagent={command:'node',args:[mcpPath]};fs.writeFileSync(cfgPath,JSON.stringify(cfg,null,2)+'\n');console.log('registered flowagent MCP at '+mcpPath)"
/restart, Claude Code:restart the process). After restart, flowagent-* tools should appear.
plugin first:
/plugin marketplace add microsoft/power-platform-skills
/plugin install power-automate@power-platform-skills
Then run /setup again.
Verify everything works end-to-end by listing the user's environments:
list_environments tool.node <path-to-plugin>/server/mcp.mjsto confirm the bundled MCP server starts cleanly, then fix the plugin install
or .mcp.json wiring before retrying.
as the default (the set_current_env tool, or ask "set my default
environment to <name>").
/browse-flows — Browse your flows/create-flow — Create a new flow/debug-flow — Fix a broken flowTake microsoft/setup from the repository into ~/.claude/skills for personal
use, or into .claude/skills inside a project.
The agent identifies a skill by the name field in its header. Two skills with the
same name cannot sit side by side — one of them will be ignored.
The instructions reference brew.
Without those the skill loads but fails at the first command.