
Ui Debugger Mcp
io.github.developerz-ai由 GitHub 帳號 developerz-ai 發布v1.9.0更新於 Oct 24, 2026
Autonomous UI debugging MCP server: an agent drives the browser/desktop, reports bugs + UX issues.
概覽
讓助理把 UI 測試故事交給本機代理,由它驅動瀏覽器、桌面或 Android 目標,並回傳結構化的缺陷與視覺問題。
- 可以做什麼
- 提供少量工具:start_debug 以目標、目標描述和選用 URL 開啟一次執行;get_findings 輪詢狀態以及功能缺陷、視覺問題和證據;send_message 可在執行中調整方向;describe 列出已設定的目標和目前工作階段;end_session 關閉執行。伺服器內部由一個快速純文字驅動代理點擊介面,並在需要視覺判斷時呼叫視覺模型。執行會記錄 HTTP 交換、DOM 與無障礙資料、主控台錯誤、螢幕截圖,以及選用的重播影片。
- 適用情境
- 適合 AI 編碼代理剛修改完 Web、桌面或 Android 介面,需要在不靠人工點擊的情況下驗證流程時使用。也適合希望取得高階通過/失敗結論及證據、而不是自己發出每一次點擊的團隊。
- 執行需求
- 透過 npx 以 stdio 在本機執行,需要 Node.js。需要為相容 OpenAI 的路由器(預設 OpenRouter)提供 OPENAI_API_KEY,可選 OPENAI_BASE_URL。專案設定檔用於描述目標和模型。Web 偵錯需要 PATH 中有 Chrome/Chromium;桌面需要 X11/Wayland;Android 需要 ADB。重播影片需要選用的 ffmpeg。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Ui Debugger Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
UI Debugger MCP
An MCP server that debugs UIs autonomously — so the AI that wrote your app can also test it, without a human clicking through every flow.
The problem
AI coding agents (Claude, etc.) are great at writing code. They're bad at knowing if the UI actually works. For backend code there are unit and integration tests. For UI, a human still has to open the app, log in, click around, and report what's broken. That human-in-the-loop is slow, boring, and the main bottleneck when an entire product is built by AI.
The idea
Eliminate the human from the UI-debug loop with an MCP server.
- A smart agent (Claude Code, Cursor, …) finishes a PR and wants to verify the UI.
- It hands a story to this server: "on web, log in and do X, Y, Z — tell me if it breaks."
- A small fast agent runs inside this server (via the Vercel AI SDK). It drives the browser or desktop, watches console + network, takes screenshots.
- It reports structured findings back: pass/fail, what broke, evidence.
- The smart agent fixes the code and asks again. Loop until the UI works.
Unlike playwright-mcp — where the smart model issues every single click itself — here the smart model stays high-level and delegates the whole clicking loop to the small agent.
How it's different from playwright-mcp
Architecture — the three actors
Picture a boss, a fast blind driver, and a describer with eyes:
- smart agent — the boss (Claude/caller). Sends a goal, reads findings, fixes the code, loops. Stays high-level — never clicks.
- fast guy — the driver. Fast, cheap, text-only and blind. Runs the click loop on structure (DOM / a11y tree / view hierarchy). Default: deepseek.
- vision guy — the eyes. Multimodal. The driver calls
lookto ask "does this look right? is the button centred?" and gets a description back. Default: qwen. Spent only when visual judgment is needed.
One goal: the UI works and looks nice. Full design in docs/idea/.
Every run keeps its screenshots and stitches them into a short captioned
replay video — Claude attaches it to the PR so a reviewer sees the flow working
in ~10 seconds (docs/idea/workspace.md).
Targets
One project can expose several debug targets. A large app can have all three:
The desktop and android adapters read structure only — there is
no automatic vision/OCR fallback: the adapter never switches to pixels. A
custom-drawn surface (canvas, game, custom widget) exposes no nodes, so it is
unreachable there; Chromium/Electron need --force-renderer-accessibility. The
only vision is the agent-level look the driver calls when it needs a visual
judgment.
Three adapters, one shared contract. Each runs managed (server launches the
target) or attach (connect to a running one via cdpUrl / adbSerial).
Linux first. iOS is out of scope on Linux (macOS-only tooling).
A managed android run boots the emulator windowless — -no-window with
-gpu swiftshader_indirect -no-audio, because -no-window alone still opens a
host GL context and dies on a box with no display. Set "headless": false on
the target to watch it in a window; append anything else with emulatorArgs.
Setup
Install like any local MCP server — one entry in your .mcp.json:
Wiring more than one repo? .mcp.json is usually committed, so don't paste the key
into each one — export it once in your shell and reference it, which keeps every
repo's entry identical and secret-free:
It's also published in the official MCP Registry as
io.github.developerz-ai/ui-debugger-mcp — any client that browses the registry (instead of a
hand-written .mcp.json entry) can find and install it by that name.
Then add a per-project config describing the app to debug (models, targets,
urls) — .dz/ui-debugger/ui-debugger-mcp.json if your repo keeps agent config
under .dz/ (checked first), else the root .ui-debugger-mcp.json (legacy).
The fastest way is the init command:
ui-debugger-mcp init scaffolds a project for debugging (described in
docs/idea/config.md):
- creates the workspace dir
./tmp/ui-debugger-mcp/ - writes a starter config (default deepseek/qwen models, a
webtarget stub) if one doesn't already exist — at.dz/ui-debugger/ui-debugger-mcp.jsonwhen the repo already has a.dz/dir, else at the root.ui-debugger-mcp.json - adds
tmp/to.gitignore - prints the
.mcp.jsonsnippet to paste (it never writes your API key)
Config files:
.mcp.json→ how to launch the server (command + secret key). Gitignored..dz/ui-debugger/ui-debugger-mcp.json(or root.ui-debugger-mcp.json) → how to debug this app (models, targets). Committed. When both exist the.dz/copy wins and the tool prints a notice naming the ignored root file.
Every key of both files is documented in docs/idea/config.md;
every tool's exact input/output shape is in docs/idea/mcp-tools.md.
The server reads the current directory to pick the project session — open it in your repo and it debugs that repo.
Quickstart
This creates ./tmp/ui-debugger-mcp/, writes a starter config (.dz/… or root),
and prints the .mcp.json snippet to paste.
Using it
It's a conversation, not a remote control — five fat tools, not one-per-click:
A run is always time-capped: start_debug's timeout (seconds) overrides the
default 300s, so a session can never hang forever — it auto-ends and frees the
profile lock when the cap fires.
Logging in — named personas
Almost every interesting screen is behind a login, and re-explaining the login
flow in every goal string costs driver steps before the real goal starts. Say it
once, in the target:
The run signs in out-of-band, before the driver's first step: it costs zero
driver steps, and the credentials never enter the model's context — the prompt
only learns "you are already signed in as admin". Values are redacted out of
every log the run writes; describe reports persona names only. A typo'd as
fails loud listing the valid names, and a login that does not take fails the run
rather than handing back a session that will report every page behind it as empty.
Use dev/seed credentials — this file is committed. Details in
docs/idea/config.md.
Telling it what's expected — notes
A freshly-migrated app with no seed data renders empty states everywhere, and the driver reports "the table is empty" as the run's headline bug. It is right, and it is useless. Say what's expected once, in the target:
One fact per line, on any target (web, desktop, android). Unlike the per-run
goal, notes is config: it is composed into the driver's prompt once, as its
own "Known about this app" section — treat these as expected, never report one
as a defect, and a screen that contradicts one is still worth reporting.
The same preconditions also reach the separate vision model that judges
screenshots, so a configured expected empty state stops being filed as a visual
defect — and a screen that contradicts one is still worth reporting.
Capped at 1000 characters, enforced when the config loads (the prompt carrying it
is resent to the model on every step, so an essay here is paid for per step).
If a run is already open
One run per project (cwd), so a forgotten end_session used to wedge it. It
doesn't any more: describe reports the run this project holds
(session: { id, status, goal }), so a caller that lost its session_id — a
compacted context, a restarted client — can read it, close it, or take it over
with start_debug({ …, replace: true }). Being refused is still the default, and
the refusal spells out all three calls; a silent takeover would kill a healthy run
somebody else is watching.
Every tool result carries both a pretty-printed text block and a typed
structuredContent payload validated against a declared outputSchema — parse
the structured half, don't scrape the text. Tools also declare MCP annotations
(readOnlyHint, destructiveHint, idempotentHint, openWorldHint) so clients
can render/gate them correctly, and evidence paths (screenshots, replay.mp4)
ride as resource_link content items, not inline strings. Full shapes in
docs/reference.md.
Typical loop from a smart agent:
You can also drive it headless from a script with claude -p — see
docs/claude/SKILL.md for the CLI recipe (MCP config,
allowed tools, output formats).
What a run captures (web)
You get findings, but the agent's evidence is what makes them actionable:
Static assets are held back from a default network read — on a Vite dev server they outnumber real API calls ~15:1 — with a count of what was hidden and the filter to see them. Failed requests are never hidden, whatever their type.
CLI — check or stop a run
The ui-debugger-mcp binary doubles as a control CLI for the active run
(reads state.json, no API key needed):
Troubleshooting
Chrome not found
The web adapter launches Chrome via the system PATH. Install Chrome/Chromium, or
set executablePath in the project config (.dz/… or root):
Session locked — "another run is active" One Chrome profile = one run. If a previous run crashed without cleaning up:
Or delete ./tmp/ui-debugger-mcp/<project>/state.json and restart the MCP server.
Run times out with no findings Default cap is 300 s. Raise it per-call:
If the agent is stuck at login, add ?debug-ai=true to your app's login route
(gated by ALLOW_AI_DEBUG_LOGIN) to skip captchas — see CLAUDE.md for the
pattern.
get_findings returns empty bugs[] / visual[]
The run may still be in progress — use wait (ms) to long-poll:
Check ./tmp/ui-debugger-mcp/<project>/sessions/<id>/logs/agent.log for the agent's trace.
Session ids are local timestamps (2026-07-27_14-30-05-0001), so the newest run
sorts last. Only the 5 most recent sessions are kept — each new run prunes the
rest, so evidence from a run six ago is gone by design.
Run fails instantly: "… is not a valid model ID"
The model string in the project config is not a catalog id. OpenRouter takes
provider/model with optional :floor / :nitro routing suffixes — a #…
suffix is rejected outright. Use plain ids (deepseek/deepseek-v4-flash).
Still running an old version after upgrading
npx -y <pkg> REUSES a cached install when one exists, so a bare
"@developerz.ai/ui-debugger-mcp" in .mcp.json keeps booting whatever version
first landed in ~/.npm/_npx — with no signal that anything is stale. There is no
auto-update: nothing in the server checks the registry. Pin @latest in your
args (what init now prints) so every cold start re-resolves:
Already stuck? rm -rf ~/.npm/_npx, then reconnect the server (/mcp in Claude
Code). Check what you're on with npx @developerz.ai/ui-debugger-mcp@latest --version.
Config edits seem to have no effect
Config is read ONCE when the MCP server starts, so an edit cannot reach a running
server. Since v1.3 the server refuses to start a run on a changed file and tells
you to reconnect it (in Claude Code: /mcp → reconnect ui-debugger) rather
than silently running the old settings.
"Another server already has a session" and you can't see it
That run belongs to a different MCP server process on the same project. You can
now READ it — get_findings { session_id: "<the id in the error>" } serves its
on-disk findings — so you can tell a live run from one that settled and is just
waiting to be closed. To take the project over: ui-debugger-mcp stop.
Run ends failed with no bugs and no explanation
That means the driver never called report — it used its whole step budget.
The summary says so explicitly; it is NOT a crash and NOT a clean pass. Narrow
the goal, or raise timeout. Read logs/agent.log and the screenshots for what
it actually did.
replay.mp4 not generated
ffmpeg is optional. Install it and retry, or ignore — findings and screenshots
still land without it.
Stack
- Bun + TypeScript (ships as npm, runs via
npx/bunx) - Vercel AI SDK — the agent loop (fast driver + vision describer)
- Any OpenAI-compatible router (OpenRouter default) — swap models per role. Defaults: deepseek (text) drives, qwen (image) sees.
- CDP for web, X11/Wayland for desktop, ADB for Android
- stdio MCP transport
Status
All three adapters ship in v1:
Replay video (replay.mp4, captioned stills → mp4 via ffmpeg) ships with the web adapter.
ffmpeg is optional — absent gracefully, findings still land.
See docs/idea/ for design notes.
Docs
docs/idea/overview.md— problem + ideadocs/idea/architecture.md— system designdocs/idea/adapters.md— adapter contract + targetsdocs/idea/desktop-control.md— Linux control tooling (X11/Wayland/mobile)docs/idea/agent-loop.md— the story → findings loopdocs/idea/mcp-tools.md— two tool layers, SQL-like params, in-repo promptsdocs/idea/models.md— the three actors (smart agent / fast guy / vision guy)docs/idea/config.md— config filesdocs/idea/workspace.md— per-project space + logsdocs/claude/SKILL.md— drivingclaudeas a headless CLI tool (generic)CLAUDE.md— instructions for AI agents working on this repo
Credits / influences
ai-task-master— build template (orchestrator + subagents), reference repo, not publishedgold-standards-in-ai— MCP & code conventions, reference repo, not publishedclaude-code-bible— agent-first patterns (sebyx07/claude-code-bible)- Model Context Protocol
來源:README.md,提交 fd6c78c
工具
0版本歷史
1- v1.9.0最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分