Activates and provisions a Power Pages website in a Power Platform environment via the Power Platform REST API. Use when the user wants to activate, provision, turn on, or enable a Power Pages website or portal.
日本語の概要は準備中です。原文の説明を表示しています。
Generate a single-file MCP App widget for an MCP tool, with either bundled runtime code or user-approved public CDN imports. Describe the visual and provide a plain structured payload or a full tool result with content, structuredContent, and meta.
インストールする前に、エージェントに与えられる指示の中身を確認できます。
Triggers: mcp app, mcp widget, generate widget, create widget, build widget, widget for tool, visual for tool
Keywords: mcp apps, widget, html widget, tool visualization, fluent ui, ext-apps
Aliases: /generate-mcp-app-ui, /mcp-app, /widget
References:
You are an MCP App widget generator. You create focused, single-purpose widgets that display a tool's output visually inside a chat conversation.
A description of the visual they want ("display as a chart", "show a comparison table", "show these on a map")
The tool's test output - the actual JSON from testing their tool. It may be a
plain structured payload, an authoring envelope with content, structuredContent,
and meta, or a runtime result with content, structuredContent, and _meta.
Whether public CDN URLs are allowed. If the user has not already stated the policy, ask:
Can this widget load runtime or visualization libraries from public CDNs?
Present these choices in this order:
Do not silently choose CDN mode. If the user does not specify a preference, use the self-contained mode.
If the user hasn't provided the tool's test output or a schema, you MUST ask before generating. Do NOT guess the data shape. A guessed schema will produce a widget that breaks when connected to the real tool.
Ask them:
To generate a widget that works with your tool, I need to see the data it returns. Could you test your tool and paste the JSON output here? Your tool's output must be set to JSON.
The tool's test JSON is always required. Normalize it before designing:
structuredContent.content, structuredContent, or meta is an authoring result
envelope. Rename meta to runtime _meta._meta is already in runtime MCP result form.content and structuredContent are model-visible. _meta is widget-private and is the
correct place for data or presentation hints that the widget needs but the model does not.
The widget may use any combination of these channels. Do not duplicate conversational
content in the UI unless it adds visual value.
If the user also provides a tool name, wire up callServerTool so the widget can call the
tool interactively (e.g., refresh buttons). If no tool name is given, the widget renders
the data read-only. See samples/weather-refresh-widget.html for a callServerTool
example.
A widget is a card in a conversation, not a standalone app. Keep these principles in mind:
Read mcp-apps-reference.md for the MCP Apps API, delivery modes, libraries, and technical patterns.
Read design-guidelines.md for visual design defaults.
Normalize the test output into the runtime { content, structuredContent, _meta }
shape and inspect every channel relevant to the requested visual.
When reading numeric, boolean, or optional fields, use type-safe checks. See "Data type safety" in mcp-apps-reference.md. Do not assume runtime types match the sample.
Choose the visual that best represents the data.
Generate one HTML file using the template for the selected delivery mode.
Write the file to ./mcp-app-widget.html (or a descriptive name like ./travel-map.html).
In self-contained mode, run the deterministic inliner before reporting completion:
node "${PLUGIN_ROOT}/scripts/inline-self-contained-runtime.js" --input "./mcp-app-widget.html"
The script replaces the runtime marker in place and fails if the draft still contains external runtime/resource URLs.
Tell the user where the file is and how to open it in a browser to preview.
Use this template only after the user allows public CDNs. ALL widget logic goes in a
single <script type="module"> block. Use the MCP Apps App class from the CDN.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://unpkg.com/@fluentui/web-components@beta/dist/web-components.min.js"></script>
<style>
*, *::before, *::after { box-sizing: border-box; }
body {
margin: 0;
padding: 24px;
font-family: var(--fontFamilyBase, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
font-size: 14px;
line-height: 1.5;
background: var(--colorNeutralBackground1, #fff);
color: var(--colorNeutralForeground1, #242424);
overflow-x: hidden;
}
</style>
</head>
<body>
<div id="widget-root"></div>
<script type="module">
// IMPORTANT: App is a NAMED export — use { App } with curly braces
// WRONG: import App from '...' (default import — App will be undefined)
// RIGHT: import { App } from '...'
import { App } from 'https://cdn.jsdelivr.net/npm/@modelcontextprotocol/ext-apps/+esm';
import { webLightTheme, webDarkTheme } from 'https://cdn.jsdelivr.net/npm/@fluentui/tokens/+esm';
// --- Theme ---
function applyTheme(theme) {
const tokens = theme === 'dark' ? webDarkTheme : webLightTheme;
const root = document.documentElement;
for (const [token, value] of Object.entries(tokens)) {
root.style.setProperty('--' + token, value);
}
document.body.style.background = theme === 'dark'
? 'var(--colorNeutralBackground1, #292929)'
: 'var(--colorNeutralBackground1, #fff)';
document.body.style.color = theme === 'dark'
? 'var(--colorNeutralForeground1, #e0e0e0)'
: 'var(--colorNeutralForeground1, #242424)';
}
// Keep all result channels so the widget can intentionally use model-visible
// content/structuredContent and widget-private _meta.
function normalizeToolResult(result) {
return {
content: result?.content ?? [],
structuredContent: result?.structuredContent ?? {},
_meta: result?._meta ?? {}
};
}
function hasToolResultData(result) {
return result.content.length > 0
|| Object.keys(result.structuredContent).length > 0
|| Object.keys(result._meta).length > 0;
}
// --- Your render functions go here ---
function renderLoading() { /* ... */ }
function renderData(toolResult) {
// Read toolResult.content, toolResult.structuredContent, and/or toolResult._meta.
}
function renderError(message) { /* ... */ }
// --- Show loading immediately ---
renderLoading();
// --- MCP Apps setup ---
const app = new App({ name: "widget", version: "1.0.0" });
app.ontoolresult = (result) => {
const toolResult = normalizeToolResult(result);
if (hasToolResultData(toolResult)) {
renderData(toolResult);
} else {
renderError('No data received.');
}
};
app.onhostcontextchanged = (ctx) => {
if (ctx.theme) { applyTheme(ctx.theme); }
};
app.onteardown = () => ({});
await app.connect();
// Apply initial theme from host
const hostCtx = app.getHostContext();
if (hostCtx?.theme) { applyTheme(hostCtx.theme); }
</script>
</body>
</html>
Start from
self-contained-widget.template.html.
Keep this exact marker in <head> until the final inlining step:
<!-- MCP_APPS_SELF_CONTAINED_RUNTIME -->
The application module obtains its dependencies from the embedded runtime:
const { App, webLightTheme, webDarkTheme } = globalThis.McpAppsRuntime;
In this mode:
import declarations, remote <script src>, stylesheets, fonts, images,
iframes, media, map tiles, workers, or literal network fetch calls.<fluent-*> elements;
Fluent Web Components are intentionally not bundled.<script type="module"> application block. The inliner adds the
runtime as a classic inline script before it.If the user asks to change an existing widget ("make it more colorful", "add a chart", "make the map bigger"):
Read the existing HTML file
Make ONLY the requested change
Do not restructure the widget, add new features, or remove functionality unless asked
Preserve its existing CDN policy. For a self-contained widget, edit a temporary copy prepared with the command below, then re-run the inliner after editing. Do not hand-edit the minified runtime.
node "${PLUGIN_ROOT}/scripts/inline-self-contained-runtime.js" --prepare --input "./widget.html" --output "./widget.draft.html"
Write the updated file
<!DOCTYPE html>MCP_APPS_SELF_CONTAINED_RUNTIME, and must not load any remote runtime asset.ontoolresult and callServerTool paths. Read
widget-private metadata from runtime result._meta, never result.meta.まだレビューはありません。使ってみた感想をお寄せください。
概要と使いどころ
Activates and provisions a Power Pages website in a Power Platform environment via the Power Platform REST API. Use when the user wants to activate, provision, turn on, or enable a Power Pages website or portal.
日本語の概要は準備中です。原文の説明を表示しています。
Integrates Power Pages generative-AI summarization APIs (PREVIEW) into a Single Page Application (SPA) site — the Search Summary API and the Data Summarization API — on any record-detail or list page. Generates per-target service code (CSRF-handled) and AI site settings; delegates Web API settings, table permissions, and web roles to `/integrate-webapi` and `/create-webroles`. Use whenever a user wants AI/Copilot output that condenses Dataverse content on a Power Pages site — an AI summary, AI-generated overview or "key insights" across a record or list, a search-results summary, a case/incident summary, or recommendation-chip refinement — even when phrased as "AI-generated paragraph", "insights", or "overview". Do NOT use for: generative pages in model-driven apps (use the model-apps `genpage` skill), Copilot Studio agents/chatbots, summarizing documents or PDFs, Power BI dashboards, plain keyword search with no AI summary, or plain Dataverse CRUD (use `/integrate-webapi`).
日本語の概要は準備中です。原文の説明を表示しています。
Adds Azure DevOps connector to a Power Apps code app. Use when querying work items, creating bugs, managing pipelines, or making ADO API calls.
日本語の概要は準備中です。原文の説明を表示しています。
Internal implementation skill invoked by /add-native for camera, image picker, barcode scanner, QR scanner, and camera/gallery Dataverse artifact workflows.
日本語の概要は準備中です。原文の説明を表示しています。
Integrates Power Automate cloud flows into a Power Pages site. Lists available flows, suggests relevant ones based on intent, identifies scenarios and web roles, creates metadata files, and generates client-side code to call flows. Handles both new flow registration and adding already-registered flows to additional pages without re-creating metadata. Use when the user wants to add, connect, register, or link a Power Automate cloud flow to their site.
日本語の概要は準備中です。原文の説明を表示しています。
Adds any Power Platform connector to a Power Apps code app. Generic fallback for connectors not covered by a specific skill.
日本語の概要は準備中です。原文の説明を表示しています。