designfit
designfit is an MCP server that extracts Figma design specs and validates rendered front-ends against them using deterministic token and geometry checks.
Extract a design spec from a Figma frame via a Figma link,
fileKey+nodeId, or pasted/nodesJSON (requiresFIGMA_TOKEN), with optionalmaxDepth; returnsdesign,componentMap, andviewport.Validate a running front-end URL against the extracted design: tag elements with
data-designfit-id, supplyviewport,design,componentMap, and optionaltolerances; returnspass,score,violations, andunmapped.Check design tokens (fill, color, opacity, fontSize, fontFamily, fontWeight, lineHeight, borderColor, borderWidth, borderRadius, letterSpacing) and geometry (x, y, w, h relative to root) plus element presence.
Support a fidelity loop: extract → build/tag → validate → fix → repeat until
pass.Run as a Claude Code plugin/skill or any MCP client; v1 handles one viewport.
Validates AI-built front-ends against Figma designs by extracting design tokens, component mappings, and geometry from Figma frames, then returning deterministic token, geometry, and presence violations with a pass/fail score.
designfit
Validate AI-built front-ends against their Figma design — without the screenshot-diff thrash.
https://github.com/user-attachments/assets/01df52c9-90eb-4abc-b56c-fe18b31076cd
A real run on a 360-node Figma frame: designfit_extract reads the frame from its link, then designfit_validate scores three build iterations, 87 to 89 to 100 pass. No screenshot diffing anywhere in it.
designfit is an MCP server + Claude Code skill that checks a rendered implementation against its Figma design and hands the coding agent a machine-actionable fix-list. It compares design tokens and geometry (element boxes relative to the screen root) — not raw pixels — so font-rendering noise never makes the agent oscillate. Deterministic in, deterministic out.
Why geometry, not pixels
Screenshot-diffing an AI-built UI against a Figma frame thrashes: anti-aliasing and sub-pixel shifts read as "still wrong," so the agent fixes forever. designfit compares what a designer actually catches — wrong colors, wrong sizes, misalignment, missing elements — as deterministic measurements with explicit tolerances. Same input, same output, no oscillation.
The long version: Why screenshot-diffing AI-built UIs thrashes, and how geometry fixes it.
Related MCP server: Figma Console MCP Server
Install
Claude Code — as a plugin:
/plugin marketplace add as9978/designfit
/plugin install designfit@designfitThen once, to fetch the browser the measurement engine drives:
npx playwright install chromiumThe plugin registers the designfit_extract and designfit_validate MCP tools and the designfit-fidelity-loop skill together, and asks once for a Figma personal access token (optional: without it, extract accepts pasted /nodes JSON).
Any other MCP client — manually:
npm install -g designfit
npx playwright install chromium{ "mcpServers": { "designfit": { "command": "designfit", "env": { "FIGMA_TOKEN": "<token>" } } } }Windows: some MCP clients can't spawn a bare
designfit(it resolves todesignfit.cmd). Use{ "command": "npx", "args": ["-y", "designfit"] }, or point at the binary directly with{ "command": "node", "args": ["<absolute-path>/node_modules/designfit/dist/index.js"] }. The plugin install above already uses thenpxform, so it isn't affected.
Use
Ask your agent to implement a Figma frame and give it the frame's link. The designfit-fidelity-loop skill drives: designfit_extract → build → tag elements with data-designfit-id → designfit_validate → fix → repeat until pass → strip the tags.
If you installed the plugin, the skill is already registered. On a manual install it isn't: skills aren't auto-loaded from an npm dependency, so copy the one that ships at skill/SKILL.md into your agent's skills directory (for Claude Code: .claude/skills/designfit-fidelity-loop/SKILL.md) so it can be discovered.
Two tools:
designfit_extracttakes a Figma link ({ url }), or{ fileKey, nodeId }, or a pastedGET /v1/files/:key/nodesbody ({ nodes }), plus optionalmaxDepth, and returns{ design, componentMap, viewport }. Fetching needsFIGMA_TOKENin the MCP server's environment. Hidden nodes are skipped and a frame made only of vectors is one leaf.designfit_validatetakes{ url, viewport, design, componentMap, tolerances? }and returns{ pass, score, violations, unmapped }.
For a full walkthrough on a real Figma frame — the loop, a copy-paste prompt, and troubleshooting — see docs/validating-a-figma-frame.md.
v1 scope
One viewport. Token + geometry + presence checks. Responsive multi-breakpoint and a perceptual VLM fallback are on the roadmap, not in v1.
License
MIT
Available Tools
2 toolsdesignfit_extractExtract a design spec from FigmaA
Turn a Figma frame into the design spec designfit_validate expects. Give it a Figma link (https://www.figma.com/design//...?node-id=...), or fileKey + nodeId, and it fetches the node via Figma's REST API using the FIGMA_TOKEN env var; or paste the raw GET /v1/files/:key/nodes response as nodes and nothing is fetched. Returns { design, componentMap, viewport }: add url and call designfit_validate. Deterministic. Hidden nodes are skipped; a frame made only of vectors is one leaf (an icon). maxDepth limits how deep to go.
Inputs: url, nodes, nodeId, fileKey, +1 more.
designfit_validateValidate design fidelityA
Validate a rendered front-end against its Figma design. Tag each built element with data-designfit-id="", pass the design spec (geometry + tokens, from designfit_extract or relayed from Figma's MCP), the running URL, and the component map. Returns a fidelity score and a machine-actionable fix-list of token, geometry, and presence violations.
Inputs: url (required), design (required), viewport (required), componentMap (required), +1 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 2 tools
The two tools have clearly distinct roles: designfit_extract produces the design spec from a Figma frame, while designfit_validate consumes that spec to check a rendered page. Their descriptions explicitly chain them (extract → validate), leaving no ambiguity about which to call when.
Both tools follow the same `designfit_<verb>` pattern with snake_case, and the verbs (extract, validate) accurately describe each action.
Only two tools for the server's scope, which is borderline thin. The extract/validate pairing is well-chosen, but the surface is minimal and could justify helpers (e.g. token setup, batch validation).
The extract→validate pipeline fully covers the core workflow, from Figma frame to fidelity score and fix-list, including a way to bypass the REST fetch by passing raw nodes. Minor gaps exist around configuration/token setup and reporting, but agents can work around them.
Maintenance
Related MCP Connectors
Compare Figma designs against live websites and get visual + content QA reports, from inside Claude.
Run accessibility, contrast, and design token audits and file QA issues from your AI coding tool.
On-demand drift checks: declared CSS color, radius, spacing & type vs your own tokens or a pack
Build and manage your design system with AI: tokens, themes, components, icons, Figma and code.
Related MCP Servers
- AlicenseAqualityDmaintenanceConverts Figma designs into structured code context with token-aware styling, enabling AI agents to generate production-level frontend code.18 npmMIT
- AlicenseNot gradedqualityBmaintenanceBridges AI assistants with Figma for design system extraction, bidirectional token sync, visual debugging, and design creation.154 npm1MIT
- AlicenseNot gradedqualityDmaintenanceVerifies that AI-generated UI code matches Figma design specs by rendering components in a real browser, comparing computed CSS, and returning patch-ready fixes with scored parity reports.MIT
- AlicenseNot gradedqualityDmaintenanceDeterministic screenshot diffing for AI coding agents. Extract design tokens, diff implementations vs reference, get CSS fix suggestions.90 npm6MIT