claude-design-mcp
An MCP server that drives Anthropic's Claude Design from agentic coding CLIs, providing tools to create, generate, iterate, and export design systems without a browser.
README
claude-design-mcp
An MCP server that drives Claude Design — Anthropic's design-system generator — from agentic coding CLIs (Claude Code, Cursor, etc.). It exposes semantic tools so you can create_design_system, generate, iterate, list_files, read_file, and export without touching a browser.
[!WARNING] Unofficial — not affiliated with or endorsed by Anthropic. Claude Design has no public API, so this drives a real Chrome and calls claude.ai's internal endpoints. Expect it to break when the site changes. Point it only at your own account, stay within Anthropic's terms, and use it at your own risk. Your logged-in session is sensitive — see SECURITY.md.
Status: working. ~30 tools implemented (see the table below). Most call Claude Design's internal
OmeletteServiceConnect-RPC API as JSON (via in-pagefetch);generate/iterate/get_statusdrive the chat UI (theChatRPC payload is opaque).
Tools
Create & generate
| Tool | Purpose |
|---|---|
create_design_system({ name, brief, sources? }) |
Create a design system. Returns { projectId, url }. |
create_design_project({ name, brief?, designSystemIds?, designComponents? }) |
Create a design PROJECT (screens/app), optionally binding design systems. |
generate({ projectId }) |
Start generation from the stored brief. Returns once started (~5 min total). |
get_status({ projectId }) |
Poll: generating | ready | error | draft. |
iterate({ projectId, prompt }) |
Send a chat message. Non-blocking — returns once started; poll get_status. |
send_message({ projectId, prompt, conversationId? }) |
Revise/prompt; optionally target a specific conversation. |
Design-system bindings
| Tool | Purpose |
|---|---|
attach_design_system({ projectId, designSystemId }) |
Bind a (published) design system to a project. |
detach_design_system({ projectId, designSystemId }) |
Unbind a design system. |
list_attached_design_systems({ projectId }) |
List bound systems (with names). |
refresh_design_system({ projectId, designSystemId? }) |
Pull the latest version of bound system(s). |
Conversations
| Tool | Purpose |
|---|---|
list_conversations({ projectId }) |
List chats: { chatId, title, turns, active }. |
new_conversation({ projectId }) |
Start a fresh conversation. |
Files
| Tool | Purpose |
|---|---|
list_files({ projectId }) |
List files (tokens/*.css, components/*, SKILL.md, …). |
read_file({ projectId, path }) |
Read a single file (utf8). |
export({ projectId, destDir }) |
Dump all files to destDir, byte-faithful. |
mint_handoff({ projectId, includeChats?, instructions?, destDir? }) |
Primary handoff. Official capability URL + ready Claude Code command; with destDir, downloads + extracts the bundle and returns projectDir (feed to scaffold:ui). |
export_handoff({ projectId, destDir }) |
Deprecated — local bundle (project/ + chats/ + README). Prefer mint_handoff. |
search_files({ projectId, pattern }) |
Grep files → { path, line, context }. |
write_file / edit_file / delete_file |
Direct file edits without chat. |
Publish, listing & management
| Tool | Purpose |
|---|---|
publish({ projectId }) / set_default({ projectId }) |
Publish / set default design system. |
list_design_systems() / list_projects() |
List design systems / all projects. |
rename_project / delete_project / duplicate_project / remix_project / set_favorite |
Project housekeeping. |
get_usage() |
Account usage/quota (5-hour & 7-day). |
create_claude_code_session({ projectId, instructions? }) |
Open the project as a Claude Code session → { sessionUrl }. |
Setup
Prerequisites: Node ≥ 20, pnpm, and a desktop Google Chrome installed. A claude.ai account with Claude Design access.
claude.ai is behind Cloudflare, which blocks Playwright's bundled Chromium (automation fingerprint) with an endless "Just a moment…" loop. The server sidesteps this by attaching to a real Chrome over the Chrome DevTools Protocol (CDP) — a normally-launched Chrome passes Cloudflare cleanly.
git clone https://github.com/e-brokenc0de/claude-design-mcp.git
cd claude-design-mcp
pnpm install
pnpm exec playwright install chromium # only the Node bindings are needed
# Start the real Chrome (dedicated debug profile in .auth/cdp-chrome) and log
# into claude.ai once. The window stays open; the session persists.
pnpm run chrome:cdp
pnpm run build
Dev-only:
pnpm run recon:capturetees Claude Design's network/RPC traffic into./recon/so you can re-map the internal API insrc/selectors.tsif the site changes. Not needed for normal use. Captures can contain cookies — they're gitignored; never commit them.
The MCP server attaches to the same Chrome (port 9222 by default). If Chrome
isn't running, the server auto-launches it; if it's not logged in, tools return
NOT_AUTHED — run pnpm run chrome:cdp and log in.
CLI
Every tool is also a terminal command via claude-design. The CLI is a thin MCP
client — it spawns the same server and forwards your arguments, so the commands,
schemas, and output are exactly the server's (add a tool to the server and it shows up
here automatically). Good for automation/CI, quick debugging, and one-off ops without
an agent in the loop.
claude-design --help # list every command (discovered from the server)
claude-design <command> --help # flags for one command
claude-design list-projects --json # data tools print JSON → pipe to jq
claude-design create-design-system --name "Acme" --brief "Calm, editorial, dark-first"
claude-design get-status --project-id <id>
- Command names accept kebab- or snake_case (
create-design-system==create_design_system). - Flags mirror each tool's arguments in kebab-case (
projectId→--project-id); array args repeat (--design-system-ids a --design-system-ids b); booleans are presence flags. --jsonguarantees machine-readable stdout. Exit codes:0ok,1error,2NOT_AUTHED.- Same prerequisites as the server: a logged-in Chrome (
claude-design chrome), and generation is async — kick offgenerate/iterate, thenclaude-design watch --project <id>.
The dev scripts are folded in as subcommands too: claude-design chrome (auth),
claude-design scaffold (export → packages/ui), claude-design watch (block until a
generation settles). They're equivalent to the matching pnpm run scripts.
Run it without installing globally via npx claude-design …, or node dist/cli.js …
from a clone.
Scaffold a packages/ui from an export
Turn a Claude Design export (the project/ folder of a handoff bundle, or a plain
export dir) into a maintainable token + UI package: DTCG tokens → Style Dictionary →
Tailwind v4 @theme, plus a component skeleton. Components are scaffolded (not
auto-converted) with the raw export kept under _design-source/ for Claude Code to port.
pnpm run scaffold:ui -- --src <exportDir> --out <repo>/packages --name ui --ds-name "My DS"
Produces packages/tokens (DTCG JSON source of truth + build/theme.css + tokens.ts,
rebuildable with style-dictionary build) and packages/ui (styles/, primitives/,
components/, index.ts, CLAUDE.md), plus a root PROMPT.md with porting steps.
Primitives land in :root; semantic tokens become Tailwind utilities via @theme inline,
with var() references preserved so a one-token re-theme still cascades.
Registering with Claude Code / Cursor
Copy .mcp.json into your project, or add an entry to your existing MCP config:
{
"mcpServers": {
"claude-design": {
"command": "node",
"args": ["/absolute/path/to/claude-design-mcp/dist/server.js"]
}
}
}
Architecture
src/server.ts— MCP stdio server; thin tool dispatcher.src/backend.ts—DesignBackendinterface (the contract every backend implements).src/browser.ts— CDP acquisition: spawn/reuse real Chrome with a debug port, attach over CDP, find the design tab.src/backends/cdp.ts— CDP-attached backend; reattaches per call so generations survive across tool calls.src/selectors.ts— ⚠️ THE ONLY PLACE selectors and endpoint patterns live. UI shifts? Edit this one file.src/registry.ts— PersistsprojectId → { url, name }across stdio invocations.src/config.ts/src/errors.ts— env-driven config + structured loud errors.
Once recon captures Claude Design's internal API, tool bodies wire to in-page
fetch (preferred) or DOM interaction, both centralized via src/selectors.ts.
Secrets
./.auth/ (the Chrome debug profile, holding your logged-in session) and any
captures in ./recon/ are gitignored. Never commit them. See
SECURITY.md for the full list and reporting policy.
Contributing
Issues and PRs welcome. See CONTRIBUTING.md for dev setup and
the one rule that matters: when claude.ai changes, fix src/selectors.ts first.
License
MIT © Brokenc0de. Unofficial; not affiliated with Anthropic.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。