The drift check for AI-built apps.
swatchdog is a free MCP tool your agent calls on its own UI code. It checks every color, radius, spacing, font and type value against your design tokens and returns the exact token to use instead.
Free. No account, no key, nothing to buy.
In Claude: Settings → Connectors → find swatchdog in the connector directory → Connect.
Claude Code:
claude mcp add --transport http swatchdog https://mcp.swatchdog.dev/mcp
Any MCP client (Cursor, Claude Desktop and others):
{
"mcpServers": {
"swatchdog": {
"type": "http",
"url": "https://mcp.swatchdog.dev/mcp"
}
}
}No headers and no auth. Leave them empty.
- Your agent gets your design tokens: from your Tailwind config, CSS variables, or tokens you approve.
- After it writes UI code, it calls
check_design_driftwith those tokens and the code. - swatchdog returns every off-token value, with the token to use instead.
- Your agent fixes them and checks again until nothing is left.
swatchdog reports drift. It never edits your code. The fixing, and the review, stay with your agent and you.
Why not just a linter? A linter checks that code is valid. color: #ff00ff is valid CSS, so a linter passes it, even when magenta isn't in your palette. swatchdog catches exactly that.
Why not just give the agent the tokens? You should, and it will still drift. Agents round and interpolate even with the rules in front of them. swatchdog checks the result where the drift happens.
check_design_drift (read-only)
reference_tokens(object, required): your design tokens, for example{"color":{"primary":"#b06ed0"},"radius":{"md":"6px"}}code(string, required): the UI code to check
It reads CSS and SCSS declarations, inline styles, and Tailwind arbitrary values such as p-[13px] and text-[#b06ed0]. It reads declared styles and tokens, not pixels.
For each violation it returns the axis (color, radius, spacing, font or type), the value found, the expected token and its value, and where it was found.
Example result:
{
"ok": false,
"count": 2,
"violations": [
{ "axis": "color", "found": "#ff00ff", "at": "content:1", "expected": "color.primary", "expectedValue": "#b06ed0" },
{ "axis": "radius", "found": "9px", "at": "content:1", "expected": "radius.md", "expectedValue": "6px" }
]
}Code is limited to 262,144 characters per call. For larger changes, check the changed files or components one at a time.
swatchdog doesn't store the code or design tokens you check. They're processed to produce the result and then dropped. Full policy: swatchdog.dev/privacy.html.
Made by swatchdog.dev · hey@swatchdog.dev · a Ziola project