# validator [Health: Active]

**Category:** 📐 Architecture & Design  
**Repository:** https://github.com/swatchdog-dev/swatchdog-mcp  
**GitHub Stars:** 6  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/validator

## Description
On-demand MCP drift checks: declared CSS color, radius, spacing & type tokens vs a chosen pack.

## Tools
Capabilities this server exposes over MCP:

- **check_design_drift** — Checks candidate UI code against a reference design-token set and returns a compact, structured list of drift violations. For each: the token axis (color / radius / spacing / font / type), the value found, the expected token and its value, and the location. It reads DECLARED styles and tokens, not pixels. It is stateless (the tokens and code are passed in the call; nothing is stored) and read-only (it reports drift; it does not modify your code).
Inputs: reference_tokens — the user's design system as {color:{name:hex}, radius:{name:val}, space:{name:val}, font:{name:stack}, type:{role:{size}}}; code — the CSS/markup to check; optional source ('css' or 'tailwind').
Recommended use: after you generate UI code against a design system the user has agreed to (they pasted tokens, or approved one you proposed, or described one you composed), call this before presenting the result; if violations come back, fix them and re-check until clean. The build-and-fix loop is yours; swatchdog is the instrument.

## Claude Desktop Quick Installation
Remote MCP endpoint (confidence: high). Install path detected from listing signals. Add as a URL/SSE server in your client:

```json
"mcpServers": {
  "validator": {
    "url": "https://swatchdog-connector-970396648818.us-central1.run.app/mcp"
  }
}
```

## Documentation

## What validator MCP server does

The validator MCP server, provided by Swatchdog, checks CSS or markup for drift from a defined design system. It covers color, radius, spacing, font-size, and font-family values, then reports each violation with the detected value, the relevant design axis, its location, and a suggested token and value.

You can compare code with a curated Swatchdog pack or provide your own token object. Pack mode includes the Studio sandbox and the Workbench, Showcase, and Terminal families. BYO mode is intended for a project’s own design system, such as tokens extracted from CSS variables or a Tailwind configuration.

The validator MCP server is a checker rather than a code transformer. It does not intercept writes or apply fixes; an agent or developer decides whether to make the suggested changes.

## How it works

The main `check_drift` endpoint accepts the code to inspect through `content`. An optional `paletteId` selects a pack, while `tokens` supplies a custom token set. The optional `source` value can identify the request as coming from a pack, CSS, or Tailwind workflow.

The connector-oriented `check_design_drift` endpoint accepts required `code` and `reference_tokens` parameters. Its response lists violations and suggested replacements. Both endpoints process requests on demand and transiently. The service does not store source code, files, or tokens; it records limited usage metadata such as the source tag, selected pack, and finding count.

Suggestions map values to nearby valid tokens. For example, an off-scale radius can be matched to a radius token, while a color can be compared with theme colors. Current color checks cover hex and standard color formats. HSL-channel representations and complex multi-file token resolution are not currently covered.

## Setup and configuration

In Claude, connect through Settings → Connectors by searching for Swatchdog. No URL or key is required for that directory connection.

Other MCP clients can use the connector endpoint at `https://swatchdog-connector-970396648818.us-central1.run.app/mcp`. This route is BYO-only and can be configured without authentication, though unauthenticated use is rate capped.

The main endpoint is `https://swatchdog-mcp-970396648818.us-central1.run.app/mcp`. Configure it with bearer authentication, such as the free `swt_sandbox_studio` key for Studio pack checks. The connector can also be added manually to claude.ai as a custom connector with authentication left empty.

## Tools and capabilities

- `check_design_drift`: checks supplied code against the required `reference_tokens` object.
- `check_drift`: checks content against a selected pack or custom `tokens` object.
- Pack mode: uses a Swatchdog family selected with `paletteId`.
- BYO mode: accepts project-specific tokens and is stateless.
- Drift suggestions: identifies nearby replacements for colors, radii, spacing, font sizes, and font families.

The main endpoint supports a free Studio sandbox key. BYO requests are available on a keyless, shared connector lane with rate limits, or through a paid license with uncapped usage. Premium pack and bundle access requires a paid key. The listed pricing is one-time rather than subscription-based.

## Limitations and notes

The validator MCP server reports drift but does not edit files or enforce checks before writes. A coding agent or developer must apply any recommended changes. Free main-endpoint requests for premium packs or BYO checks return a structured upgrade response instead of performing the requested check.

The material names Claude Code, Claude Desktop, Cursor, Google Antigravity, and claude.ai as supported connection contexts. The connector and main endpoint examples use HTTP MCP configuration rather than a locally installed process.

_Full upstream README: https://allmcps.com/mcp/validator/readme_

