Skip to content

MCP App with React Widgets

An MCP server with React widgets and Tailwind CSS styling using MCP Apps

Categories
UI
React
Tailwind
HTTP
Share
Post on X

Build styled React widgets for MCP applications using Tailwind CSS.

Features

  • React component tools with Tailwind CSS v4 styling
  • PostCSS configuration included
  • CSP and domain metadata support for secure widget embedding
  • HTTP transport
  • Example tool: weather widget with Tailwind styling

Getting Started

1. Create the project

Shell

2. Install & run

Shell

Requires Node.js 22.12 or newer. pnpm install also installs @xmcp-dev/compiler, the dev dependency that runs xmcp dev and xmcp build.

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

Project Structure

Text

Creating Styled Tools

Create a .tsx file in src/tools/ using Tailwind classes:

TSX

The _meta.ui field configures CSP policies and embedding behavior for your widget.

Deploy

Shell

Learn More

Other templates

One framework to rule them all