MCP server

classmcp: Give AI Short Semantic Class Names Instead of Utility Strings

classmcp is an MCP server that serves semantic CSS class names such as btn-primary for Tailwind, Bootstrap 5, UnoCSS and Tachyons, with SSR safety flags on every pattern.

Run
npx classmcp
View on GitHub

Stars, license and last push from GitHub. Install count as reported by the open skills directory.

What is classmcp?

classmcp is an MCP server that hands AI assistants semantic class names like btn-primary and card instead of long utility strings. It supports Tailwind CSS, Bootstrap 5, UnoCSS and Tachyons, marks each pattern for server-side rendering safety, and can return minified one-letter names.

A single Tailwind button can run to 180 characters of utility classes. classmcp trades that for btn-primary, 12 characters, or a single letter when minified. The README table puts the saving at 99 percent for a button.

The model asks the server what patterns exist, writes code using short names, and you add one generated stylesheet to the project. Your normal CSS framework then compiles it.

How the loop runs

  1. The assistant asks classmcp for available classes.
  2. classmcp returns semantic names with SSR safety information.
  3. The assistant writes markup using those short names.
  4. You generate the CSS file with the generate_css tool or the command npx classmcp generate-css > src/classmcp.css.
  5. Import that file next to Tailwind or Bootstrap and the framework compiles it.

Pattern coverage

Each of the four frameworks ships 70 or more patterns across 14 categories, including buttons, cards, forms, badges, alerts, avatars, layout, typography, navigation, modals, tables, lists, loading states and dividers.

Custom patterns live in .classmcp.json at the project root, with optional hover, focus and disabled states, a category and a framework limit. Run reload_config to apply changes without a restart.

Fit and limits

Best for

  • Projects that spend many tokens on repeated utility strings.
  • Next.js, Nuxt or Remix work, where hydration safety matters and get_ssr_info flags patterns that need client JavaScript.
  • Teams that want their own named patterns in .classmcp.json, with optional hover, focus and disabled states.

Not for

  • Sites with a fixed brand system where class names must match existing CSS. Define those as custom patterns first.
  • Projects that need a component library's own markup and styling. classmcp provides semantic class names, and get_component returns HTML examples for them. For libraries, see Starwind UI, Flowbite or shadcn.

Use it with UiChemy

classmcp shortens the class names an agent writes. UiChemy Composer works differently, writing real HTML, CSS and JavaScript inside Elementor or Gutenberg. If you build on WordPress, click Get Started on uichemy.com to compare.