Gridproof your UI β automated spacing & grid QA in the agent loop (MCP server).
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
GridProof your UI β automated spacing & grid QA in the agent loop.
GridProof is an MCP server that renders your running frontend with Playwright, measures the computed geometry of every element, checks it against a spacing/token rule set, and hands back a structured fix report β so a coding agent can close the loop itself: generate, audit, fix, re-audit.
AI coding agents are good at generating UI and bad at keeping it on a grid:
py-[13px] instead of py-3, sibling cards with three different gaps,
icons at 17px next to 24px. None of it breaks anything, so it ships β
because nothing in the agent loop checks for it. GridProof is that check.
The server never touches your source files. It measures a rendered page and points; the agent (which has your codebase open) makes the edit.
From a local checkout:
1. gp_audit β inside the agent loop. The agent calls this MCP tool
directly against your running dev server and gets back structured JSON
(violations + fix hints) to act on.
2. gp_report β MCP tool that also writes an HTML report. Same inputs as
gp_audit, plus it writes a self-contained, shareable HTML file to disk.
3. npx gridproof --report <url> β one-shot CLI. No MCP client needed;
useful for a quick manual check or scripting.
Four rules. All report warn by default β nothing blocks, nothing has
exit-code semantics. Suggest, don't forbid; the one exception is tap
targets, which error because it's an accessibility floor, not a style opinion.
| Rule | Detects | Severity | Example fix |
|---|---|---|---|
spacing-scale | Computed margin/padding/gap that isn't a multiple of the base unit (default 4px) and isn't an allowed value | warn | Snaps to the nearest valid value |
arbitrary-value | Off-scale arbitrary Tailwind classes | warn | py-[13px] β py-3 |
gap-consistency | Siblings in a flex/grid container spaced inconsistently when gap isn't set | warn | Set gap-4 on the container instead of per-child margins |
canonical-size | Icon/interactive-element sizes off the canonical scale, and interactive elements below the tap-target minimum | warn (icons) / error (tap targets) | Snap to canonical size; WCAG 2.5.8 |
GridProof is built for Tailwind projects β that's where all four rules apply,
since spacing-scale, arbitrary-value, and gap-consistency reason about
Tailwind's spacing scale and utility classes.
On a page it doesn't detect as Tailwind, it auto-falls-back to
accessibility-only checks: canonical-size still runs (tap targets, icon
sizes), the three Tailwind-specific rules are skipped, and the report says so
explicitly rather than silently under-reporting. You can force this with
assumeTailwind: false in config.
Optional gridproof.config.json at your project root (all fields optional;
defaults shown):
Inline suppression: data-gp-ignore (all rules) or
data-gp-ignore="spacing-scale gap-consistency" on any element skips its
subtree for those rules. Suppressed findings are counted, never listed.
Playwright renders the target page headless, a single in-page script walks the DOM and collects computed geometry (margins, padding, gap, rects), and the rule engine checks each value against your config and emits violations with selectors, actual/expected values, and fix hints. It's tuned against roughly 60 real-world sites to keep false positives low β a subpixel rounding tolerance, an allowed-values list, and severity defaults all come out of that calibration, not guesswork.
MIT β v0.1.0
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/gridproof)<a href="https://allmcps.com/mcp/gridproof"><img src="https://allmcps.com/api/badge/gridproof?style=directory" alt="Gridproof on AllMCPs" /></a>