Validator

dev.swatchdog由 swatchdog.dev 发布v1.0.1更新于 Oct 24, 2026

On-demand drift checks: declared CSS color, radius, spacing & type vs your own tokens or a pack

已验证Streamable HTTP可网页运行开发者工具媒体与设计

概览

AI 生成的概览

Swatchdog 按需检查 AI 生成的 CSS 是否符合设计系统,列出偏离的颜色、圆角、间距和字体,并给出最接近的可用 token。

可以做什么
按需将 CSS 或标记与精选设计包或自有 token 集比对,返回每个偏离的颜色、圆角、间距、字号和字体值,并附上最接近的匹配 token 及位置。可直接传入自有 token 做 BYO 检查,或指定包 id 做零配置检查。检查为无状态、只报告:不拦截也不改写代码。
适用场景
适合 AI 编程助手生成样式后,需要确定性校验输出是否仍符合设计系统的场景,而不必依赖助手自觉遵守给定 token。适用于 Claude Code、Cursor 等 MCP 客户端的构建流程。
运行要求
远程 MCP 端点,使用 streamable HTTP;所列端点声明需要 OAuth。README 另述一个无需密钥的 connector 端点和需 bearer 密钥的主端点,包检查可用免费沙盒密钥,不限量的 BYO 与高级包需付费许可。无需本地运行时或环境变量。
安装前请注意
存在付费层级:不限量 BYO 检查许可 12 美元,高级包 19/49 美元,主端点上的免费调用会收到升级提示。README 称不存储代码与 token、仅记录少量使用元数据,但 CSS 与 token 集仍会发送到第三方服务。检查只报告偏差,不会修改代码。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Validator,将其添加到工作区。
  2. 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/dev.swatchdog%2Fvalidator/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。

{
  "mcpServers": {
    "validator": {
      "type": "http",
      "url": "https://swatchdog-mcp-970396648818.us-central1.run.app/mcp"
    }
  }
}

README

Swatchdog MCP Server

Give your AI agent a visual system to build against — so it writes brand-consistent styles instead of guessing colors, radii, spacing, and type.

✅ Now in the Anthropic Connector Directory. In Claude, open Settings → Connectors, search swatchdog, and click Connect — no URL, no key, no setup.


See it in action

https://github.com/user-attachments/assets/6ae8b242-d6c7-4a29-8892-27b067835308


What it is

Swatchdog is a Model Context Protocol (MCP) server that runs on-demand design-token drift checks for AI coding assistants — Claude Code, Claude Desktop, Cursor, Google Antigravity, other MCP clients, and claude.ai via the connector.

When your agent asks, Swatchdog checks the generated CSS against a design system — a curated pack or your own tokens — and returns every off-token color, radius, spacing, and type value, each with the closest matching token to use instead. The check is on-demand and the loop is yours: Swatchdog reports drift; it never intercepts writes or changes your code.


Why Swatchdog

AI agents are fast but blind to your design system — they invent off-brand spacing, off-palette colors, and quietly ignore your scales. Swatchdog adds a deterministic drift check to the build loop:

  1. The agent sets a standard — your own tokens, or a pack.
  2. It calls Swatchdog on the CSS it generated.
  3. Swatchdog returns precise fixes (e.g. "use radius.sm (5px) instead of 7px").
  4. The agent applies them. The loop, and the review, stay yours.

How is it different from a linter like ESLint? A linter checks whether your code is valid; Swatchdog checks whether your design is on-system. A linter happily passes color: #ff00ff because it's valid CSS — it has no idea magenta isn't in your palette. Swatchdog catches exactly that, even when the code is flawless. Lint catches broken code; Swatchdog catches broken design.

Can't I just give my agent the tokens, or a design.md? You can, and it'll still drift. Agents approximate and interpolate even with the rules right in front of them — having the rules isn't the same as following them. Swatchdog verifies conformance in the build loop, where the drift actually happens.


Modes

Pack mode — check against a curated Swatchdog family (Workbench, Showcase, Terminal, plus the free Studio sandbox). Zero-config.

BYO mode — check against your own design system. The agent extracts your tokens (from tailwind.config.js, CSS variables, etc.) and passes them as parameters. Content-only and stateless — your code and tokens are never stored. Free to try on the keyless connector lane, or uncapped with a $12 license.

Intelligent suggestions — Swatchdog doesn't just flag drift, it maps each off-token value to the nearest valid token: color (hex/rgb → nearest theme color), radius, spacing, font-size, and font-family.

Coverage note: checks currently cover hex and standard color formats. HSL-channel representation and complex multi-file token resolution are on the Phase 2 roadmap.


Tools

check_design_drift — connector endpoint · BYO-only · keyless-friendly

  • reference_tokens (object, required) — your design tokens, e.g. {"color":{"primary":"#b06ed0"},"radius":{"md":"6px"}}
  • code (string, required) — the CSS/markup to check
  • Returns, per violation: axis · found value · expected token + value · location

check_drift — main endpoint · checks CSS against a pack or a custom token set

  • content (string, required) — the CSS/markup to check
  • paletteId (string, optional) — a pack id (e.g. studio-blue-hour); pack mode
  • tokens (object, optional) — your own token set; BYO mode
  • source (string, optional) — telemetry tag (pack, css, tailwind)

Pricing — one-time, no subscriptions

TierWhat you getWhere
Free — keylessBYO checks on a shared, rate-capped laneconnector endpoint
Free — sandbox key swt_sandbox_studiopack checks vs the Studio familymain endpoint
$12 — drift-check licenseBYO checks, your own uncapped keyboth endpoints
$19 / $49 — pack or bundlepremium families (Workbench · Showcase · Terminal) + a paid keyboth endpoints

On the main endpoint, a free caller attempting a premium or BYO check gets a structured upgrade payload pointing to swatchdog.dev.


Connect

In Claude (easiest): Settings → Connectors → find swatchdog in the directory → Connect. Nothing to paste, no key.

Other MCP clients (Cursor, Claude Code, Claude Desktop) — add one of these to your MCP config:

Connector endpoint — BYO-only, keyless (add a key to remove the rate cap):

json
{  "mcpServers": {    "swatchdog-check": {      "type": "http",      "url": "https://swatchdog-connector-970396648818.us-central1.run.app/mcp"    }  }}

Main endpoint — packs + BYO, bearer key (free sandbox key shown):

json
{  "mcpServers": {    "swatchdog-sandbox": {      "type": "http",      "url": "https://swatchdog-mcp-970396648818.us-central1.run.app/mcp",      "headers": { "Authorization": "Bearer swt_sandbox_studio" }    }  }}

Prefer to add the connector to claude.ai manually? Settings → Connectors → Add custom connector → paste the connector URL above → leave auth empty.


Privacy

All checks are on-demand and transient. No source code, files, or tokens are ever stored on our servers. We log only minimal usage metadata — a source tag, which pack, and the finding count — never your license key, your code, or your tokens. Full policy: swatchdog.dev/privacy.html.


Created and maintained by swatchdog.dev · Support: [email protected] · A Ziola Project

来源:README.md,提交 6fc6815

工具

0
该服务器需要 API 密钥等凭据,因此 SourceWeft 无法在没有凭据的情况下读取其工具,也未收录。

版本历史

1
  1. v1.0.1最新Sep 16, 2026

评分

已满足适用检查项的 75%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。