digitarald/mcp-apps-playground/mcp-apps
Claude Code and agent skill by digitarald/mcp-apps-playground
- community
Checking that the SKILL.md file is still in the repository.
Build MCP Apps - interactive HTML UIs rendered in chat via the MCP Apps Extension (SEP-1865). Use when creating MCP tools that need rich UI beyond text, adding interactive forms/visualizations to MCP servers, configuring structuredContent for UI data passing, or debugging MCP UI rendering issues. Keywords: MCP Apps, SEP-1865, ui://, text/html;profile=mcp-app, structuredContent, postMessage, registerTool _meta.
Install
npx vskill@latest install digitarald/mcp-apps-playground/mcp-appsSKILL.md
MCP Apps Development
MCP Apps let MCP tools render interactive HTML UIs in chat. The UI runs in a sandboxed iframe and communicates via JSON-RPC postMessage.
External References
- Spec: https://github.com/modelcontextprotocol/ext-apps/blob/main/specification/draft/apps.mdx
- Blog: https://blog.modelcontextprotocol.io/posts/2025-11-21-mcp-apps/
- VS Code impl: https://github.com/microsoft/vscode (search
chatMcpAppModel.ts)
Quick Start
1. Register UI Resource
2. Register Tool with UI Link
3. UI Template (Static HTML)
Critical Requirements
| Requirement | Wrong | Right | |
|---|---|---|---|
| MIME type | text/html | text/html;profile=mcp-app | |
| URI scheme | https://, file:// | ui:// | |
| Tool registration | server.tool() | server.registerTool() with _meta | |
| Data passing | Template parameters | ui/notifications/tool-input | |
| External fetch/CDN | Just call fetch() | Declare domains in _meta.ui.csp | |
| VS Code setting | Just enable | Enable chat.mcp.apps.enabled + restart |
UI Lifecycle
Critical: Complete ui/initialize handshake before expecting data.
Host Notifications (UI receives)
| Method | When | Params | |
|---|---|---|---|
ui/notifications/tool-input | Tool args ready | { arguments } | |
ui/notifications/tool-input-partial | Streaming | Partial args | |
ui/notifications/tool-result | Tool complete | { content, structuredContent } | |
ui/notifications/tool-cancelled | Cancelled | { reason } | |
ui/notifications/host-context-changed | Theme/size change | Context object |
UI Requests (UI sends)
| Method | Purpose | Params | |
|---|---|---|---|
ui/initialize | Start handshake | { protocolVersion, capabilities } | |
ui/message | Send text to chat input | { content: [{ type: 'text', text }] } | |
tools/call | Call another MCP tool | { name, arguments } | |
resources/read | Read MCP resource | { uri } |
Common Patterns
Theme Integration
Send Results to Chat
XSS Prevention
Advanced Patterns
For complex UI interactions beyond basic tool→UI data flow, load references/patterns.md. Topics include:
| Pattern | When to use | |
|---|---|---|
| Awaiting User Input | Tool needs to wait for user interaction before returning (forms, selections, confirmations) | |
| Calling Other Tools | UI needs to invoke additional MCP tools | |
| Resource Metadata | Border preferences, sizing hints | |
| Loading External Resources | Configure CSP via _meta.ui.csp to allow external APIs, CDNs, fonts, embeds | |
| Reference Examples | Production patterns from ext-apps repo (charts, graphs, React, vanilla JS) |
Gotchas
- Templates are static - Don't pass data via template string interpolation. Data arrives via
tool-inputnotification.
- VS Code capability detection - VS Code uses
chat.mcp.apps.enabledsetting, NOT protocol capability negotiation. Don't rely onextensions["io.modelcontextprotocol/ui"].
- Script escaping - Use
<\/script>in template strings to avoid breaking the outer script.
- Rebuild + restart - After code changes:
npm run buildthen restart MCP server in VS Code.
- MIME type duplication - Must set
text/html;profile=mcp-appin BOTH resource options AND contents array. Missing either causes silent failure.
- External resources blocked by default - UI runs with strict CSP. To use external APIs/CDNs, you MUST declare allowed domains in
_meta.ui.csp. See patterns.md.
Debugging
Check server log file (e.g., /tmp/mcp-server.log):
📱 resources/read→ VS Code fetched UI (working)- Only
🔧 Tool called→ Setting not enabled or needs restart
See references/debugging.md for logging setup and references/troubleshooting.md for common issues.
File Structure
Reference Files
- references/patterns.md - Advanced patterns (awaiting user input, calling tools, CSP, examples)
- references/debugging.md - Logging setup
- references/troubleshooting.md - Common issues and fixes
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryChecking.github/skills/mcp-apps/SKILL.md
Popularity
- Repository stars
- 61
- Repository forks
- 12
- 7-day trend score
- 21
Stars and forks are for the whole GitHub repository, not this skill alone. Refreshed 27 Mar 2026, 7 months ago.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/digitarald/mcp-apps-playground/mcp-apps)