Skip to content
Skillpedia
Connectors (MCP)46k Β· #6340

build-mcp-app

What it does

It guides your agent to add interactive UI components to an MCP server, so its tools can show forms, pickers, or dashboards inside a chat. It is for developers building MCP servers who want richer, interactive results.

When to use it

  • βœ“When you want an MCP server to show a form or picker inside the chat.
  • βœ“When you want a tool to display a dashboard or confirmation dialog inline.
  • βœ“When you already have an MCP server and want to add interactive widgets.

Skill link

https://github.com/anthropics/claude-plugins-official/blob/main/plugins/mcp-server-dev/skills/build-mcp-app/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/anthropics/claude-plugins-official/blob/main/plugins/mcp-server-dev/skills/build-mcp-app/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute β†’

Example of what to ask your AI

β€œCan you add a form widget to my MCP server so users can fill in details inside the chat?”

5 new skills a week. 1 minute to read.

How it works

The agent builds on a standard MCP server and adds UI resources that the chat host displays in a sandboxed frame. The widgets use the same tool and protocol layer as the rest of the server.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Build an MCP App (Interactive UI Widgets)

An MCP app is a standard MCP server that also serves UI resources β€” interactive components rendered inline in the chat surface. Build once, runs in Claude and ChatGPT and any other host that implements the apps surface.

The UI layer is additive. Under the hood it's still tools, resources, and the same wire protocol. If you haven't built a plain MCP server before, the build-mcp-server skill covers the base layer. This skill adds widgets on top.

Testing in Claude: Add the server as a custom connector in claude.ai (via a Cloudflare tunnel for local dev) β€” this exercises the real iframe sandbox and hostContext. See https://claude.com/docs/connectors/building/testing.

Claude host specifics

_meta.ui.* key Where Effect
resourceUri tool Which ui:// resource the host renders for this tool's results.
visibility: ["app"] tool Hide a widget-only helper tool (e.g. geometry/image fetcher called via callServerTool) from Claude's tool list.
prefersBorder: false resource Drop the host's outer card border (mobile).
csp.{connectDomains, resourceDomains, baseUriDomains} resource Declare external origins; default is block-all. frameDomains is currently restricted in Claude.
  • hostContext.safeAreaInsets: {top, right, bottom, left} (px) β€” honor these for notches and the composer overlay.
  • Directory submission requires OAuth or authless (none) β€” static bearer is private-deploy only and blocks listing β€” plus tool annotations and 3–5 PNG screenshots; see references/directory-checklist.md.

When a widget beats plain text

Don't add UI for its own sake β€” most tools are fine returning text or JSON. Add a widget when one of these is true:

Signal Widget type
Tool needs structured input Claude can't reliably infer Form
User must pick from a list Claude can't rank (files, contacts, records) Picker / table
Destructive or billable action needs explicit confirmation Confirm dialog
Output is spatial or visual (charts, maps, diffs, previews) Display widget
Long-running job the user wants to watch Progress / live status

If none apply, skip the widget. Text is faster to build and faster for the user.


Widgets vs Elicitation β€” route correctly

Before building a widget, check if elicitation covers it. Elicitation is spec-native, zero UI code, works in any compliant host.

Need Elicitation Widget
Confirm yes/no βœ… overkill
Pick from short enum βœ… overkill
Fill a flat form (name, email, date) βœ… overkill
Pick from a large/searchable list ❌ (no scroll/search) βœ…
Visual preview before choosing ❌ βœ…
Chart / map / diff view ❌ βœ…
Live-updating progress ❌ βœ…

If elicitation covers it, use it. See ../build-mcp-server/references/elicitation.md.


Architecture: two deployment shapes

Remote MCP app (most common)

Hosted streamable-HTTP server. Widget templates are served as resources; tool results reference them. The host fetches the resource, renders it in an iframe sandbox, and brokers messages between the widget and Claude.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  tools/call   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Claude  │─────────────> β”‚ MCP server β”‚
β”‚   host   β”‚<── result ────│  (remote)  β”‚
β”‚          β”‚  + widget ref β”‚            β”‚
β”‚          β”‚               β”‚            β”‚
β”‚          β”‚ resources/readβ”‚            β”‚
β”‚          │─────────────> β”‚  widget    β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β” β”‚<── template ──│  HTML/JS   β”‚
β”‚ β”‚iframeβ”‚ β”‚               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚ β”‚widgetβ”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

MCPB-packaged MCP app (local + UI)

Same widget mechanism, but the server runs locally inside an MCPB bundle. Use this when the widget needs to drive a local application β€” e.g., a file picker that browses the actual local disk, a dialog that controls a desktop app.

For MCPB packaging mechanics, defer to the build-mcpb skill. Everything below applies to both shapes.


How widgets attach to tools

A widget-enabled tool has two separate registrations:

  1. The tool declares a UI resource via _meta.ui.resourceUri. Its handler returns plain text/JSON β€” NOT the HTML.
  2. The resource is registered separately and serves the HTML.

When Claude calls the tool, the host sees _meta.ui.resourceUri, fetches that resource, renders it in an iframe, and pipes the tool's return value into the iframe via

FAQ

Do I need a basic MCP server first?

Yes. The skill adds widgets on top of an MCP server, and a separate server skill covers that base layer.

Does it work outside Claude?

The skill says the app can run in Claude and in other hosts that support the apps surface.

How do I test it?

The skill suggests adding the server as a custom connector in claude.ai, using a tunnel for local development.

Details

Original description by the author

This skill should be used when the user wants to build an "MCP app", add "interactive UI" or "widgets" to an MCP server, "render components in chat", build "MCP UI resources", make a tool that shows a "form", "picker", "dashboard" or "confirmation dialog" inline in the conversation, or mentions "apps SDK" in the context of MCP. Use AFTER the build-mcp-server skill has settled the deployment model, or when the user already knows they want UI widgets.

repo: anthropics/claude-plugins-official

Popularity

GitHub stars
46k
Ranking position
#6340
License
Apache-2.0
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills