CSS

Style your xmcp tools with Tailwind CSS, CSS, or CSS Modules

If you're using ChatGPT widgets or MCP Apps, xmcp provides your application multiple ways to use CSS:

xmcp automatically detects and imports a globals.css file if it exists in globals.css, src/globals.css, or src/tools/globals.css (in priority order). You don't need to manually import it in every tool.

Tailwind CSS

A CSS framework that provides utility classes like flex, pt-4, text-center, and rotate-90. You use these classes directly in your component to build layouts and designs.

Install Tailwind CSS:

pnpm add -D tailwindcss @tailwindcss/postcss

Add the PostCSS plugin to your postcss.config.mjs file:

Create a globals.css file in your project root (or src/globals.css) and import Tailwind:

Now you can use Tailwind classes in your tools:

CSS

Write standard CSS to style your components without any framework or tooling.

Create a globals.css file:

Use the styles in your tool:

CSS Modules

Scoped styles that are tied to a specific tool file.

Create a CSS module file with the .module.css extension:

Import the styles object and use it in your tool:

Summary

Pick the approach that fits your project. You can also mix them, for example, use Tailwind for layout and CSS Modules for component-specific styles.

On this page

One framework to rule them all