build-mcp-app
Fungsinya
Skill ini memandu agent Anda menambahkan komponen UI interaktif ke server MCP, sehingga alat-alatnya dapat menampilkan formulir, pemilih, atau dasbor di dalam chat. Skill ini ditujukan untuk developer yang membangun server MCP dan menginginkan hasil yang lebih kaya dan interaktif.
Kapan dipakai
- βSaat Anda ingin server MCP menampilkan formulir atau pemilih di dalam chat.
- βSaat Anda ingin sebuah alat menampilkan dasbor atau dialog konfirmasi secara sebaris.
- βSaat Anda sudah punya server MCP dan ingin menambahkan widget interaktif.
Link skill
https://github.com/anthropics/claude-plugins-official/blob/main/plugins/mcp-server-dev/skills/build-mcp-app/SKILL.mdSalin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.
Cara pakai
Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.
Pesan siap tempel
Untuk Claude Code, Codex, atau Cursor: jalankan di folder proyek, lalu skill langsung terpasang.
Unduh SKILL.md lalu taruh di folder skill agen Anda.
Contoh permintaan ke AI
βBisakah Anda menambahkan widget formulir ke server MCP saya agar pengguna bisa mengisi detail langsung di dalam chat?β
5 skill baru setiap minggu. 1 menit baca.
Cara kerjanya
Agent membangun di atas server MCP standar dan menambahkan resource UI yang ditampilkan host chat dalam frame tersandbox. Widget memakai lapisan alat dan protokol yang sama dengan bagian server lainnya.
Konten teknis (SKILL.md asli)
Teks asli dari pembuat, dalam bahasa Inggris, langsung dari 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 toolannotationsand 3β5 PNG screenshots; seereferences/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:
- The tool declares a UI resource via
_meta.ui.resourceUri. Its handler returns plain text/JSON β NOT the HTML. - 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
Pertanyaan umum
Apakah saya perlu server MCP dasar dulu?
Ya. Skill ini menambahkan widget di atas server MCP, dan skill server terpisah membahas lapisan dasarnya.
Apakah bisa dipakai di luar Claude?
Skill ini menyebutkan aplikasi dapat berjalan di Claude dan host lain yang mendukung permukaan apps.
Bagaimana cara mengujinya?
Skill ini menyarankan menambahkan server sebagai connector kustom di claude.ai, dengan tunnel untuk pengembangan lokal.
Detail
Deskripsi asli dari pembuat
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.
Popularitas
- Bintang GitHub
- 46k
- Peringkat
- #6340
- Lisensi
- Apache-2.0
- Diperbarui
- 2/11/2026
Komentar
- β¦
Skill lain dari repositori ini
access
46kMemungkinkan Anda mengatur siapa yang dapat mengirim pesan ke asisten Anda melalui kanal Discord, termasuk persetujuan pairing dan daftar izin.
configure
46kMenyiapkan kanal Discord untuk asisten Anda dengan menyimpan token bot dan memeriksa siapa yang dapat menghubunginya.
access
46kMemungkinkan Anda mengatur siapa yang dapat mengirim pesan teks ke asisten Anda melalui kanal iMessage, termasuk persetujuan dan daftar izin.
configure
46kMemeriksa pengaturan kanal iMessage Anda, termasuk Full Disk Access, dan menjelaskan siapa yang dapat menghubungi asisten Anda.
Skill serupa
mcporter
394kMembantu agent Anda mendaftar, memanggil, dan memeriksa server MCP beserta alatnya lewat HTTP atau stdio, serta mengatur pengaturan login mereka.
fastmcp
260kMembantu Anda membangun, menguji, dan menerapkan server MCP Python yang memberi asisten AI akses ke API, basis data, atau file Anda sebagai alat.
mcp-oauth-remote-gateway
260kMemandu Anda masuk dengan OAuth untuk server MCP jarak jauh saat Hermes berjalan di server, di mana proses masuk browser biasa tidak dapat menjangkaunya.