
Kiyas
io.github.saiffmirza由 GitHub 帳號 saiffmirza 發布v1.4.0更新於 Oct 24, 2026
AI design fidelity — compare Figma designs or screenshots against rendered UI. No API keys.
概覽
將 Figma 設計稿或設計截圖與已渲染的 UI 元件進行比對,並回傳 AI 產生的視覺差異清單。
- 可以做什麼
- Kiyas 執行設計還原度比對:取得設計圖(從 Figma 連結匯出或使用本機圖片),在程式碼庫中找出對應元件,以無頭 Chromium 截圖,再把兩張圖片交給視覺模型做語意差異分析。它提供三個 MCP 工具:compare(執行比對並回傳 reportId 與摘要)、get_diff_report(以 HTML 或 JSON 取得已儲存的報告)、list_issues(列出差異,可依嚴重程度篩選)。報告會存放在專案目錄下的 .kiyas/reports/ /。
- 適用情境
- 適合讓助理檢查已實作的介面是否與設計稿一致,並取得具體可讀的意見,例如 border-radius 或間距數值不一致。適用於元件能在本機開發伺服器上存取的前端工作流程,也可作為 CLI 或 macOS 桌面應用程式執行。
- 執行需求
- 透過 npx 執行的本機程序(npm 套件 kiyas-cli);需要 Node.js 20+ 並安裝 Playwright Chromium。AI 呼叫會交由 Claude Code CLI(需已登入的 Pro、Max 或 Team 訂閱)或供 OpenAI 使用的 Codex CLI 處理。只有在與 Figma 連結比對時,才需要具備 File content 唯讀權限的 Figma 個人存取權杖;截圖比對不需要權杖。實作截圖需要一個開發伺服器或可存取的 URL。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Kiyas,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
AI-Powered Design Fidelity — MCP Server & CLI
"comparison" — pronounced "key-AHS"
A developer-first MCP server (also runnable as a CLI) that compares Figma designs against rendered UI components and surfaces an AI-powered semantic diff. Plugs into Claude Code, Cursor, Codex CLI, and any other MCP-compatible client.
Unlike pixel-diff tools, kiyas uses vision AI to understand what is different and why it matters — outputting actionable, human-readable feedback like:
- "border-radius is 8px in implementation but 12px in design"
- "spacing between title and subtitle is 16px tighter than the design"
Just describe the component by name. kiyas finds it in your codebase, screenshots it, and compares it against the Figma design.
Prefer an app over a terminal? There's also a desktop app.
Desktop App
A native macOS app for running the same comparisons point-and-click — built for designers and anyone who'd rather not touch a terminal. Pick a project, paste a Figma link (or drop in a screenshot), describe the component, and get the full report in-app. It uses the same engine and the same subscription-based auth: AI calls go through the Claude Code or Codex CLI on your machine, never an API key.
⬇ Download the latest release (Apple Silicon)
- Download the
.dmg, drag Kiyas to Applications. - Preview builds aren't notarized yet — on first launch, right-click → Open (or run
xattr -dr com.apple.quarantine /Applications/Kiyas.app). - Sign in to Claude Code or Codex in any terminal once; the app picks it up from there.
Highlights: project sidebar with dev-server detection, capture preview + crop before comparing, built-in terminal, full dark mode, and a Liquid Glass icon on macOS 26.
To build from source instead:
How It Works
Step-by-step:
- Authenticate — kiyas delegates AI calls to the Claude Code or Codex CLI. Your existing subscription handles everything — no API keys needed.
- Get the design image — Parses the Figma URL, calls the Figma REST API to export the frame as a PNG (at the same scale as the screenshot — adaptive, see
--scale), and fetches node metadata (colors, fonts, spacing). Or skip Figma entirely: pass--design <path-or-url>with your own design image and no Figma token is needed. - Resolve component — An AI agent scans your codebase (file tree, routes, components) and maps your natural-language description to a URL on your dev server + a CSS selector.
- Screenshot implementation — Playwright launches headless Chromium, navigates to the resolved URL, and captures the component.
- AI comparison — Both PNGs are passed to the Claude Code CLI with a structured prompt. The AI identifies every discrepancy with specific CSS properties and values.
- Report — Results are formatted into an HTML report with side-by-side image comparison, severity badges, and interactive filters. A file link is printed to the terminal for easy access.
Use as an MCP Server
kiyas exposes its comparison engine as an MCP server over stdio. Three tools, all with Zod-typed input schemas:
Reports are persisted under .kiyas/reports/<reportId>/ in your project directory, so the same reportId stays valid across calls and across CLI/MCP usage.
Install
Wire it up
Claude Code
kiyas is also listed in the official MCP Registry as io.github.saiffmirza/kiyas, so registry-aware clients can install it directly from their MCP catalog.
Cursor — edit ~/.cursor/mcp.json:
Codex CLI — edit ~/.codex/config.toml:
Staying up to date
The configs above use kiyas-cli@latest so npx picks up new releases on every launch — the tradeoff is a registry check per start, and launches can fail offline. If you'd rather pin a version ([email protected]) or use a global install, that's safe too: kiyas checks npm once at startup (non-blocking) and logs a notice to stderr when a newer version is available.
Figma access for MCP users
The compare tool needs Figma access only when you pass a figma URL. Three ways to provide it:
1. Pass your token via the server config (recommended):
or in .mcp.json / mcp.json / config.toml, add an env block:
2. A .kiyasrc file in the project root or home directory: { "figmaAccessToken": "..." }
3. No token at all — pair with the Figma MCP server. If the agent already has Figma's own MCP server connected, it can export the frame as an image itself and pass the file path (or image URL) as designImage instead of a figma URL. kiyas never touches the Figma API in this mode:
Export node 1:234 from the Figma file as a PNG, then use kiyas to compare it against the primary button on the login page.
If a figma URL is used with no token configured, the tool fails fast with these instructions rather than hanging.
Once connected, you can ask the agent things like:
Compare the Figma frame at
<url>against the primary button on the login page, then list only the high-severity issues.
The agent will call compare to produce a reportId, then list_issues with severity: "high" against that ID.
Quick Start (CLI)
Prerequisites
- Node.js 20+
- Claude Code installed and signed in (Pro, Max, or Team subscription), or Codex for OpenAI
- A Figma personal access token (generate one here) — only needed for
--figma; comparing against a local screenshot with--designrequires no token
Install
Setup
This walks you through:
- Figma token — creates a read-only personal access token and saves it to
.env - AI provider — checks for Claude Code or Codex and sets the default
Run
CLI Reference
*Provide either --component or --target. When using --component, kiyas uses AI to find the component in your codebase and resolve it to a URL.
**Provide either --figma or --design. With --design, the Figma export is skipped entirely and no Figma token is required.
Authenticated screenshots
Most real designs live behind a login. kiyas accepts a Playwright storageState JSON file (cookies + localStorage) and reuses it for the screenshot session — the same format Playwright tests use, so any auth-state file your tests already produce works as-is.
The MCP compare tool exposes the same option as authState — pass the path and the agent screenshots authenticated views with no further setup.
Authentication
kiyas leverages your existing AI subscriptions — no separate API keys needed. It delegates all AI calls to the Claude Code or Codex CLI, which handle their own authentication.
Claude (default): Requires Claude Code installed and signed in with a Pro, Max, or Team subscription. kiyas spawns the claude CLI for AI calls, so usage counts against your existing subscription quota.
OpenAI (alternative): Requires Codex installed and signed in. Use --model openai to select it.
If no CLI is found, kiyas prompts you to install and sign in:
Figma: Requires a personal access token with File content → Read only scope. Run kiyas setup to configure it, or set FIGMA_ACCESS_TOKEN in .env manually.
Accuracy & Reproducibility
kiyas is a harness around vision AI, and a harness is only useful if its results are consistent. What it controls:
- Pinned models — the comparison and resolver models are pinned (
claude --model/codex -m) instead of drifting with CLI defaults. Configure withkiyas set claudeModel <id>/kiyas set codexModel <id>. - Isolated AI context — comparisons run in an empty working directory so your project's
CLAUDE.md/AGENTS.md, hooks, and MCP servers can't influence the output. - Frozen capture environment — animations and transitions disabled, fonts awaited, UTC timezone, fixed locale, full-page screenshots, and the Figma export scale always matches the screenshot's device scale factor. Component-sized captures default to 2x — measured on the eval set, that raised subtle-mutation recall from 75% to 90%.
- Validated output — model responses are schema-validated (malformed findings are dropped with a warning; a majority-invalid response fails the run instead of producing a quietly wrong report).
- Run manifest — every report's JSON records the viewport, scale, threshold, pinned model, CLI version, prompt version hash, and how a
--componentdescription was resolved, so any two reports can be meaningfully compared. - Multi-run voting —
--runs 3runs the comparison three times concurrently and keeps only majority-vote findings, each tagged with a confidence score. Higher consistency at N× cost; off by default. - Measured, not vibed —
npm run eval(repo only, not shipped) runs a golden eval set: fixture pages with known injected CSS mutations plus zero-mutation pairs, scored deterministically for recall, precision, severity agreement, false-positive floor, and run-to-run stability. Prompt and pipeline changes are validated against it.
Config File
For teams running repeated comparisons, create a kiyas.config.json:
The target field accepts both component descriptions (resolved by AI) and direct URLs. Each comparison takes either figma (a URL) or design (a local image path) as its design source. Run with:
Project Structure
Tech Stack
License
MIT
來源:README.md,提交 4b43708
工具
0版本歷史
1- v1.4.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分