# one-shot-ui [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/TN0123/one-shot-ui  
**GitHub Stars:** 6  
**npm Downloads (last month):** 464  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/one-shot-ui

## Description
Deterministic UI extraction and screenshot diffing for AI coding agents.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "one-shot-ui": {
    "command": "npx",
    "args": ["-y","one-shot-ui"]
  }
}
```

## Documentation

## What one-shot-ui MCP server does

The one-shot-ui MCP server exposes deterministic UI inspection and comparison tools through MCP. It analyzes a reference screenshot, captures an implementation when needed, and reports differences in pixels and structure. Results can identify changes to position, dimensions, colors, shadows, spacing, typography, missing elements, and text visibility.

The server is intended for AI coding agents working on web interfaces. Instead of asking an agent to judge whether two screens look similar, it provides measured differences and concrete CSS-oriented corrections. It can also extract a reusable design language from a screenshot, including a palette, spacing scale, type ratio, radii, and elevation information. A separate style check can compare a different screen against that language.

## How it works

The analysis flow begins with `extract`, which segments a reference image into layout regions, samples colors and design tokens, and uses OCR to identify text. Browser-dependent operations use Playwright to capture a URL or local HTML file at a matching viewport. `compare` then aligns the images and produces both a pixel heatmap and a structural diff, classifying issues such as layout, color, typography, and spacing.

`suggest_fixes` converts detected issues into ranked CSS or Tailwind changes. `converge` tests candidate changes in a live browser and keeps changes that reduce pixel mismatch, while also calculating structural fidelity and reporting hidden or clipped reference text. The `run` command chains extraction, capture, comparison, and fixing across multiple passes until a configured threshold is reached. All commands support JSON output for agent use.

## Setup and configuration

Install the package globally with npm:

```sh
npm install -g one-shot-ui
```

Browser-based tools such as capture, converge, and run require Chromium from Playwright:

```sh
npx playwright install chromium
```

Start the one-shot-ui MCP server with stdio using:

```sh
claude mcp add one-shot-ui -- npx -y one-shot-ui mcp
```

Alternatively, add an MCP server entry with `npx` as the command and `-y one-shot-ui mcp` as its arguments. The one-shot-ui MCP server runs locally over stdio, makes no network calls, and does not require API keys. It also includes an `AGENTS.md` file for agent discovery and a Claude Code skill.

## Tools and capabilities

Available MCP tools include:

- `extract` for layout, color, and text data from screenshots.
- `compare` for pixel and structural differences.
- `suggest_fixes` for ranked CSS or Tailwind corrections.
- `converge` for verified CSS patches and structural fidelity checks.
- `tokens` for reusable style systems emitted as Shadcn, Tailwind, or JSON.
- `style_check` for checking a URL, HTML file, or screenshot against a reference style.
- `plan` for generating an implementation strategy.

The command-line package also provides `capture`, `run`, and `benchmark`. JSON output is available across commands, making results suitable for agent workflows and CI checks.

## Limitations and notes

Screenshot analysis cannot reliably determine every semantic design judgment. The tool reports measured facts rather than naming a color's role or classifying a design's mood. Roundedness and elevation are treated as advisories because raster images cannot always establish them precisely. Anti-aliasing and photographic content may be marked as irreducible differences, helping agents avoid chasing changes that cannot be fixed through CSS.

The server is local-only and requires a browser installation for commands that capture or iterate on live implementations. Its MCP interface is provided over stdio rather than a remote service.

_Full upstream README: https://allmcps.com/mcp/one-shot-ui/readme_

