# melta UI [Health: Active]

**Category:** ⚖️ Legal  
**Repository:** https://github.com/tsubotax/melta-ui  
**GitHub Stars:** 203  
**npm Downloads (last month):** 1019  
**Views:** 4  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/melta-ui

## Description
AI-Ready design system MCP: melta UI tokens, component contracts, 99 rules, check_html self-verify

## Tools
Capabilities this server exposes over MCP:

- **get_token** — Get a design token by dot-path. Returns the token object with its value and class mapping.
- **get_component** — Get component metadata including variants, sizes, accessibility requirements, HTML sample, per-state specs (stateSpecs: disabled/loading/open/empty etc. — each with delta class strings + aria changes), and anatomy parts (overlay/container/th etc. with element/roles/class). Prefer these structured fields over inferring states from the HTML sample.
- **check_rule** — Check class strings against this design system's prohibition rules. Returns violations with reasons and alternatives.
- **check_html** — Lint a full HTML/JSX source against melta-ui rules — the same checks as CI and the PostToolUse hook (class rules + html-attr rules + composition rules for HTML). Use this AFTER generating UI code to self-verify before presenting it. Response always includes coverage info (manual rules cannot be auto-checked).
- **search** — Search across tokens and components by keyword. Matches against names, values, class strings, and descriptions. Returns up to 20 results (truncated flag when more matched).
- **get_rules** — Get melta-ui prohibition rules from rules.json (107 total). Use this to retrieve manual/contextual rules that check_rule cannot auto-detect. Supports filtering by category, severity, or detector.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "melta-ui": {
    "command": "npx",
    "args": ["-y","melta-ds-mcp"]
  }
}
```

## Documentation

## What melta UI does

The melta UI MCP server gives AI coding agents access to a design system’s machine-readable contracts. The distributed contract data includes design tokens, component specifications, recipes, and rules covering values such as colors, spacing, component states, anatomy, and accessibility requirements.

It is intended for teams generating web UI with AI agents and Tailwind CSS classes. The project is not a ready-to-install React component library. Instead, it supplies tokens, rules, contracts, and verification tools; the web reference implementation uses HTML and Tailwind classes.

The contracts can also be shared with a separate React Native implementation through the `melta-contracts` package. Web and app implementations consume the same contract source rather than maintaining copied token sets.

## How it works

The melta UI MCP server runs as a stdio process, commonly through `npx -y melta-ds-mcp`. On connection, it provides MCP instructions that point agents to the design constitution and to post-generation validation with `check_html`.

The server exposes resources including `melta://design-constitution`, `melta://tokens`, `melta://components`, `melta://components/{id}`, `melta://rules`, and `melta://rules/auto-detectable`. Agents can read the relevant contract before generating UI, then submit generated markup for checking. The same checking logic is also used by the repository’s lint CLI, hooks, and CI workflow.

The project documents 107 prohibited rules, with automated detection available for a subset. Rules that are not automatically checked are classified in the contract data, so a successful automated check does not mean every design requirement has been verified.

## Setup and configuration

Use Node 22 or newer and register the stdio command with an MCP client. For Claude Code, the documented command is:

```bash
claude mcp add melta-ui -- npx -y melta-ds-mcp
```

The repository also includes client configuration for Claude Code and Cursor when using the cloned project. Codex can register the same stdio command. A clone-based setup additionally provides the repository’s lint CLI, PostToolUse hook configuration, and CI-related files; the npm MCP package is the simpler path for contract lookup and self-checking.

The server can load assets from a different design-system bundle through a bring-your-own-design-system configuration. That bundle replaces the loaded assets rather than mixing them with melta’s rules.

## Tools and capabilities

The melta UI MCP server provides these tools:

- `get_token` retrieves a token by path, such as `color.primary.600`.
- `get_component` returns a component contract, including variants, sizes, states, anatomy, and accessibility details.
- `check_rule` tests a class string for prohibited patterns and conditional rules.
- `check_html` lints complete generated HTML or JSX using the shared validation logic.
- `get_rules` returns the rule set, with filtering support and manual rules included.
- `search` performs full-text searches and returns up to 20 results with truncation information.

The system is designed around class-based Tailwind styling. Static checks can inspect class attributes, HTML attributes, and DOM structure. JSX or Vue class and HTML-attribute checks are supported, but composition checks for nesting and accessibility DOM are limited to HTML, and dynamically assembled classes or spreads may not be statically traceable.

## Limitations and notes

Generated output still needs Tailwind and the melta token configuration to render as intended.

The server does not replace a complete component package. It is a contract and validation layer for projects whose styling is visible in markup. CSS-in-JS patterns that hide styling in props may fall outside the static lint coverage. The license is MIT.

_Full upstream README: https://allmcps.com/mcp/melta-ui/readme_

