design-architect-mcp
MCP server that exposes a design system and UX rulebook as tools, enabling AI to generate UI consistent with your design tokens, components, layout rules, accessibility guidelines, and templates. It also provides a review tool to score UI proposals against the design system.
README
design-architect-mcp
A stateless Model Context Protocol (MCP) server that exposes a custom design system and UX rulebook as MCP tools. Connect it to Figma Make (or any MCP-compatible client) as a custom connector so that generated UI follows your design language — tokens, components, layout rules, accessibility guidance, and page templates — instead of inventing random styles.
What it exposes
| Tool | Purpose |
|---|---|
get_design_tokens |
Colors, spacing, radius, shadow, and typography tokens |
get_design_principles |
High-level design principles (modern, minimal, mobile-first, etc.) |
get_layout_rules |
Grid columns per breakpoint, max content width, preferred navigation |
get_component_library |
Purpose/variants/sizing/states/accessibility for 14 core components |
get_accessibility_rules |
WCAG-oriented contrast, keyboard, focus, semantics, and ARIA guidance |
review_ui_proposal |
Scores a generated UI description (0-100) against the design system, with issues + recommendations |
get_dashboard_template |
Standard SaaS dashboard layout (Sidebar, Header, Stats, Table, Filters, Actions) |
get_form_template |
Standard form page layout (Header, Description, Sections, Inputs, Actions) |
get_landing_page_template |
Standard landing page layout (Hero, Features, Benefits, Testimonials, CTA, Footer) |
get_design_system |
Loads a full vertical-specific design system: saas, fintech, healthcare, or ecommerce |
All data is loaded from JSON files (design-system.json and designs/*.json), not hardcoded, so you can
tune tokens and rules without touching any TypeScript.
Architecture
/src
/tools one file per MCP tool, each exports a register*Tool(server) function
/data loader.ts reads and caches the JSON design system files
/types shared TypeScript interfaces
server.ts Express app exposing the MCP server over stateless Streamable HTTP
design-system.json default design system used by the "base" tools
/designs
saas.json
fintech.json
healthcare.json
ecommerce.json
The server is stateless: every POST /mcp request creates a brand-new McpServer + transport pair
with no session ID. This keeps horizontal scaling trivial (no session affinity or shared state needed) and
matches how most PaaS platforms (Railway, Render, Fly.io, Azure Container Apps) run containers behind a load
balancer.
Prerequisites
- Node.js 18+
- npm 9+
1. Local setup
git clone <your-repo-url> design-architect-mcp
cd design-architect-mcp
cp .env.example .env
npm install
npm run dev
This starts the server with tsx watch on http://localhost:3000. Verify it's alive:
curl http://localhost:3000/health
# {"status":"ok","service":"design-architect-mcp"}
Test a tool call directly against the MCP endpoint:
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": { "name": "get_design_tokens", "arguments": {} }
}'
For a production-style run:
npm run build
npm start
Connecting to Figma Make
In Figma Make, add a custom MCP connector and point it at:
https://<your-deployed-domain>/mcp
(For local testing, expose your local port with a tunneling tool such as ngrok http 3000 and use the
resulting HTTPS URL, since most external tools require HTTPS.)
2. Docker setup
Build and run the container locally:
docker build -t design-architect-mcp .
docker run --rm -p 3000:3000 --env-file .env design-architect-mcp
Check health:
curl http://localhost:3000/health
The image is a multi-stage build: dependencies and TypeScript compilation happen in a build stage, and
only the compiled dist/, production node_modules, and the JSON data files are copied into the final
production stage, which runs as a non-root user.
3. Deploying to Railway
- Push this repository to GitHub (or your Git host of choice).
- In Railway: New Project → Deploy from GitHub repo, select this repo.
- Railway will detect the
Dockerfileand build it automatically. If it instead tries to use Nixpacks, explicitly set the builder to Dockerfile in the service's Settings → Build. - Under Variables, add:
PORT— Railway injects its ownPORT; the server already readsprocess.env.PORT, so no change is needed, but you can overrideNODE_ENV=productionandALLOWED_ORIGINSif desired.
- Deploy. Railway will give you a public URL like
https://design-architect-mcp.up.railway.app. - Your MCP endpoint is
https://design-architect-mcp.up.railway.app/mcp.
4. Deploying to Render
- Push this repository to GitHub.
- In Render: New → Web Service, connect the repo.
- Set:
- Environment: Docker
- Dockerfile Path:
Dockerfile(default) - Health Check Path:
/health
- Add environment variables from
.env.exampleunder Environment → Environment Variables. - Deploy. Render will expose the service on
https://<service-name>.onrender.com. - Your MCP endpoint is
https://<service-name>.onrender.com/mcp.
5. Deploying to Fly.io
fly launch --no-deploy # generates fly.toml, detects the Dockerfile
fly secrets set NODE_ENV=production
fly deploy
Make sure fly.toml has an [http_service] section with internal_port = 3000 (matching the PORT the
container listens on) and that health checks point at /health.
6. Deploying to Azure Container Apps
# 1. Build and push the image to Azure Container Registry (ACR)
az acr create --resource-group <rg> --name <acrName> --sku Basic
az acr build --registry <acrName> --image design-architect-mcp:latest .
# 2. Create (or reuse) a Container Apps environment
az containerapp env create \
--name design-architect-env \
--resource-group <rg> \
--location <region>
# 3. Deploy the container app
az containerapp create \
--name design-architect-mcp \
--resource-group <rg> \
--environment design-architect-env \
--image <acrName>.azurecr.io/design-architect-mcp:latest \
--target-port 3000 \
--ingress external \
--registry-server <acrName>.azurecr.io \
--env-vars NODE_ENV=production
Azure Container Apps will give you a public FQDN, e.g. https://design-architect-mcp.<hash>.<region>.azurecontainerapps.io.
Your MCP endpoint is that URL + /mcp.
Customizing the design system
- Edit
design-system.jsonto change the defaults returned byget_design_tokens,get_design_principles,get_layout_rules,get_component_library,get_accessibility_rules, and the three template tools. - Edit or add files under
/designsto change or extend the vertical-specific systems returned byget_design_system(currentlysaas,fintech,healthcare,ecommerce). To add a new vertical, add adesigns/<name>.jsonfile with the same shape and add<name>to thesystemenum insrc/tools/designSystem.tsandDESIGN_SYSTEM_NAMESinsrc/types/index.ts. - No rebuild is required for JSON changes when running with
npm run dev— the loader re-reads on first use per process start. In production, redeploy (or restart the container) to pick up JSON changes, since values are cached in memory per instance for performance.
Notes on statelessness
Because sessionIdGenerator is left undefined when constructing StreamableHTTPServerTransport, this
server does not support the SSE resumable-stream or session-based parts of the Streamable HTTP spec
(GET /mcp and DELETE /mcp both return 405). Every POST /mcp call is fully self-contained, which is
the right tradeoff for a read-mostly, rules/reference server like this one.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。