TemplatesReact Widgets

React Widgets

An MCP server with interactive React component widgets

React Widgets preview

Build interactive ChatGPT widgets using React and xmcp.

Features

  • React component tools rendered as interactive widgets in ChatGPT
  • Server-side rendering automatically enabled for React tools
  • TypeScript support with Zod schema validation
  • HTTP transport
  • Example tools: counter (state management) and weather (external API)

Getting Started

1. Create the project

2. Install & run

The MCP server will start with HTTP transport at http://localhost:3001.

Project Structure

Creating Widget Tools

Create a .tsx file in src/tools/ that exports a React component as the default:

The tool is automatically discovered and rendered as a widget in ChatGPT.

Deploy

Learn More

Other templates

One framework to rule them all