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 分