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.

概览

AI 生成的概览

一个本地 MCP 服务器,让编码代理通过基于渲染截图的迭代改进现有前端,并返回获胜补丁与证明产物

可以做什么
对仓库和设计目标运行主设计流程:启动本地预览、截取屏幕截图、针对实际渲染页面迭代,并返回获胜补丁、截图和运行产物。在隔离工作树中对已有补丁执行评估,运行确定性检查、截图并返回证明字段。使用较窄的工具包变体获取操作手册、构建上下文、运行门禁、启动和停止预览并截图,由宿主代理自行评判。运行高级无人值守求解流程。
适用场景
适用于页面已能运行但外观平庸、扁平或设计不足,希望代理真正改进设计而不只是点评的场景。也适合已有补丁、希望在采纳前获得确定性检查和截图证明的情况。
运行要求
从 PyPI 通过 pipx 本地安装 Python 包,并提供安装助手注册检测到的客户端。本地安装路径会安装 Playwright Chromium。每次调用需提供本地预览命令和 URL,并为生成与视觉选择 provider 和模型通道(例如 Gemini CLI 通道)。
安装前请注意
设计流程会修改真实仓库并创建工作树,合并前应审查返回的补丁。自定义预览命令默认以无 shell 的 argv 执行;shell 语法和内联解释器执行需 unsafe_shell_commands=true,外部预览抓取需 unsafe_external_preview=true。自动上下文会跳过常见密钥路径,但仍需确认发送给所选 provider 的内容。非客户端视觉可能需要 provider 凭据。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Frontend Design Loop MCP,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

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:

bash
pipx install frontend-design-loop-mcp

Set up every detected supported client:

bash
frontend-design-loop-setup --install-all-detected-clients

Real MCP call example:

text
frontend_design_loop_design(  repo_path="/absolute/path/to/site",  goal="make the homepage look materially more premium without changing the information architecture",  provider="gemini_cli",  model="gemini-3.1-pro-preview",  preview_command="python3 -m http.server {port}",  preview_url="http://127.0.0.1:{port}/index.html")

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_playbook
  • build_context
  • run_gates
  • preview_start
  • capture_screenshots
  • preview_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.

[ACA full-page before]

After: rebuilt ACA homepage with a stronger hero, cleaner sequencing, and a materially better full-page result.

[ACA full-page after]

See the proof notes in the case studies index.

How It Works In Practice

  1. Point the MCP at a real repo and give it a concrete design goal.
  2. It creates an isolated worktree, boots a preview, and captures rendered screenshots.
  3. It iterates against the actual rendered page instead of only raw code.
  4. 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 + model lane 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_passed
  • vision_pending
  • vision_scored
  • final_pass
  • run_dir
  • candidate_dir
  • screenshot_files
  • patch

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

bash
pipx install frontend-design-loop-mcpfrontend-design-loop-setup --install-all-detected-clients

GitHub install remains the fallback:

bash
pipx install git+https://github.com/alexalexalex222/frontend-design-loop-mcp.gitfrontend-design-loop-setup --install-all-detected-clients

Local clone path

bash
git clone https://github.com/alexalexalex222/frontend-design-loop-mcp.gitcd frontend-design-loop-mcp./scripts/setup.sh

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:

bash
FDL_SKIP_CLIENT_INSTALL=1 ./scripts/setup.sh

Setup helpers

Bulk installer:

bash
frontend-design-loop-setup --install-all-detected-clients

Targeted installers:

bash
frontend-design-loop-setup --install-claude --scope userfrontend-design-loop-setup --install-codexfrontend-design-loop-setup --install-geminifrontend-design-loop-setup --install-droidfrontend-design-loop-setup --install-opencode

Config printers:

bash
frontend-design-loop-setup --print-claude-configfrontend-design-loop-setup --print-codex-configfrontend-design-loop-setup --print-gemini-configfrontend-design-loop-setup --print-droid-configfrontend-design-loop-setup --print-opencode-config

Safety Defaults

  • custom commands are parsed as shell-free argv by default
  • shell syntax, substitutions, and inline interpreter execution like bash -c, python -c, and node -e require unsafe_shell_commands=true
  • preview_url must 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:

bash
PYTHONPATH=src .venv/bin/python scripts/preflight_check.py

stdio smoke:

bash
PYTHONPATH=src .venv/bin/python scripts/smoke_mcp_stdio.py

Built-in doctor:

bash
frontend-design-loop-setup --doctorfrontend-design-loop-setup --doctor --smoke

Docs

Distribution State

Current public install path:

bash
pipx install frontend-design-loop-mcp

来源:README.md,提交 c65f7ca

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分