
Mcp
Wire json-render catalogs into MCP Apps so Claude, ChatGPT, Cursor, or VS Code hosts show interactive UIs from your MCP server.
Overview
mcp is an agent skill for the Build phase that integrates json-render with MCP Apps so MCP servers render interactive UIs inside Claude, ChatGPT, Cursor, and VS Code.
Install
npx skills add https://github.com/vercel-labs/json-render --skill mcpWhat is this skill?
- createMcpApp server bootstrap with catalog, bundled HTML, and stdio transport via @modelcontextprotocol/sdk
- defineCatalog + shadcn component definitions for json-render React schema
- Client hook useJsonRenderApp inside iframe with JSONUIProvider and Renderer
- Targets Claude, ChatGPT, Cursor, VS Code and other MCP-capable clients
- Quick-start TypeScript snippets for Node server and React app views
- 2 quick-start surfaces: Node stdio server + React MCP app client
Adoption & trust: 797 installs on skills.sh; 15k GitHub stars; 3/3 security scanners passed (skills.sh audits).
What problem does it solve?
Your MCP server returns opaque JSON while users need trustworthy, interactive UI inside the agent client.
Who is it for?
Solo builders already using json-render who want MCP-exposed dashboards, wizards, or ops panels in agent IDEs.
Skip if: Teams avoiding MCP, non-TypeScript stacks, or static docs sites with no agent protocol integration.
When should I use this skill?
Building MCP servers that render interactive UIs in Claude, ChatGPT, Cursor, or VS Code, or integrating json-render with the Model Context Protocol.
What do I get? / Deliverables
You can stand up an MCP App server and React client that streams json-render specs into a hosted iframe UI inside MCP-capable editors and chat clients.
- Runnable createMcpApp MCP server
- React client view wired with useJsonRenderApp
- Catalog-backed interactive UI spec inside agent host
Recommended Skills
Journey fit
Build → agent-tooling is the canonical shelf because the skill implements MCP server and client integration—not distribution or ops. Agent-tooling subphase covers Model Context Protocol servers, catalogs, and embedded interactive surfaces inside coding agents.
How it compares
Skill package for json-render + MCP wiring—not a generic MCP server generator or hosted UI SaaS.
Common Questions / FAQ
Who is mcp for?
Indie developers building MCP servers with TypeScript who want json-render catalogs to appear as interactive apps inside major agent clients.
When should I use mcp?
During Build agent-tooling when you integrate Model Context Protocol with json-render for Claude, ChatGPT, Cursor, or VS Code—not for SEO, analytics, or deploy runbooks.
Is mcp safe to install?
Review the Security Audits panel on this Prism page; expect network-adjacent and filesystem patterns typical of Node MCP servers you author locally.
SKILL.md
READMESKILL.md - Mcp
# @json-render/mcp MCP Apps integration that serves json-render UIs as interactive MCP Apps inside Claude, ChatGPT, Cursor, VS Code, and other MCP-capable clients. ## Quick Start ### Server (Node.js) ```typescript import { createMcpApp } from "@json-render/mcp"; import { defineCatalog } from "@json-render/core"; import { schema } from "@json-render/react/schema"; import { shadcnComponentDefinitions } from "@json-render/shadcn/catalog"; import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js"; import fs from "node:fs"; const catalog = defineCatalog(schema, { components: { ...shadcnComponentDefinitions }, actions: {}, }); const server = createMcpApp({ name: "My App", version: "1.0.0", catalog, html: fs.readFileSync("dist/index.html", "utf-8"), }); await server.connect(new StdioServerTransport()); ``` ### Client (React, inside iframe) ```tsx import { useJsonRenderApp } from "@json-render/mcp/app"; import { JSONUIProvider, Renderer } from "@json-render/react"; function McpAppView({ registry }) { const { spec, loading, error } = useJsonRenderApp(); if (error) return <div>Error: {error.message}</div>; if (!spec) return <div>Waiting...</div>; return ( <JSONUIProvider registry={registry} initialState={spec.state ?? {}}> <Renderer spec={spec} registry={registry} loading={loading} /> </JSONUIProvider> ); } ``` ## Architecture 1. `createMcpApp()` creates an `McpServer` that registers a `render-ui` tool and a `ui://` HTML resource 2. The tool description includes the catalog prompt so the LLM knows how to generate valid specs 3. The HTML resource is a Vite-bundled single-file React app with json-render renderers 4. Inside the iframe, `useJsonRenderApp()` connects to the host via `postMessage` and renders specs ## Server API - `createMcpApp(options)` - main entry, creates a full MCP server - `registerJsonRenderTool(server, options)` - register a json-render tool on an existing server - `registerJsonRenderResource(server, options)` - register the UI resource ## Client API (`@json-render/mcp/app`) - `useJsonRenderApp(options?)` - React hook, returns `{ spec, loading, connected, error, callServerTool }` - `buildAppHtml(options)` - generate HTML from bundled JS/CSS ## Building the iframe HTML Bundle the React app into a single self-contained HTML file using Vite + `vite-plugin-singlefile`: ```typescript // vite.config.ts import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import { viteSingleFile } from "vite-plugin-singlefile"; export default defineConfig({ plugins: [react(), viteSingleFile()], build: { outDir: "dist" }, }); ``` ## Client Configuration ### Cursor (`.cursor/mcp.json`) ```json { "mcpServers": { "my-app": { "command": "npx", "args": ["tsx", "server.ts", "--stdio"] } } } ``` ### Claude Desktop ```json { "mcpServers": { "my-app": { "command": "npx", "args": ["tsx", "/path/to/server.ts", "--stdio"] } } } ``` ## Dependencies ```bash # Server npm install @json-render/mcp @json-render/core @modelcontextprotocol/sdk # Client (iframe) npm install @json-render/react @json-render/shadcn react react-dom # Build tools npm install -D vite @vitejs/plugin-react vite-plugin-singlefile ```