
Frontend Design Loop MCP
io.github.alexalexalex222由 GitHub 账号 alexalexalex222 发布v1.0.0更新于 Oct 25, 2026
Design-first MCP for coding agents that improves websites with screenshot-grounded iteration.
概览
一个本地 MCP 服务器,让编码代理通过基于渲染截图的迭代改进现有前端,并返回获胜补丁与证明产物
- 可以做什么
- 对仓库和设计目标运行主设计流程:启动本地预览、截取屏幕截图、针对实际渲染页面迭代,并返回获胜补丁、截图和运行产物。在隔离工作树中对已有补丁执行评估,运行确定性检查、截图并返回证明字段。使用较窄的工具包变体获取操作手册、构建上下文、运行门禁、启动和停止预览并截图,由宿主代理自行评判。运行高级无人值守求解流程。
- 适用场景
- 适用于页面已能运行但外观平庸、扁平或设计不足,希望代理真正改进设计而不只是点评的场景。也适合已有补丁、希望在采纳前获得确定性检查和截图证明的情况。
- 运行要求
- 从 PyPI 通过 pipx 本地安装 Python 包,并提供安装助手注册检测到的客户端。本地安装路径会安装 Playwright Chromium。每次调用需提供本地预览命令和 URL,并为生成与视觉选择 provider 和模型通道(例如 Gemini CLI 通道)。
安装
在 SourceWeft 中
- 打开 控制台中的 Frontend Design Loop MCP,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
Frontend Design Loop MCP
Coding agents can get a page functional. Frontend Design Loop makes it materially better with screenshot-grounded iteration and proof artifacts.
Use it when the base model got the page working but the result is still generic, flat, rough, or visibly under-designed. The main design workflow stays on one main provider and model lane by default, so multi-model routing is opt-in instead of the default story.
Quick Start
Install the current public build from PyPI:
Set up every detected supported client:
Real MCP call example:
Agent-Owned Toolkit Variant
This repo now also ships an additive MCP entrypoint for agent-owned frontend loops:
- console script:
frontend-design-toolkit-mcp - module fallback:
PYTHONPATH=src .venv/bin/python -m design_toolkit.server
That variant is intentionally narrow:
get_playbookbuild_contextrun_gatespreview_startcapture_screenshotspreview_stop
It does not hide vision scoring, creativity judging, or patch generation behind MCP. The host agent owns planning, edits, screenshot review, scoring, iteration, and winner selection directly.
See test-prompt-codex.md for the end-to-end Codex exercise prompt.
What The MCP Does
frontend_design_loop_design is the main workflow:
- the host agent points the MCP at a real repo plus a concrete design goal
- the MCP boots a local preview, captures screenshots, and iterates against the rendered result
- the same main provider and model lane is used by default across planning, generation, and vision unless you explicitly override it
- the MCP returns the winning patch plus screenshots and run artifacts
frontend_design_loop_eval is the proof workflow:
- use it when the host agent already has the patch
- the MCP applies the patch in an isolated worktree, runs deterministic checks, captures screenshots, and returns proof artifacts
This is the wedge:
- coding agents can already get pages working
- this MCP helps them make pages materially better
- screenshot-grounded iteration plus proof artifacts is the differentiator
Official MCP Registry metadata is tracked in server.json.
Proof Gallery
The public proof set uses owned/generated GA SMB previews plus the ACA full-page before/after.
Selected Hero / Top Crops
ACA Full-Page Before / After
Before: early ACA full homepage.
After: rebuilt ACA homepage with a stronger hero, cleaner sequencing, and a materially better full-page result.
See the proof notes in the case studies index.
How It Works In Practice
- Point the MCP at a real repo and give it a concrete design goal.
- It creates an isolated worktree, boots a preview, and captures rendered screenshots.
- It iterates against the actual rendered page instead of only raw code.
- It returns the winning patch, screenshot proof, and run artifacts so the host agent can judge the result.
Workflow Summary
frontend_design_loop_design
Use it when:
- the page is functional but weak
- the section structure is there but the design is not
- you want the MCP to improve the page instead of only judging it
Key defaults:
- one main
provider+modellane by default planning_mode="single"vision_mode="on"section_creativity_mode="on"- split planner or vision lanes only happen when explicitly requested
frontend_design_loop_eval
Use it when:
- the host agent already has the patch
- you want deterministic checks, screenshots, and artifact capture
- you want the host agent to judge the result from returned screenshots
Returned proof fields include:
deterministic_passedvision_pendingvision_scoredfinal_passrun_dircandidate_dirscreenshot_filespatch
frontend_design_loop_solve
frontend_design_loop_solve still exists for advanced unattended workflows, but it is not the main public story.
Install And Setup
Public install now
GitHub install remains the fallback:
Local clone path
The local setup path:
- creates
.venv - installs the package
- installs Playwright Chromium
- installs detected client entries when supported clients are present
- runs the built-in doctor
- runs the stdio smoke test
If you want the repo-local environment without auto-installing client entries:
Setup helpers
Bulk installer:
Targeted installers:
Config printers:
Safety Defaults
- custom commands are parsed as shell-free argv by default
- shell syntax, substitutions, and inline interpreter execution like
bash -c,python -c, andnode -erequireunsafe_shell_commands=true preview_urlmust match the launched local preview origin and port by default- external preview fetches require
unsafe_external_preview=true - preview readiness checks reject cross-origin redirects, and browser screenshots block cross-origin subresources by default
- auto-context skips common secret-bearing paths such as
.env*,.git/,.aws/,.ssh/,.config/gcloud/,.docker/,.kube/, token-named files, and service-account-style JSON - native CLI providers inherit a minimal allowlisted environment instead of the full host shell environment
- shared worktree reuse directories are off by default
Client-side vision is the default proof path for frontend_design_loop_eval, so the host agent can judge the screenshots without provider credentials.
Proxy-only MiniMax vision lanes are explicitly treated as structural-only review:
vision_review_mode="proxy_structural"- they do not count as full automated visual scoring
Verification
Offline preflight:
stdio smoke:
Built-in doctor:
Docs
Distribution State
Current public install path:
来源:README.md,提交 c65f7ca
工具
0版本历史
1- v1.0.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分