configure-canvas-mcp

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Configure the Canvas Authoring MCP Server

配置Canvas Authoring MCP服务器

This skill configures the Canvas Authoring MCP server for the user's current Power Apps coauthoring session. The MCP server is auto-registered by the plugin — this skill connects it to a specific app session.
本技能为用户当前的Power Apps协同编辑会话配置Canvas Authoring MCP服务器。MCP服务器由插件自动注册——本技能将其连接到特定的应用会话。

Instructions

操作说明

0. Check prerequisites

0. 检查前置条件

Verify that .NET 10 SDK or higher is installed:
bash
dotnet --list-sdks
If a version 10.x.y or higher is not listed, tell the user:
⚠️ .NET 10 SDK is required to run the Canvas Authoring MCP server. It looks like you don't have it installed. Please install it first to use this skill. https://dotnet.microsoft.com/download/dotnet/10.0
Then wait for the user to install it before continuing. If they say it's installed, run the command again to confirm. If it's still not found, repeat the message until they have it installed.
确认已安装.NET 10 SDK或更高版本:
bash
dotnet --list-sdks
如果未列出10.x.y或更高版本,请告知用户:
⚠️ 运行Canvas Authoring MCP服务器需要.NET 10 SDK。看起来您尚未安装,请先安装后再使用本技能。下载地址:https://dotnet.microsoft.com/download/dotnet/10.0
等待用户安装完成后再继续。如果用户表示已安装,请再次运行该命令确认。如果仍未检测到,请重复上述提示直至用户完成安装。

1. Ask for the studio URL

1. 请求工作室URL

Ask the user:
What is the URL of your canvas app studio session?
Copy the URL from the browser address bar while your app is open in Power Apps Designer (it should look like
https://make.powerapps.com/e/Default-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/canvas/?action=edit&app-id=...
).
Make sure coauthoring is enabled in the app (Settings → Updates → Coauthoring).
Keep this browser tab open for the entire session. The MCP server communicates with Power Apps through the coauthoring session tied to that tab. Closing the tab ends the coauthoring session, which prevents
compile_canvas
and
sync_canvas
from working and means you can't see or save generated changes.
向用户询问:
您的Canvas应用工作室会话URL是什么?
请在Power Apps Designer中打开应用时,从浏览器地址栏复制URL(格式应为
https://make.powerapps.com/e/Default-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/canvas/?action=edit&app-id=...
)。
请确保应用中已启用协同编辑功能(设置 → 更新 → 协同编辑)。
在整个会话期间保持此浏览器标签页打开。MCP服务器通过与该标签页绑定的协同编辑会话与Power Apps通信。关闭标签页会结束协同编辑会话,导致
compile_canvas
sync_canvas
无法正常工作,并且无法查看或保存生成的更改。

2. Extract parameters from the URL

2. 从URL中提取参数

Parse the following from the studio URL:
  • ENV_ID: the path segment between
    /e/
    and the next
    /
    (e.g.
    Default-91bee3d9-0c15-4f17-8624-c92bb8b36ead
    ).
  • APP_ID: URL-decode the
    app-id
    query parameter value, then take the last segment after the final
    /
    (e.g.
    6fc3e3d1-292b-4281-8826-577f78512e56
    )
  • MAKER_HOSTNAME: the hostname of the URL (e.g.
    make.powerapps.com
    )
  • CLUSTER_CATEGORY: determined from MAKER_HOSTNAME (see table below)
Determine CLUSTER_CATEGORY from MAKER_HOSTNAME:
MAKER_HOSTNAMECLUSTER_CATEGORY
make.powerapps.com
prod
make.preview.powerapps.com
prod
make.gov.powerapps.us
gov
make.high.powerapps.us
high
make.apps.appsplatform.us
dod
make.powerapps.cn
china
Any other hostname
test
Example:
Example URL:
https://make.powerapps.com/e/Default-91bee3d9-0c15-4f17-8624-c92bb8b36ead/canvas/?action=edit&app-id=%2Fproviders%2FMicrosoft.PowerApps%2Fapps%2F6fc3e3d1-292b-4281-8826-577f78512e56
  • ENV_ID →
    Default-91bee3d9-0c15-4f17-8624-c92bb8b36ead
  • APP_ID →
    6fc3e3d1-292b-4281-8826-577f78512e56
  • MAKER_HOSTNAME →
    make.powerapps.com
  • CLUSTER_CATEGORY →
    prod
从工作室URL中解析以下参数:
  • ENV_ID
    /e/
    与下一个
    /
    之间的路径段(例如
    Default-91bee3d9-0c15-4f17-8624-c92bb8b36ead
    )。
  • APP_ID:对
    app-id
    查询参数值进行URL解码,然后取最后一个
    /
    之后的段(例如
    6fc3e3d1-292b-4281-8826-577f78512e56
  • MAKER_HOSTNAME:URL的主机名(例如
    make.powerapps.com
  • CLUSTER_CATEGORY:根据MAKER_HOSTNAME确定(见下表)
根据MAKER_HOSTNAME确定CLUSTER_CATEGORY:
MAKER_HOSTNAMECLUSTER_CATEGORY
make.powerapps.com
prod
make.preview.powerapps.com
prod
make.gov.powerapps.us
gov
make.high.powerapps.us
high
make.apps.appsplatform.us
dod
make.powerapps.cn
china
其他任何主机名
test
示例:
示例URL:
https://make.powerapps.com/e/Default-91bee3d9-0c15-4f17-8624-c92bb8b36ead/canvas/?action=edit&app-id=%2Fproviders%2FMicrosoft.PowerApps%2Fapps%2F6fc3e3d1-292b-4281-8826-577f78512e56
  • ENV_ID →
    Default-91bee3d9-0c15-4f17-8624-c92bb8b36ead
  • APP_ID →
    6fc3e3d1-292b-4281-8826-577f78512e56
  • MAKER_HOSTNAME →
    make.powerapps.com
  • CLUSTER_CATEGORY →
    prod

3. Configure the MCP server

3. 配置MCP服务器

Call the
configure
MCP tool to connect the server to the user's coauthoring session:
mcp__canvas-authoring__configure(
  environmentId: ENV_ID,
  appId: APP_ID,
  clusterCategory: CLUSTER_CATEGORY
)
If the call fails, report the error to the user and suggest checking that:
  1. The studio URL is correct and the browser tab is still open
  2. Coauthoring is enabled in the app settings
  3. .NET 10 SDK is correctly installed
调用
configure
MCP工具将服务器连接到用户的协同编辑会话:
mcp__canvas-authoring__configure(
  environmentId: ENV_ID,
  appId: APP_ID,
  clusterCategory: CLUSTER_CATEGORY
)
如果调用失败,请向用户报告错误,并建议检查以下内容:
  1. 工作室URL是否正确,且浏览器标签页仍处于打开状态
  2. 应用设置中是否已启用协同编辑
  3. .NET 10 SDK是否已正确安装

4. Confirm

4. 确认配置完成

Tell the user:
✅ Canvas Authoring MCP server configured for your coauthoring session.
You can now use Canvas App skills like
/canvas-app
to create or edit your app.
To verify the setup, try: "List available Canvas App controls" — this should invoke
list_controls
.
告知用户:
✅ Canvas Authoring MCP服务器已为您的协同编辑会话配置完成。
您现在可以使用
/canvas-app
等Canvas应用技能来创建或编辑您的应用。
如需验证设置,请尝试:“列出可用的Canvas应用控件”——这将调用
list_controls
功能。