mcp-apps-playground
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
What is this?
MCP Apps is the MCP extension that lets a server ship a small web page along with a tool. The host (Claude, for example) renders that page in a sandboxed iframe inside the conversation, and the page can talk back.
This repo is the smallest useful example I could write, plus one that shows off:
Tool | What you get |
| A counter that receives the tool's input, calls the server, and drafts a message to Claude |
| An animated three.js scene built from a JSON spec, drawn while the model is still writing it |
| A plain tool that the counter widget calls by itself |
Related MCP server: claude-mcp-render-local-widgets
Quick start
git clone https://github.com/zainulabidin302/mcp-apps-playground.git
cd mcp-apps-playground
npm installAdd the server to Claude Desktop (Settings → Developer → Edit Config):
{
"mcpServers": {
"hello-mcp-app": {
"command": "node",
"args": ["/absolute/path/to/mcp-apps-playground/server.js"]
}
}
}Restart Claude Desktop, then try:
Use show_hello_widget to greet Sara, starting at 3.
Use render_3d_scene to build a neon solar system: a glowing sun, three planets orbiting it, one with a moon, and a galaxy behind.
How it works
An MCP App has three parts. Two of them are ordinary MCP.
1. A UI resource: one HTML file under a ui:// address.
server.registerResource("hello-widget", "ui://hello/widget.html",
{ mimeType: "text/html;profile=mcp-app" },
async () => ({ contents: [{ uri, mimeType, text: html }] }));2. A tool that points to it: this is the whole link.
server.registerTool("show_hello_widget", {
inputSchema: { name: z.string() },
_meta: { ui: { resourceUri: "ui://hello/widget.html" } },
}, async ({ name, start = 0 }) => ({
content: [{ type: "text", text: `Widget for ${name}` }], // fallback for hosts with no UI
structuredContent: { name, start }, // data for the view
}));3. The view: the page listens, then talks back.
const app = new App({ name: "hello-widget" });
app.ontoolinput = ({ arguments: a }) => setTitle(a.name); // what the model sent
app.ontoolresult = (r) => setCount(r.structuredContent.start); // what the server returned
await app.callServerTool({ name: "get_server_time" }); // view -> server
await app.sendMessage({ role: "user", content: [/* ... */] }); // view -> chat
await app.connect();Always return useful content as well: a host that does not render views shows only that text.
Things I learned the hard way
sendMessagedoes not post silently. In Claude Desktop it drafts the message and asks you before sending.The view gets no network by default.
server.jsinlines the App SDK (and three.js, via esbuild) into one<script>, so the page needs no CSP allowances.ontoolinputpartialfires while the model is still writing the arguments. The 3D scene uses it to add objects one by one. It is about ten lines.
The anim3d spec
render_3d_scene takes a declarative scene:
{
"title": "Neon solar system", "background": "#02010a", "stars": 2000, "bloom": 1.4,
"camera": { "position": [0, 4, 9], "autoRotate": 0.4 },
"objects": [
{ "shape": "sphere", "material": "glow", "color": "#ffaa33", "scale": 1.6,
"animate": [{ "type": "pulse", "amount": 0.05 }],
"children": [
{ "shape": "sphere", "color": "#3399ff", "scale": 0.35,
"animate": [{ "type": "orbit", "radius": 2.2, "speed": 0.8 }] }
] },
{ "shape": "galaxy", "count": 20000, "radius": 6, "color": "#ff66cc", "color2": "#3344ff",
"position": [0, -1.5, 0], "animate": [{ "type": "spin", "speed": 0.1 }] }
]
}Shapes: box, sphere, torus, torusKnot, cone, cylinder, icosahedron, octahedron, dodecahedron, tetrahedron, ring, plane, capsule, particles, galaxy
Materials: standard, glow (works with bloom), glass, wire, toon
Animations (stackable): spin, float, bounce, orbit, pulse, colorCycle, wobble, wave (plane only)
childrenare positioned and animated relative to their parent, e.g. moons orbiting planets.
createStage(container, spec) from src/anim3d.js also works on its own in any page.
Ship it
Local bundle:
npm run packbuilds a.mcpbfile frommanifest.jsonthat Claude Desktop can install. Pack it on the platform you will run it on, because esbuild ships a native binary. The manifest validates and packs; I have not tested installing the bundle yet.Remote connector: the same server behind a URL also works in Claude on the web and on mobile. That needs an HTTP transport in place of stdio, which this repo does not include.
Project layout
server.js MCP server: resources, tools, and the HTML bundling
widget.html the counter view
scene.html shell for the 3D view
src/scene-widget.js 3D view: App SDK wiring
src/anim3d.js tiny declarative layer over three.js
manifest.json MCP Bundle manifestLicense
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Build your own tools from chat: design, test and host them on a shareable MCP server URL.
- VULKDeprecatedio.github.devjoaocastro
Generate, edit, and deploy immersive 3D/WebGL web projects from any MCP assistant.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
214 tools for AI agents over one MCP endpoint: image, video, audio, 3D, data, storage, mail, GPUs.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables building ChatGPT apps with custom UI widgets via a minimal Node.js MCP server, allowing tools to return structured content rendered in an iframe widget.3MIT
- FlicenseNot gradedqualityDmaintenanceEnables rendering interactive UI widgets and data visualizations for Claude.ai through MCP, supporting callback-based forms and client-side charts.-
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to respond to users with live, persistent, interactive web apps served at a single URL that evolve in place as the conversation continues. It exposes UI generation and evolution tools over MCP so agent responses can include clickable buttons and streaming interfaces alongside chat replies.24 PyPI4Apache 2.0
- AlicenseNot gradedqualityBmaintenanceExposes a catalog of fast, single-purpose interactive widgets as MCP tools with sandboxed iframe apps, letting AI agents invoke them over Streamable HTTP alongside a login-free human playground. Includes tool discovery, embeddable widget views, and auto-generated discovery metadata.1MIT