D
djig/ui-loop
Context-budgeted visual feedback for coding agents.
★ 1·更新 2026-10-10
在 GitHub 查看 ↗直链 · 无中转页
我们没有可直接复制的安装命令,也没有公开的远端端点,所以不出配置。上面那条命令仅供参考,不是我们能担保的可复制命令——编一条出来比不给更糟。 各客户端的接法 →
- ★ 数取值
- 1 ★ · djig/ui-loop · 取自 GitHub 搜索 API · (2026-11-19 20:00:48 核对)
- 来源明细
- 收录自 punkpeye/awesome-mcp-servers 榜单(我们从中收集的条目之一) · 条目类型:MCP 服务
- 收录与活跃
- 收录于 2026-11-18 · 最近见到 2026-11-20 · 共见到 3 次 · 被 3 个来源列出
- 评分构成
- 综合分 300 · 1 ★ · 3 个来源 · mcp
常见问题(答案都来自我们的记录)
它适合谁 / 用来做什么?
我们把它归在这些标签下: MCP 服务。标签来自条目自身,不是我们强加的分类。
谁维护它、还在更新吗?
仓库
djig/ui-loop;我们收录于 2026-11-18;最近见到 2026-11-20。这里没有"官方认证"或"质量评级"——我们只记录来源与时间。README 原文(英文,未翻译) · 在 GitHub 读完整 README →
# ui-loop
以下摘录自该仓库的 README(片段)
> See the UI your coding agent just changed: structured summaries + diff-only crops in ~300 tokens instead of full screenshots.
Context-budgeted visual feedback for coding agents.
ui-loop is an MCP server, a CLI and a Claude Code plugin that lets a coding agent (Claude Code, Cursor, Codex) see the UI it just changed without flooding its context window. Instead of a full screenshot every turn, the agent gets a short structured text summary (console errors, failed requests, overflow, layout shifts, accessibility violations) plus small crops of only the regions that changed since the last capture, all fitted into a token budget you choose. Captures live on disk under .ui-loop/ with automatic eviction, so nothing accumulates in the conversation.
Real example: full screenshot costs ~1,366 tokens vs ui-loop's ~305 tokens (text summary + one diff crop)
## Why
General-purpose browser automation servers are great at driving a browser. They are not designed to be cheap verification primitives:
Playwright MCP accessibility snapshots run 50–540 KB each, and the maintainers' position is that pruning history is the agent's job, not the server's (microsoft/playwright-mcp #1233).
Claude in Chrome screenshots are re-sent every turn. One report measured 18 screenshots at roughly 279K tokens per call, consuming 17% of a Max plan context window in 5 turns (anthropics/claude-code #27869).
Chrome DevTools MCP tool definitions alone cost about 17k tokens before the agent does anything.
None of them ship the thing a coding agent actually needs after an edit: diff-only crops + structured text + eviction as a single primitive. That is all ui-loop does.
## Install in 60 seconds
### Claude Code (plugin, recommended)
bash
claude plugin marketplace add djig/ui-loop
claude plugin install ui-loop@djig-ui-loop
This registers the MCP server, a PostToolUse hook that diffs the relevant route after you edit a UI file, and a skill that teaches Claude the capture → edit → diff loop.
Plain MCP server without the hook and skill:
bash
claude mcp add ui-loop -- npx -y @djignesh21/ui-loop@0.1.2 serve
### Cursor
Add to .cursor/mcp.json:
json
{ "mcpServers": { "ui-loop": { "command": "npx", "args": ["-y", "@djignesh21/ui-loop@0.1.2", "serve"] } } }
Optional best-effort hook: copy examples/cursor/hooks.json to .cursor/hooks.json.
### Codex
bash
codex mcp add ui-loop -- npx -y @djignesh21/ui-loop@0.1.2 serve
### Any agent that reads mcp.json / plugin.json
The repo root carries an agent-plugins.org plugin.json and mcp.json, so Copilot, Codex and Cursor can install it from the GitHub URL.
### In your project
bash
npx -y @djignesh21/ui-loop@0.1.2 init # adds .ui-loop/ to .gitignore, prints config snippets
Chromium is resolved from UI_LOOP_CHROMIUM, then Playwright's bundled Chromium, then common system paths (Google Chrome, Chromium). If none is found: npx playwright install chromium or set UI_LOOP_CHROMIUM=/path/to/chrome.
## The loop
1. ui_detect_dev_server → http://localhost:3000
2. ui_capture { url, label } before editing (baseline; returns one downscaled full image the first time)
3. Edit the code
4. ui_diff { url, label } → text summary + crops of changed regions within budget
Context-budgeted visual feedback for coding agents.
ui-loop is an MCP server, a CLI and a Claude Code plugin that lets a coding agent (Claude Code, Cursor, Codex) see the UI it just changed without flooding its context window. Instead of a full screenshot every turn, the agent gets a short structured text summary (console errors, failed requests, overflow, layout shifts, accessibility violations) plus small crops of only the regions that changed since the last capture, all fitted into a token budget you choose. Captures live on disk under .ui-loop/ with automatic eviction, so nothing accumulates in the conversation.
Real example: full screenshot costs ~1,366 tokens vs ui-loop's ~305 tokens (text summary + one diff crop)
## Why
General-purpose browser automation servers are great at driving a browser. They are not designed to be cheap verification primitives:
Playwright MCP accessibility snapshots run 50–540 KB each, and the maintainers' position is that pruning history is the agent's job, not the server's (microsoft/playwright-mcp #1233).
Claude in Chrome screenshots are re-sent every turn. One report measured 18 screenshots at roughly 279K tokens per call, consuming 17% of a Max plan context window in 5 turns (anthropics/claude-code #27869).
Chrome DevTools MCP tool definitions alone cost about 17k tokens before the agent does anything.
None of them ship the thing a coding agent actually needs after an edit: diff-only crops + structured text + eviction as a single primitive. That is all ui-loop does.
## Install in 60 seconds
### Claude Code (plugin, recommended)
bash
claude plugin marketplace add djig/ui-loop
claude plugin install ui-loop@djig-ui-loop
This registers the MCP server, a PostToolUse hook that diffs the relevant route after you edit a UI file, and a skill that teaches Claude the capture → edit → diff loop.
Plain MCP server without the hook and skill:
bash
claude mcp add ui-loop -- npx -y @djignesh21/ui-loop@0.1.2 serve
### Cursor
Add to .cursor/mcp.json:
json
{ "mcpServers": { "ui-loop": { "command": "npx", "args": ["-y", "@djignesh21/ui-loop@0.1.2", "serve"] } } }
Optional best-effort hook: copy examples/cursor/hooks.json to .cursor/hooks.json.
### Codex
bash
codex mcp add ui-loop -- npx -y @djignesh21/ui-loop@0.1.2 serve
### Any agent that reads mcp.json / plugin.json
The repo root carries an agent-plugins.org plugin.json and mcp.json, so Copilot, Codex and Cursor can install it from the GitHub URL.
### In your project
bash
npx -y @djignesh21/ui-loop@0.1.2 init # adds .ui-loop/ to .gitignore, prints config snippets
Chromium is resolved from UI_LOOP_CHROMIUM, then Playwright's bundled Chromium, then common system paths (Google Chrome, Chromium). If none is found: npx playwright install chromium or set UI_LOOP_CHROMIUM=/path/to/chrome.
## The loop
1. ui_detect_dev_server → http://localhost:3000
2. ui_capture { url, label } before editing (baseline; returns one downscaled full image the first time)
3. Edit the code
4. ui_diff { url, label } → text summary + crops of changed regions within budget
收录徽章(可选)
想把收录标记放进 README 就复制这行,可选,不影响收录。
[](https://anclum.com/zh/s/djig-ui-loop/)
- 来源
- awesome · https://github.com/djig/ui-loop
- 按领域浏览
- MCP 服务
- Traction
- 1 ★
- 收录来源
- 3 个独立来源
- 收录于
- 今天
更多 MCP 服务器
所属领域与标签
每个标签都能点进去看同类的全部条目。数字是当前库里的真实条数。