Prerequisites
You’ll need Node.js 18 or higher. Familiarity with MCP tools and resources is recommended since MCP Apps combine both primitives. Experience with the MCP TypeScript SDK will help you better understand the server-side patterns.Getting started
The fastest way to create an MCP App is using an AI coding agent with the MCP Apps skill. If you prefer to set up a project manually, skip to Manual setup.Using an AI coding agent
AI coding agents with Skills support can scaffold a complete MCP App project for you. Skills are folders of instructions and resources that your agent loads when relevant. They teach the AI how to perform specialized tasks like creating MCP Apps. Thecreate-mcp-app skill includes architecture guidance, best practices, and
working examples that the agent uses to generate your project.
Install the skill
If you are using Claude Code, you can install the skill directly with:You can also use the Vercel Skills CLI to install skills across different AI coding agents:Alternatively, you can install the skill manually by cloning the ext-apps repository:And then copying the skill to the appropriate location for your agent:
For example, with Claude Code you can install the skill globally (available in all projects):Or install it for a single project only by copying to To verify the skill is installed, ask your agent “What skills do you have access to?” — you should see
| Agent | Skills directory (macOS/Linux) | Skills directory (Windows) |
|---|---|---|
| Claude Code | ~/.claude/skills/ | %USERPROFILE%\.claude\skills\ |
| VS Code and GitHub Copilot | ~/.copilot/skills/ | %USERPROFILE%\.copilot\skills\ |
| Gemini CLI | ~/.gemini/skills/ | %USERPROFILE%\.gemini\skills\ |
| Cline | ~/.cline/skills/ | %USERPROFILE%\.cline\skills\ |
| Goose | ~/.config/goose/skills/ | %USERPROFILE%\.config\goose\skills\ |
| Codex | ~/.codex/skills/ | %USERPROFILE%\.codex\skills\ |
This list is not comprehensive. Other agents may support skills in different locations; check your agent’s documentation.
.claude/skills/ in your project directory:create-mcp-app as one of the available skills.Create your app
Ask your AI coding agent to build it:The agent will recognize the 
create-mcp-app skill is relevant, load its instructions, then scaffold a complete project with server, UI, and configuration files.
Test your app
Follow the instructions in Testing your app below. For the color picker example, start a new chat and ask Claude to provide you a color picker.

Manual setup
If you’re not using an AI coding agent, or prefer to understand the setup process, follow these steps.Create the project structure
A typical MCP App project separates the server code from the UI code:The server registers the tool and serves the UI resource. The UI resource will eventually be rendered in a secure iframe with deny-by-default CSP configuration. If your app has CSS and JS assets, you will need to configure CSP, or you can bundle your assets into the HTML with a tool like
my-mcp-app
package.json
tsconfig.json
vite.config.ts
server.ts
mcp-app.html
src
mcp-app.ts
vite-plugin-singlefile, which is what we will do in this tutorial.Install dependencies
ext-apps package provides helpers for both the server side (registering tools and resources) and the client side (the App class for UI-to-host communication). Vite with the vite-plugin-singlefile plugin is used here to bundle your UI and assets into a single HTML file for convenience, but this is optional — you can use any bundler or serve unbundled files if you configure CSP.Configure the project
- package.json
- tsconfig.json
- vite.config.ts
The
"type": "module" setting enables ES module syntax. The build script uses the INPUT environment variable to tell Vite which HTML file to bundle. The serve script runs your server using tsx for TypeScript execution.Build the project
With the project structure and configuration in place, continue to Building an MCP App below to implement the server and UI.
Building an MCP App
Let’s build a simple app that displays the current server time. This example demonstrates the full pattern: registering a tool with UI metadata, serving the bundled HTML as a resource, and building a UI that communicates with the server.Server implementation
The server needs to do two things: register a tool that includes the_meta.ui.resourceUri field, and register a resource handler that serves the
bundled HTML. Here’s the complete server file:
resourceUri: Theui://scheme tells hosts this is an MCP App resource. The path structure is arbitrary.registerAppTool: Registers a tool with the_meta.ui.resourceUrifield. When the host calls this tool, the UI is fetched and rendered, and the tool result is passed to it upon arrival.registerAppResource: Serves the bundled HTML when the host requests the UI resource.- Express server: Exposes the MCP server over HTTP on port 3001.
UI implementation
The UI consists of an HTML page and a TypeScript module that uses theApp
class to communicate with the host. Here’s the HTML:
app.connect(): Establishes communication with the host. Call this once when your app initializes.app.ontoolresult: A callback that fires when the host pushes a tool result to your app (e.g., when the tool is first called and the UI renders).app.callServerTool(): Lets your app proactively call tools on the server. Keep in mind that each call involves a round-trip to the server, so design your UI to handle latency gracefully.
App class provides additional methods for logging, opening URLs, and
updating the model’s context with structured data from your app. See the full
API documentation.
Testing your app
To test your MCP App, build the UI and start your local server:http://localhost:3001/mcp. However, to see your app render, you need an MCP
host that supports MCP Apps. You have several options.
Testing with Claude
Claude (web) and Claude Desktop support MCP Apps. For local development, you’ll need to expose your server to the internet. You can run an MCP server locally and use tools likecloudflared
to tunnel traffic through.
In a separate terminal, run:
https://random-name.trycloudflare.com) and add it
as a custom connector
in Claude - click on your profile, go to Settings, Connectors, and
finally Add custom connector.
Custom connectors are available on paid Claude plans (Pro, Max, or Team).

Testing with the basic-host
Theext-apps repository includes a test host for development. Clone the repo and
install dependencies:
npm start from ext-apps/examples/basic-host/ will start the basic-host
test interface. To connect it to a specific server (e.g., one you’re developing),
pass the SERVERS environment variable inline:
http://localhost:8080. You’ll see a simple interface where you can
select a tool and call it. When you call your tool, the host fetches the UI
resource and renders it in a sandboxed iframe. You can then interact with your
app and verify that tool calls work correctly.

Learn more
API Documentation
Full SDK reference and API details
GitHub Repository
Source code, examples, and issue tracker
Specification
Technical specification for implementers