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 分

    請在儲存庫或註冊中心條目中宣告授權條款。