build-mcp-app
यह क्या करती है
यह आपके एजेंट को MCP server में इंटरैक्टिव UI कंपोनेंट जोड़ने में मदद करती है, ताकि उसके टूल चैट के अंदर फ़ॉर्म, पिकर या डैशबोर्ड दिखा सकें। यह उन डेवलपर्स के लिए है जो MCP server बनाते हैं और बेहतर, इंटरैक्टिव नतीजे चाहते हैं।
कब इस्तेमाल करें
- ✓जब आप चाहें कि MCP server चैट के अंदर एक फ़ॉर्म या पिकर दिखाए।
- ✓जब कोई टूल सीधे चैट में डैशबोर्ड या पुष्टि डायलॉग दिखाए।
- ✓जब आपके पास पहले से MCP server है और उसमें इंटरैक्टिव विजेट जोड़ने हैं।
Skill का लिंक
https://github.com/anthropics/claude-plugins-official/blob/main/plugins/mcp-server-dev/skills/build-mcp-app/SKILL.mdइसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।
कैसे इस्तेमाल करें
सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।
पेस्ट करने के लिए तैयार मैसेज
Claude Code, Codex या Cursor के लिए: प्रोजेक्ट फ़ोल्डर में चलाएँ और skill इंस्टॉल हो जाएगी।
SKILL.md डाउनलोड करें और अपने एजेंट के skills फ़ोल्डर में रखें।
AI से क्या माँगें: उदाहरण
“क्या आप मेरे MCP server में एक फ़ॉर्म विजेट जोड़ सकते हैं, ताकि उपयोगकर्ता चैट के अंदर ही जानकारी भर सकें?”
हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।
यह कैसे काम करती है
एजेंट एक मानक MCP server पर बनाता है और UI रिसोर्स जोड़ता है, जिन्हें चैट होस्ट एक सैंडबॉक्स्ड फ़्रेम में दिखाता है। विजेट उसी टूल और प्रोटोकॉल लेयर का इस्तेमाल करते हैं जो सर्वर के बाकी हिस्से में है।
तकनीकी सामग्री (मूल SKILL.md)
लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे 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
अक्सर पूछे जाने वाले सवाल
क्या पहले एक बुनियादी MCP server चाहिए?
हाँ। स्किल विजेट को MCP server के ऊपर जोड़ती है, और उसकी बुनियादी परत के लिए एक अलग server स्किल है।
क्या यह Claude के बाहर भी चलता है?
स्किल कहती है कि यह ऐप Claude में और उन दूसरे होस्ट में चल सकता है जो apps सतह को सपोर्ट करते हैं।
मैं इसे कैसे टेस्ट करूँ?
स्किल सुझाती है कि claude.ai में server को कस्टम कनेक्टर के रूप में जोड़ें, और लोकल डेवलपमेंट के लिए tunnel इस्तेमाल करें।
जानकारी
लेखक का मूल विवरण
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.
लोकप्रियता
- GitHub स्टार
- 46k
- रैंकिंग में स्थान
- #6340
- लाइसेंस
- Apache-2.0
- अपडेट की गई
- 2/11/2026
कमेंट
- …
इस repository की और skills
access
46kयह Discord चैनल पर कौन आपके सहायक को मैसेज कर सकता है, यह मैनेज करने में मदद करती है, जिसमें पेयरिंग और अनुमति सूची शामिल हैं।
configure
46kबॉट टोकन सेव करके और देखकर कि कौन पहुँच सकता है, आपके सहायक के लिए Discord चैनल सेट करती है।
access
46kयह iMessage चैनल पर कौन आपके सहायक को मैसेज कर सकता है, इसे मैनेज करने में मदद करती है, जिसमें मंज़ूरी और अनुमति सूची शामिल है।
configure
46kFull Disk Access सहित आपके iMessage चैनल का सेटअप जाँचती है, और बताती है कि आपके सहायक तक कौन पहुँच सकता है।
मिलती-जुलती skills
mcporter
394kयह आपके एजेंट को HTTP या stdio पर MCP सर्वर और उनके टूल सूचीबद्ध करने, चलाने और जांचने देती है, और उनकी साइन-इन सेटिंग्स प्रबंधित करती है।
fastmcp
260kआपको Python में MCP सर्वर बनाने, जाँचने और तैनात करने में मदद करती है, जो AI सहायकों को आपके API, डेटाबेस या फ़ाइलों तक टूल के रूप में पहुँच देता है।
mcp-oauth-remote-gateway
260kजब Hermes किसी सर्वर पर चलता है, तो रिमोट MCP सर्वर के लिए OAuth साइन-इन हाथ से करने में मदद करती है, जहाँ सामान्य ब्राउज़र साइन-इन नहीं पहुँच पाता।