ext-apps/examples/basic-server-react
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Olivier Chafik cfd1d1dc43
fix: Make MCP App UIs responsive for narrow viewports (#135)
Changed from min-width: 425px to:
- width: 100%
- max-width: 425px
- box-sizing: border-box

This allows the apps to shrink on narrow viewports (like mobile
or when embedded in native WebViews) instead of causing horizontal
scrolling.

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-13 12:12:06 +00:00
..
src fix: Make MCP App UIs responsive for narrow viewports (#135) 2025-12-13 12:12:06 +00:00
mcp-app.html Add basic-host and basic-server-react examples 2025-12-04 14:28:27 -06:00
package.json Implement BYO zod v3 or v4 2025-12-12 11:29:02 +01:00
README.md Add basic-server-vanillajs example 2025-12-04 14:28:27 -06:00
server.ts feat(examples): add SSE transport support and shared server utility (#136) 2025-12-12 13:10:10 +00:00
tsconfig.json Add basic-host and basic-server-react examples 2025-12-04 14:28:27 -06:00
vite.config.ts Add basic-host and basic-server-react examples 2025-12-04 14:28:27 -06:00

Example: Basic Server (React)

An MCP App example with a React UI.

Tip

Looking for a vanilla JavaScript example? See basic-server-vanillajs!

Overview

Key Files

Getting Started

npm install
npm run dev

How It Works

  1. The server registers a get-time tool with metadata linking it to a UI HTML resource (ui://get-time/mcp-app.html).
  2. When the tool is invoked, the Host renders the UI from the resource.
  3. The UI uses the MCP App SDK API to communicate with the host and call server tools.