mcp-app-boilerplate
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-app-boilerplateShow the interactive greeting widget and set the tone to casual."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP App plugin boilerplate
A deployable starting point for an agent plugin whose core is an MCP App — a remote MCP server that ships an interactive HTML widget the host renders next to the tool result. One repo covers both halves:
Layer | Where | What it is |
MCP App |
| Next.js app serving a remote MCP server and the widget UI |
Plugin package |
| Agent Plugins 1.0.0 package that installs into Cursor, Codex, and Claude Code |
This is a GitHub template repository — click Use this template, or copy the
directory, to start a project from it. Nothing here is bound to a particular
deployment: mcp.json and .mcp.json ship with a replace-me.example.com
placeholder so a project that forgets to set its own endpoint fails loudly
instead of silently talking to someone else's server.
A reference deployment of this boilerplate runs at
https://mcp-app-boilerplate.vercel.app (MCP endpoint at /mcp). It exists so
pnpm test:client has something to check against; your project should point at
its own.
How the MCP App works
MCP Apps is SEP-1865,
stable since 2026-01-26 and identified as io.modelcontextprotocol/ui. Three
things wire it together:
A resource with a
ui://URI and MIME typetext/html;profile=mcp-appreturns the widget's HTML.A tool points at that resource through
_meta.ui.resourceUri.The host renders the HTML in a sandboxed iframe and speaks MCP JSON-RPC to it over
postMessage.
The trick that makes this pleasant to work on: the widget is an ordinary Next.js page, and the MCP route fetches its own rendered HTML to serve as the resource. You build the UI with the full framework instead of hand-writing an HTML string.
app/
mcp/route.ts MCP server — tools + the ui:// resource
page.tsx the widget (also viewable as a normal web page)
about/page.tsx proves client-side navigation survives the iframe
hooks/use-mcp-app.ts the host bridge: tool input, tool result, callTool
layout.tsx iframe hardening (asset URLs, history, fetch patches)
baseUrl.ts resolves the public origin (local, tunnel, or Vercel)
proxy.ts CORS headers so the iframe can load cross-origin assets
scripts/test-client.mjs protocol smoke test
scripts/set-endpoint.mjs writes your deployment URL into both manifestsThe two kinds of tool
The demo registers both, because real MCP Apps need both:
greetis model-visible. The agent calls it, and the host opens the widget.set_toneis declaredvisibility: ["app"], so it is hidden from the model and exists only for the widget to call when the user clicks a button. The widget invokes it throughcallToolfromuseMcpApp().
Related MCP server: ContinueWith
Rename it for a new project
The boilerplate name survives in five places:
File | What to change |
|
|
|
|
| the |
| directory name and the |
|
|
The endpoint URL is the one thing you can't set until you've deployed, so leave
it and run pnpm set-endpoint afterwards.
Build your own plugin
After that, the work happens in three places:
app/mcp/route.ts— replacegreet/set_tonewith your tools. BumpUI_VERSIONwhenever the widget changes, or hosts will serve a cached copy.app/page.tsx— your widget. Read state fromuseMcpApp().skills/<name>/SKILL.md— teach agents when to call your tools. Thedescriptionis all an agent sees before loading the file, so it has to name concrete triggers.
Develop
pnpm install
pnpm dev
pnpm test:client # verifies the protocol against localhost:3000pnpm test:client connects as a UI-capable client and asserts the parts that
are easy to get subtly wrong: the extension capability, the ui:// metadata on
the tool, the resource MIME type, and that the resource is real HTML.
To try it inside a real host while developing, expose a public HTTPS origin and tell the app about it, since hosts must be able to fetch the widget's assets:
cloudflared tunnel --url http://localhost:3000 # or ngrok
BASE_URL=https://your-tunnel.example pnpm devDeploy
vercel deploy --prod
pnpm set-endpoint https://your-project.vercel.app # updates both manifests
pnpm test:client https://your-project.vercel.appbaseUrl.ts derives the public origin from Vercel's environment variables, so
the resource CSP and asset prefix resolve correctly with no configuration — the
only URL you state by hand is the one in the manifests, and set-endpoint
writes that.
Install the plugin
The plugin root is the repository root, and both manifests describe the same
package; distribute it as a git repo. Run pnpm set-endpoint first — installing
while the placeholder URL is still in place gives you a plugin whose MCP server
never connects.
Cursor natively supports Agent Plugins. Add the repo through
Customize → Plugins, which reads the root plugin.json.
Codex (0.147+) reads the portable root plugin.json and mcp.json:
codex plugin marketplace add <your-org>/<your-repo>
codex plugin add <plugin-name>@<marketplace>
codex plugin list --jsonClaude Code does not yet parse the Agent Plugins $schema, so it reads the
parallel .claude-plugin/plugin.json and .mcp.json committed here. Its
skills/ discovery is the same directory, so the skill is shared:
claude plugin marketplace add <your-org>/<your-repo>To connect only the MCP server without the plugin wrapper, any host that speaks Streamable HTTP can point at the endpoint directly:
claude mcp add --transport http my-plugin https://your-project.vercel.app/mcpStack
mcp-handler2 — framework-agnostic MCP HTTP adapter, serves the 2026-07-28 protocol natively with a fallback for 2025-era Streamable HTTP clients@modelcontextprotocol/server2 and@modelcontextprotocol/ext-apps2 — MCP SDK v2 plus the MCP Apps helpers (registerAppTool,registerAppResource)Next.js 16 on Vercel Fluid Compute
Derived from vercel-labs/mcp-apps-nextjs-starter,
upgraded to the v2 MCP stack and packaged as an Agent Plugin.
This server cannot be deployed
Maintenance
Related MCP Connectors
Deploy AI-generated HTML/CSS/JS to instant public HTTPS URLs from any MCP-compatible agent.
Give any MCP-compatible AI assistant a builder for live, hosted web tools and workflows.
Host your MCP tool over streamable HTTP in one command.
Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA minimal, dependency-free MCP server that renders interactive widgets (like bar charts) inline in Claude, ChatGPT, and Grok from a custom connector.1MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for coding agents (Cursor, Claude Code, Codex) to install and configure the ContinueWith AI handoff widget on any website.40 npm3MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that adapts, activates, and shares local Agent Skills for runtimes like OpenAI Agents SDK and Claude Code, enabling dynamic discovery and shareable HTML/image artifacts.36 npm2MIT

CustomJS MCP Serverofficial
AlicenseNot gradedqualityDmaintenanceA remote MCP server that enables AI agents to host HTML pages, generate PDFs, capture screenshots, scrape sites, and run sandboxed code using a CustomJS API key.MIT