Minimal Designer

Minimal Designer

MCP server for AI-first UI design that enables Codex to create, preview, and commit UI changes to a self-hosted design tool.

Category
访问服务器

README

Minimal Designer

A self-hosted, AI-first UI designer for product teams. Product managers describe screens to Codex; Codex creates a validated preview through MCP, inspects the rendered result, and commits it to the same document that people edit in the browser.

The project is intentionally smaller than Figma: it focuses on structured web, phone, and tablet UI, design tokens, editable handoff, simple prototype links, and immutable history. It does not require an OpenAI API key and has no hosted designer dependency. Your existing Codex access is separate.

Easiest first run

Run the launcher from the project directory:

./designer

It detects macOS, Linux, or WSL; checks ports and requirements; and guides you through local Docker, native development, or server setup. Docker local mode is recommended because it includes Node, Chromium, and all native dependencies. On macOS, the launcher can also offer to start Docker Desktop when it is installed but its engine is stopped.

For a non-interactive diagnosis and Docker start:

./designer doctor auto
./designer start docker

Open http://127.0.0.1:4310. The launcher keeps generated configuration, process state, logs, backups, and server secrets under the ignored .designer/ directory. Project data is persisted in the designer-data Docker volume.

Use ./designer --dry-run start docker to inspect a startup plan without installing packages, writing runtime files, or starting a process/container.

Local Docker

Requirements: Docker Desktop, or Docker Engine with Compose v2. Make sure the Docker engine is running, then use:

./designer setup docker
./designer start docker

The setup command only checks Docker and Compose. start docker builds the single application image, binds it to loopback, waits for readiness, and opens the editor. Useful variants are:

./designer start docker --port 4410 --no-open
./designer start docker --no-build

Keep the default loopback binding while AUTH_MODE=none. To run Compose directly instead of using the launcher:

docker compose up --build

Native development and local production

Requirements: Node.js 24+, pnpm 11+, and a Chromium browser for server-side PNG rendering. The launcher can prepare dependencies, build bundled fonts, verify SQLite, and optionally install Playwright Chromium:

./designer doctor local
./designer setup local
./designer dev

Development mode runs until Ctrl+C:

After the first setup, use ./designer dev --skip-setup for a faster restart. To run the built application in the background instead, use:

./designer start local

The renderer automatically tries an installed Google Chrome/Chromium. Docker already contains the matching Playwright browser.

Server deployment

The launcher supports two safe server configurations. Both keep the application port bound to 127.0.0.1 on the server.

For a private server reached only through SSH:

# On the server
./designer server init --ssh-only
./designer start server

# On your computer
ssh -L 4310:127.0.0.1:4310 user@your-server

Keep that SSH session open, then use http://127.0.0.1:4310 in the browser and in the local Codex MCP configuration.

For an internal company URL behind an existing HTTPS/SSO reverse proxy:

./designer server init --public-url https://designer.company.example
./designer start server

This generates a protected MCP bearer token and configures trusted-header UI authentication. The proxy must authenticate users, remove any client-supplied identity header, set the verified identity header itself, forward bearer authorization to /mcp, and disable buffering for SSE. See docs/deployment.md before exposing the service.

Operations

The same commands work for native, Docker, and server modes where applicable:

./designer status
./designer logs
./designer logs --follow
./designer open
./designer restart
./designer stop
./designer backup /safe/path/designer-backup

stop preserves persistent design data. A backup includes SQLite/WAL state and assets; the launcher briefly stops a Docker service while copying a consistent snapshot.

Connect Codex through MCP

Print the correct local configuration with:

./designer codex-config local

Copy its output into the trusted project's .codex/config.toml or the global ~/.codex/config.toml, then restart Codex. The generated local configuration is equivalent to:

[mcp_servers.minimal_ui]
url = "http://127.0.0.1:4310/mcp"
required = true
default_tools_approval_mode = "writes"
tool_timeout_sec = 60

SSH-only deployments use this same local configuration while the tunnel is open. For a trusted-proxy deployment, run these commands on the server:

./designer codex-config server
./designer token

Copy the first command's TOML to the Codex computer and set MINIMAL_UI_MCP_TOKEN there to the second command's value. Treat that output as a secret: do not paste it into TOML, logs, shell scripts, or source control. The server configuration uses bearer_token_env_var = "MINIMAL_UI_MCP_TOKEN".

The intended Codex workflow is:

  1. Read the active context or select a design explicitly.
  2. Build a complete change with design_preview_changes. Existing entities use permanent IDs; new entities may use transaction-local IDs such as tmp:header.
  3. Inspect the returned PNG and lint diagnostics.
  4. Commit the exact preview with design_commit_preview.
  5. Open the returned deep link for human review. On VERSION_CONFLICT, read the new head and create a new preview.

The application itself does not need an OpenAI API key.

Development verification

Run the launcher checks and workspace verification with:

pnpm test:launcher
pnpm typecheck
pnpm test:run
pnpm build

Configuration

Variable Default Purpose
HOST 127.0.0.1 Bind address. Docker overrides it to 0.0.0.0.
PORT 4310 HTTP port.
BIND_ADDRESS 127.0.0.1 Docker host interface. Do not use 0.0.0.0 with AUTH_MODE=none.
DATA_DIR ./data SQLite, assets, and render storage.
PUBLIC_BASE_URL local API URL Deep-link and render URL base.
AUTH_MODE none Use none on loopback or trusted-header behind the company proxy. token is intended for headless API access, not the browser UI.
DESIGNER_TOKEN empty Required bearer token in token and trusted-header modes; MCP always uses it in server mode.
TRUSTED_USER_HEADER x-designer-user Identity header set by a trusted proxy.
MAX_UPLOAD_BYTES 5242880 Maximum asset upload size.
DESIGNER_API_URL http://127.0.0.1:4310 API URL used by the Vite development editor.
DESIGNER_WEB_HOST 127.0.0.1 Vite development bind address.
DESIGNER_WEB_PORT 4311 Vite development port.

Manual backup and restore

Prefer ./designer backup [DESTINATION]. If you started the application with plain docker compose up instead of the launcher, SQLite uses WAL, so stop the application container before a manual filesystem copy:

docker compose stop designer
mkdir -p backups/designer-data
docker compose cp designer:/data/. backups/designer-data/
docker compose start designer

Restore into an empty replacement data volume while the container is stopped, copy the complete directory back to /data, then start the service. Verify /ready, open revision history, and fetch at least one uploaded asset before reopening writes. The database, WAL files, asset BLOBs, and immutable revisions must always be backed up and restored together.

V1 boundaries

The V1 document uses fixed-size frames with absolute, row, column, and simple grid layouts. It includes deterministic Latin and RTL text behavior. Realtime multiplayer, arbitrary vector paths, linked component variants, Figma import, animation, production-code generation, and plugins are intentionally deferred.

See docs/architecture.md for the internal model. For a secured company deployment, follow docs/deployment.md.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选