GridProof

io.github.gridproofPublished by GitHub account gridproofv0.1.3Updated Oct 24, 2026

Gridproof your UI — automated spacing & grid QA in the agent loop (MCP server).

The publisher's own server: Proof Holdings

VerifiedSTDIODesktop onlyBrowser AutomationDeveloper Tools

Overview

AI-generated overview

Renders a running frontend page with Playwright and reports spacing, grid, and tap-target violations so a coding agent can fix UI layout.

What you can do
GridProof renders a target URL headless with Playwright, walks the DOM to collect computed geometry (margins, padding, gap, rects), and checks values against a spacing/token rule set. It exposes gp_audit, which returns structured JSON violations with selectors, actual/expected values, and fix hints, and gp_report, which does the same plus writes a self-contained HTML report to disk. Four rules run: spacing-scale, arbitrary-value, gap-consistency, and canonical-size. It measures and suggests only; it never edits source files.
When to use it
Use it when an agent is generating or refactoring Tailwind-based UI and you want an automated spacing and grid check inside the agent loop, so the agent can audit, edit, and re-audit. It also suits quick manual checks of a running dev server via the one-shot CLI. It is not a CI merge gate and does not analyze screenshots.
Requirements
Runs as a local stdio process on the user's machine (desktop only). Needs Node.js and the npm package gridproof, plus a one-time Playwright Chromium install of roughly 150MB. The target page must be reachable, typically a running local dev server. Optional gridproof.config.json at the project root. No authentication, accounts, API keys, or environment variables are declared.
Before you install
The server reads a rendered page and writes an HTML report file to disk when gp_report or the CLI report mode is used; choose the output path deliberately. It does not edit source files, so any code changes are made by the agent. It sends page content to no third party and declares no credentials. Findings are advisory by default; only tap-target violations are errors, and nothing fails a build.

Installation

In SourceWeft

  1. Open GridProof in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

GridProof

[npm version] [license]

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.

[GridProof HTML report showing spacing violations with fix hints]

The problem

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 loop

text
agent generates UI → gp_audit(url) → JSON violations with fix hints→ agent edits source → gp_audit(url) → clean report = done

The server never touches your source files. It measures a rendered page and points; the agent (which has your codebase open) makes the edit.

Quickstart

bash
# One-time: install the Chromium build Playwright uses (~150MB)npx playwright install chromium

Register in Claude Code

bash
claude mcp add gridproof -- npx -y gridproof

From a local checkout:

bash
npm install && npm run buildclaude mcp add gridproof -- node /absolute/path/to/gridproof/dist/index.js

Three ways to use it

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.

bash
npx gridproof --report http://localhost:5173# writes ./gridproof-report.html, prints its path
npx gridproof --report http://localhost:5173 --out ./qa/report.html --viewport 375x812

The rules

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.

RuleDetectsSeverityExample fix
spacing-scaleComputed margin/padding/gap that isn't a multiple of the base unit (default 4px) and isn't an allowed valuewarnSnaps to the nearest valid value
arbitrary-valueOff-scale arbitrary Tailwind classeswarnpy-[13px] → py-3
gap-consistencySiblings in a flex/grid container spaced inconsistently when gap isn't setwarnSet gap-4 on the container instead of per-child margins
canonical-sizeIcon/interactive-element sizes off the canonical scale, and interactive elements below the tap-target minimumwarn (icons) / error (tap targets)Snap to canonical size; WCAG 2.5.8

Tailwind, and non-Tailwind pages

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.

Configuration

Optional gridproof.config.json at your project root (all fields optional; defaults shown):

json
{  "baseUnit": 4,  "allowedValues": [1, 2],  "canonicalSizes": [12, 14, 16, 20, 24, 32, 40, 48],  "minTapTarget": 44,  "tapTargetBreakpoint": 768,  "iconTolerance": 2,  "assumeTailwind": "auto",  "rules": {    "spacing-scale": "warn",    "arbitrary-value": "warn",    "gap-consistency": "warn",    "canonical-size": "error"  },  "suppress": [    { "selector": ".hero-art *", "rules": ["spacing-scale"] },    { "value": "13px", "reason": "optical correction, logo lockup" }  ]}

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.

What it deliberately does NOT do

  • No computer vision / screenshot analysis. It reads computed geometry, not pixels. A screenshot is attached to the HTML report, not analyzed.
  • No CI runner. It's an in-loop tool for an agent, not a merge gate — no exit codes, nothing fails a build.
  • No source editing. The server measures and suggests; the agent (which has your codebase) makes the edits.
  • No auth, no SaaS, no billing. It's a local MCP server and a CLI.
  • Not yet (v2 candidates, not implemented): column-grid clustering, cross-breakpoint alignment drift, Figma token import.

How it works

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.

Development

bash
npm installnpm run build   # tsc → dist/npm test        # vitest (unit + Playwright integration)npm run dev     # run the server from TypeScript (tsx)

License

MIT — v0.1.0

Source: README.md at commit 7e57e4a

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.1.3LatestSep 16, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

Other Proof integrations