MCP Apps POC
A proof-of-concept demonstrating interactive UI capabilities for MCP servers through a task management example. Shows how MCP servers can deliver HTML/CSS/JS interfaces that render inside AI chat clients with bidirectional communication.
README
MCP Apps POC
A proof-of-concept demonstrating the MCP Apps Extension (SEP-1865) - the new standard for interactive user interfaces in MCP servers, proposed by Anthropic, OpenAI, and the MCP-UI community.
What is MCP Apps?
MCP Apps allows MCP servers to deliver interactive UIs (HTML/CSS/JS) that render inside AI chat clients. Instead of just returning text, your tools can now show dashboards, forms, charts, and more.
Key features:
- Bidirectional communication: UI can call server tools and send messages back to the chat
- Security sandboxing: UIs run in isolated iframes with controlled capabilities
- Backward compatible: Servers still return text for non-UI-capable clients
Quick Start
# Install dependencies
npm install
# Build everything (MCP app UI + test host)
npm run build
# Run the demo (starts both MCP server and test host)
npm run demo
Then open http://localhost:8080 in your browser.
What's Included
MCP Server (server.ts)
A "Quick Tasks" server with 4 tools:
get-tasks- Returns task list + renders interactive UIadd-task- Adds a new tasktoggle-task- Marks tasks complete/incompletedelete-task- Removes a task
MCP App UI (src/mcp-app.ts)
Interactive task manager that demonstrates:
- Receiving tool results from the server
- Calling server tools from the UI
- Sending messages back to the chat host
- Dark/light mode support
Test Host (host/)
A React-based host for testing MCP Apps locally. Features:
- Double-iframe sandbox for security isolation
- Server/tool selection UI
- Live tool result display
Architecture
┌─────────────────────────────────────────────────────────┐
│ Test Host (localhost:8080) │
│ ┌───────────────────────────────────────────────────┐ │
│ │ Outer iframe (localhost:8081) - sandbox proxy │ │
│ │ ┌─────────────────────────────────────────────┐ │ │
│ │ │ Inner iframe (srcdoc) - MCP App UI │ │ │
│ │ │ ┌─────────────────────────────────────┐ │ │ │
│ │ │ │ Quick Tasks App │ │ │ │
│ │ │ │ - Renders task list │ │ │ │
│ │ │ │ - Calls server tools │ │ │ │
│ │ │ │ - Sends chat messages │ │ │ │
│ │ │ └─────────────────────────────────────┘ │ │ │
│ │ └─────────────────────────────────────────────┘ │ │
│ └───────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────┘
│
│ HTTP (Streamable)
▼
┌─────────────────────────────────────────────────────────┐
│ MCP Server (localhost:3001/mcp) │
│ - get-tasks, add-task, toggle-task, delete-task │
│ - Returns JSON data + ui:// resource URI │
└─────────────────────────────────────────────────────────┘
Scripts
| Command | Description |
|---|---|
npm run demo |
Start both MCP server and test host |
npm run build |
Build both MCP app and test host |
npm run start |
Start MCP server (HTTP mode, port 3001) |
npm run start:stdio |
Start MCP server (stdio mode) |
npm run start:host |
Start test host only |
Using with Claude Code / Other MCP Clients
For stdio-based MCP clients, add to your config:
{
"mcpServers": {
"quick-tasks": {
"command": "node",
"args": ["--experimental-strip-types", "/path/to/mcp-apps-poc/server.ts", "--stdio"]
}
}
}
Note: Most MCP clients don't support MCP Apps UI rendering yet. The tools will still work but return text-only responses.
Resources
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
E2B
Using MCP to run code via e2b.