build-mcp-app

Build MCP servers that serve interactive UI widgets rendered inline in chat.

1|Updated Mar 26, 2026
One-click install
npx skills add https://github.com/todevelopers/todevelopers-marketplace --skill build-mcp-app-todevelopers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: build-mcp-app
Source: https://github.com/todevelopers/todevelopers-marketplace/tree/main/plugins/mcp-builder/skills/build-mcp-app
Command: npx skills add https://github.com/todevelopers/todevelopers-marketplace --skill build-mcp-app-todevelopers

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @modelcontextprotocol/sdk, @modelcontextprotocol/ext-apps, zod, express, and includes references (resource) components.

What problem does it solve? Plain MCP tools return only text or JSON, which falls short when users need to pick from large lists, confirm destructive actions, or view charts and previews. This Skill guides you through adding interactive UI widgets to an MCP server so tools can render forms, pickers, dialogs, and displays directly inside the chat surface. ## Core Features & Use Cases - Widget-enabled tools: Register tools with _meta.ui.resourceUri and serve HTML resources via registerAppResource using the @modelcontextprotocol/ext-apps package. - Bidirectional widget runtime: Use the App class inside the sandboxed iframe to receive tool results, send messages to the conversation, call server tools, and follow host theme changes. - Decision guidance: Determine when a widget beats plain text, and when spec-native elicitation covers the need without any UI code. - Use Case: Build a contact picker tool where Claude calls pick_contact, the host renders a searchable list widget in an iframe, and the user's selection is injected back into the conversation as a message. ## Quick Start Ask Claude to add an interactive picker widget to your MCP server tool using the ext-apps SDK.

Frequently Asked Questions about build-mcp-app

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add an interactive UI widget to an MCP server tool?

Register the tool with registerAppTool and declare _meta.ui.resourceUri pointing to a ui:// resource, then register that resource with registerAppResource serving HTML with the text/html;profile=mcp-app MIME type. The host renders the HTML in an iframe and pipes the tool result to it.

When should I use a widget instead of elicitation in MCP?

Use elicitation for yes/no confirmations, short enum picks, and flat forms since it is spec-native with zero UI code. Use a widget for large searchable lists, visual previews, charts, maps, diffs, or live-updating progress that elicitation cannot render.

Why does my MCP app widget render as a blank rectangle?

Blank widgets are almost always CSP violations, typically from importing ext-apps via CDN like esm.sh, whose transitive fetches get blocked. Inline the @modelcontextprotocol/ext-apps app-with-deps bundle into the HTML at server startup and check the iframe's own devtools console for errors.

Can MCP app widgets open external links or load remote images?

No, the iframe sandbox blocks window.open, target=_blank anchors, and remote img-src loads. Use app.openLink({url}) for navigation and fetch images server-side, embedding them as data: URLs in the tool result payload.

Do MCP app widgets work in hosts without apps surface support?

Yes, widgets degrade gracefully. Hosts without the apps surface ignore _meta.ui and render the tool's plain text or JSON content directly, so the tool handler should always return meaningful data alongside the widget.