UI Loop logo

UI Loop

Captures local web UIs and returns token-bounded summaries, diffs, crops, and assertions for coding agents.

Install UI Loop

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "djignesh21-ui-loop": {
      "command": "npx",
      "args": [
        "-y",
        "@djignesh21/ui-loop@0.1.2"
      ],
      "env": {
        "UI_LOOP_CHROMIUM": "YOUR_VALUE_HERE",
        "UI_LOOP_URL": "YOUR_VALUE_HERE",
        "UI_LOOP_ROUTE": "YOUR_VALUE_HERE",
        "UI_LOOP_MAX_TOKENS": "YOUR_VALUE_HERE",
        "UI_LOOP_KEEP": "YOUR_VALUE_HERE",
        "UI_LOOP_MAX_CROP_SIDE": "YOUR_VALUE_HERE",
        "UI_LOOP_TIMEOUT_MS": "YOUR_VALUE_HERE",
        "UI_LOOP_HOOK_DISABLED": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

Automated check passed— started and listed 7 tools correctly ().

Overview

The ui-loop MCP server gives coding agents structured visual feedback from a local development server without repeatedly sending full screenshots. It uses Chromium to capture pages, compare each capture with a stored baseline, and return console, request, layout, overflow, accessibility, and pixel-diff information within a token budget. Reach for it when an agent needs to verify UI edits while keeping context usage predictable. It also provides a CLI and Claude Code plugin with an optional post-edit hook.

Use cases

  • Verify UI edits against a local development server
  • Inspect only regions changed since the previous capture
  • Check console errors, overflow, layout shifts, and accessibility violations
  • Run text-only assertions after visual review
  • Keep browser feedback within a chosen token budget

Key features

  • Token-budgeted page summaries and image crops
  • Pixel diffs with changed-region detection
  • Console, request, layout, overflow, and accessibility reporting
  • Stored baselines with automatic capture eviction
  • Chromium-based local dev-server detection
  • Claude Code post-edit hook

Tools7

What UI Loop lets your agent do. Expand a tool for its parameters.

Verified live~1.4k tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

10/10 checks healthy over the last 39d

What it can do

From the 7 tools this server returned when we ran it; 7 declare their own safety hints.

Can delete or modify data · 1Makes network requests · 5Read-only tools · 6
Network at startup3 connections
Files written at startupNone
Install scriptsNone
npm provenanceNot published
Package age28 days
Maintainers1

Observed 2026-11-01 in an isolated sandbox. A description of reach, not a security audit.

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 5d ago via OSV.dev · @djignesh21/ui-loop@0.1.2 (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars1Stargazers on the source repository.
npm downloads67Package downloads in the last 30 days.
Last commit1mo agoMost recent push to the default branch.
Availability100%Our rolling endpoint + install checks that succeeded.
Install checkPassedOur sandbox started it and listed its tools.
Tools exposed7Callable tools this server registers over MCP.

How UI Loop works

What ui-loop does

The ui-loop MCP server connects an agent to a locally running web application through Chromium. It captures a page, stores the result under .ui-loop/, and uses later captures as baselines for visual comparison. Rather than returning a full screenshot on every turn, it produces a compact text report and crops for changed regions.

Reports can include the page title and final URL, viewport dimensions, deduplicated console errors and warnings, uncaught exceptions, failed requests with status 400 or higher, horizontal overflow, selected layout shifts, and axe-core accessibility violations at serious impact or higher by default. Diff results also report the percentage of changed pixels and identify nearby elements by tag, role, and text snippet.

Captures are automatically evicted according to the configured retention limit, so the conversation does not accumulate image history. Every tool also returns structured JSON content for clients that prefer machine-readable results.

How the ui-loop MCP server works

The normal workflow starts by locating the development server with ui_detect_dev_server. The server checks UI_LOOP_URL, Next.js development state, and common ports including 3000–3005, 5173, 4200, and 8080. Call ui_capture before an edit to establish a baseline, make the code change, then call ui_diff against the same label. Each diff becomes the next baseline.

The first capture for a label can include one downscaled full image. Later diffs return changed-region crops, ordered by area, while the running result stays within maxTokens. Crops are padded and downscaled according to configuration. If the budget cannot include every region, the response identifies omitted regions so the agent can request one with ui_region. Use ui_assert for text-only checks after visual verification.

Setup and configuration

Install the package with npx -y @djignesh21/ui-loop@0.1.2 serve as the command for an MCP client. Claude Code also has a plugin that registers the server, adds a post-edit hook, and supplies a capture-to-diff workflow. Cursor and Codex can register the same stdio command through their MCP configuration. Running npx -y @djignesh21/ui-loop@0.1.2 init adds .ui-loop/ to .gitignore and prints configuration snippets.

Chromium is selected from UI_LOOP_CHROMIUM, then Playwright's bundled browser, then common Chrome or Chromium locations. If no browser is found, install Chromium with Playwright or set the executable path explicitly. UI_LOOP_URL sets the development server base URL, while UI_LOOP_ROUTE overrides route inference for hook-driven diffs, including dynamic routes.

The default token budget is 4000, with five captures retained per label. UI_LOOP_MAX_TOKENS, UI_LOOP_KEEP, UI_LOOP_MAX_CROP_SIDE, and UI_LOOP_TIMEOUT_MS adjust these values. Set UI_LOOP_HOOK_DISABLED=1 to disable the hook.

Tools and capabilities

  • ui_capture: Capture a page and create or replace a label baseline.
  • ui_diff: Re-capture a page and return pixel differences, summaries, and region crops.
  • ui_region: Retrieve one stored region at higher resolution.
  • ui_assert: Check text, visibility, counts, console errors, overflow, and accessibility conditions without returning images.
  • ui_list: List labels and stored capture sizes.
  • ui_forget: Delete one label's captures or clear all stored captures.
  • ui_detect_dev_server: Find a likely local development server.

Limitations and notes

The server is designed for local development URLs and depends on a usable Chromium installation. Its image-token calculation is an upper-bound heuristic based on Anthropic's formula; other models may bill images differently. The optional Claude Code hook only runs for edits to supported UI-related extensions when a development server is detected, injects a bounded text summary, never blocks the edit, and remains silent when there is nothing to inspect.

The ui-loop MCP server does not replace general browser automation: its documented purpose is post-edit visual feedback using summaries, diffs, and targeted crops. A diff without an existing baseline behaves like a capture and reports that condition.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about UI Loop

ui-loop is an MCP server that connects coding agents to a local web development server through Chromium. Its main tools capture pages, compare them with stored baselines, return changed-region crops and structured diagnostics, inspect individual regions, detect dev servers, and run text-only UI assertions within a token budget.

Install it by registering `npx -y @djignesh21/ui-loop@0.1.2 serve` as an MCP server command. Claude Code can install the provided plugin, while Cursor and Codex can add the command to their MCP configuration. The `init` command adds `.ui-loop/` to `.gitignore` and prints setup snippets.

Yes, ui-loop works with Cursor through `.cursor/mcp.json`. Add the server command and arguments shown in the project instructions. An optional best-effort Cursor hook is also provided, but the MCP server can be used without it.

It returns a text summary on every capture and includes only changed-region crops in later diffs, subject to `maxTokens`. Full images are limited to the first capture for a label or an explicitly requested full capture. Omitted regions are named so an agent can request specific details with `ui_region`.

Set `UI_LOOP_CHROMIUM` to the Chrome or Chromium executable path and `UI_LOOP_URL` to the development server base URL. If the URL is not set, detection checks Next.js development state and common local ports. Install Playwright Chromium if no browser is found automatically.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewUI Loop AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/djignesh21-ui-loop?style=directory)](https://allmcps.com/mcp/djignesh21-ui-loop)
HTML Embed
<a href="https://allmcps.com/mcp/djignesh21-ui-loop"><img src="https://allmcps.com/api/badge/djignesh21-ui-loop?style=directory" alt="UI Loop on AllMCPs" /></a>