Skip to content

Conversation

@jerome3o-anthropic
Copy link
Member

Summary

  • Add mcp_apps_hello_world tool demonstrating the MCP Apps extension (SEP-1865)
  • Tool returns an interactive React UI that runs in supporting MCP clients

Details

New tool: mcp_apps_hello_world

The tool includes _meta: { "ui/resourceUri": "ui://hello-world/app.html" } metadata which tells MCP clients to fetch and render the associated UI resource.

React App (src/apps/hello-world/)

Simple React app using @modelcontextprotocol/ext-apps/react hooks:

  • Displays tool input and results received from host
  • Button to send messages back to the chat
  • Uses useApp hook for host communication

Build tooling

  • Added Vite + vite-plugin-singlefile to bundle React apps into single HTML files
  • New build:apps script integrated into main build
  • Apps excluded from tsc (Vite handles tsx compilation)

Dependencies

  • @modelcontextprotocol/ext-apps from git (PR #84 with SDK 1.23+ compatibility fix)
  • react, react-dom
  • vite, @vitejs/plugin-react, vite-plugin-singlefile (dev)

Test plan

  • npm run build succeeds (including app bundling)
  • npm run lint passes
  • npm test passes
  • Manual test with MCP Apps-supporting client

🤖 Generated with Claude Code

Implements a simple MCP Apps tool that returns an interactive React UI:

- Add `mcp_apps_hello_world` tool with `_meta.ui/resourceUri` metadata
- Add resource handler for `ui://hello-world/app.html` returning HTML
- Create React app using `@modelcontextprotocol/ext-apps/react` hooks
- Add Vite build tooling to bundle React apps into single HTML files

The tool demonstrates the MCP Apps extension (SEP-1865) which allows
MCP servers to return interactive UI that runs in the client.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@jerome3o-anthropic jerome3o-anthropic merged commit 2b246dc into main Dec 7, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants