UI Keeper
Audits React and JSX/TSX components for design system drift, component duplication, repeated inline JSX, conflicting Tailwind classes, and accessibility/contrast violations, providing automated fixes.
Detects the presence of shadcn/ui component libraries and prevents agents from rebuilding custom modal, dialog, or sheet components, encouraging reuse of existing catalog components.
Extracts design tokens from Tailwind CSS v3 and v4 configurations (including @theme, @utility), enforces the 4px spacing grid, and detects and optimizes conflicting or arbitrary Tailwind utility classes.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@UI Keeperaudit src/components/Button.tsx for UI quality issues"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
UI Keeper
The local-first frontend quality and verification layer for AI coding agents (Cursor, OpenCode, Claude Code, Windsurf, Codex).
Read the Complete Usage & Setup Guide (USAGE.md)
What is UI Keeper?
AI coding assistants generate React and Tailwind code rapidly, but frequently introduce silent frontend quality degradation:
Design System Drift: Hardcoding arbitrary colors (
#1e293b) or off-grid pixel values (p-[18px],m-[13px]) instead of adhering to project tokens.Component Duplication & Primitive Monoliths: Rebuilding raw primitive tags (
<button className="...">,<input ...>) rather than reusing existing catalog components (e.g.Button,Input,Dialog).Repeated Inline JSX: Copy-pasting complex composite JSX structures (e.g., status badges or metric cards) instead of extracting reusable components.
Tailwind Class Bloat & Conflicts: Adding contradictory classes (
flex block,text-left text-center,p-4 px-6).Accessibility & Contrast Violations: Low-contrast text combinations failing WCAG 2.1 AA ($< 4.5:1$), unlabelled inputs, or missing image alt attributes.
UI Keeper solves this by providing a comprehensive static analysis, design token extraction, component discovery, and automated verification layer accessible via the Model Context Protocol (MCP) and a high-performance CLI.
Related MCP server: vibecraft-mcp
Key Capabilities
graph TD
Agent[AI Agent: Cursor / OpenCode / Claude] -->|MCP JSON-RPC| UIKeeper[UI Keeper Engine]
UIKeeper -->|Extract| DS[Design Tokens & Catalog]
UIKeeper -->|Analyze| AST[TypeScript AST Scanner]
AST -->|Audit| Rules[7 Static UI Quality Rules]
Rules -->|Verify| Loop[Detect -> Fix -> Re-audit Loop]
Loop -->|Report| Score[UI Health Score: 0-100%]1. Dynamic Design Token & Theme Extractor
Discovers and extracts tokens across CSS files (
globals.css,token.css,theme.css).Full support for Tailwind CSS v3 (
tailwind.config.ts/js) and Tailwind CSS v4 (@import "tailwindcss",@theme,@utility,@plugin).Extracts colors (hex, rgb, hsl, oklch), 4px spacing scale, typography, radii, shadows, and breakpoints.
2. Component Catalog Scanner
Scans
.tsx/.jsxfiles acrosscomponents/,src/components/,app/components/,ui/,src/ui/.Extracts exported component names, prop types, variants, and categories (
button,card,input,modal,navigation,layout,feedback,typography).Prevents agents from reinventing already existing components.
3. 7 Built-in Static UI Quality Rules
Rule ID | Name | Description |
| No Hardcoded Colors | Flags raw hex/rgb/hsl strings and maps them to nearest design system color tokens. |
| Strict 4px Spacing Grid | Enforces the 4px base spacing scale. Converts rems, checks radii, and fixes brackets (e.g. |
| No Duplicate Components | Detects raw primitive tags when a matching catalog component exists. |
| Repeated JSX Detector | Identifies identical monolithic JSX structural patterns repeated 2+ times and recommends extraction. |
| Class Conflict Optimizer | Detects contradictory Tailwind layout, typography, or spacing classes and prunes redundancy. |
| WCAG Contrast Checker | Calculates static relative luminance and flags contrast ratios failing WCAG AA ($< 4.5:1$). |
| Library Component Guard | Prevents building custom modal/dialog/sheet code when libraries like |
4. Auto-Fix with Verification Loop
Applies automated fixes and immediately verifies them:
Detect: Audits the file and records baseline issue count.
Fix: Applies high-confidence token substitutions and class optimizations.
Re-audit: Re-analyzes the modified file.
Decision: Keeps changes only if total issues decrease; automatically reverts on regression.
5. UI Health Score (0-100%) & Letter Grade
Calculates a weighted UI Health Score:
Token Adoption (35%): Adherence to colors, radii, and 4px spacing grid.
Component Reuse (35%): Catalog usage and absence of monolithic JSX duplicates.
Code Cleanliness (30%): Absence of class conflicts and WCAG contrast violations.
Outputs an overall score with letter grade (
A+,A,B,C,D,F) and actionable recommendations.
Available MCP Tools
UI Keeper exposes 10 standardized MCP tools compatible with any MCP client:
Tool Name | Scope | Description | Key Parameters |
| Local / Project | Extracts design tokens (colors, spacing, typography, radius, shadows, breakpoints). |
|
| Local / Project | Returns complete project UI model (framework, styling engine, tokens, catalog, routes). |
|
| Local / Project | Audits target files/directories against design system rules with issue locations and fixes. |
|
| Edge / Remote | Audits raw TSX/JSX source code directly without requiring local disk access. |
|
| Edge / Remote | Parses tokens directly from raw CSS string content (e.g. from |
|
| Local / Project | Returns comprehensive 0-100% UI health score, letter grade, and recommendations. |
|
| Any | Generates production-ready, typed, token-compliant React component code. |
|
| Local / Project | Searches existing catalog components by keyword or category to avoid duplicate code. |
|
| Any | Finds the exact or closest matching design token for a given color or spacing value. |
|
| Local / Project | Applies automated fixes and verifies improvement using the verification loop. |
|
Monorepo Architecture
The repository is structured as a modular TypeScript monorepo:
ui-keeper/
├── packages/
│ ├── core/ # @ui-keeper/core (Domain schemas, AST scanners, token parsers, 7 audit rules, auto-fix loop)
│ ├── cli/ # @ui-keeper/cli (Command-line tool: init, analyze, audit, fix, score, generate, hook)
│ └── local-mcp/ # @ui-keeper/local-mcp (Local Stdio MCP server for direct filesystem access)
└── apps/
└── remote-mcp/ # @ui-keeper/remote-mcp (Cloudflare Workers edge MCP server built with Hono)Getting Started & Usage
For full step-by-step installation, client configuration (OpenCode, Cursor, Claude, Windsurf), CLI references, and Git pre-commit hook setups, read USAGE.md.
This server cannot be deployed
Maintenance
Related MCP Connectors
Run accessibility, contrast, and design token audits and file QA issues from your AI coding tool.
Live React design-system APIs, patterns, and code validation so AI agents build real UI, not slop.
On-demand drift checks: declared CSS color, radius, spacing & type vs your own tokens or a pack
Lints + auto-fixes how AI coding agents discover any new product. 24 rules, 6 tools, score 0-100.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceDesign review for UI code, inside your coding agent. Reviews React, Vue, Svelte, CSS and SwiftUI against 313 rules and returns scored findings with file:line fixes your agent can apply and verify.MIT
- AlicenseAqualityCmaintenanceProvides deterministic UI/UX intelligence and systems performance auditing tools for AI coding agents, enabling generation of accessible, well-designed React/Tailwind interfaces and elimination of backend anti-patterns like N+1 queries and sequential waterfalls.7MIT
- AlicenseNot gradedqualityBmaintenanceEnables coding agents and CI to verify rendered web UIs against design token usage, layout constraints, and accessibility rules, returning concise pass/fail verdicts with actionable findings.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI coding assistants to inspect frontend projects, search a curated design and motion recipe catalog, prepare and preview structured design plans, apply changes with backups and rollback, capture previews, audit UI accessibility and performance, and monitor activity via a web dashboard.9 npmMIT