Windsurf
Windsurf 會從 .windsurf/rules/ 讀取工作區設計規則,並在 ~/.codeium/windsurf/mcp_config.json 中使用 serverUrl 欄位註冊 HTTP MCP 伺服器。
DESIGN.md 的放置位置
my-app/
├── DESIGN.md
└── .windsurf/
└── rules/
└── design-system.md設定 .windsurf/rules/design-system.md
新增一條簡潔的規則,讓 Cascade 在處理前端程式碼時讀取您的根目錄 DESIGN.md:
---
trigger: glob
globs: src/components/**, src/app/**
---
Before building or editing UI components, read `DESIGN.md` at the repository root.
Apply its YAML tokens (`colors`, `typography`, `rounded`, `spacing`, `components`) and follow the `Do's and Don'ts` section. Do not introduce unapproved hex colors or arbitrary shadows.連線 DesignMD Pro MCP 伺服器
Windsurf 的 MCP 設定檔為 ~/.codeium/windsurf/mcp_config.json,而遠端 HTTP 伺服器使用的是 serverUrl 而非 url:
{
"mcpServers": {
"designmdpro": {
"serverUrl": "https://designmdpro.app/mcp"
}
}
}若使用 Pro API 金鑰(dmdp_…,來自 帳戶 → API 金鑰):
{
"mcpServers": {
"designmdpro": {
"serverUrl": "https://designmdpro.app/mcp",
"headers": {
"Authorization": "Bearer dmdp_your_api_key"
}
}
}
}儲存 mcp_config.json 後,請從 Windsurf 的 MCP 面板重新載入 MCP 伺服器。
提示詞範本
Read DESIGN.md and build the account API keys settings table using the
defined border hairlines, typography scale, and button-primary component tokens.Use the designmdpro MCP server to look up Linear's DESIGN.md (only Colors and
Elevation & Depth sections) and summarize how it handles surface hierarchy.常見陷阱
- 在
mcp_config.json中誤用"url"而非"serverUrl":Windsurf 針對 Streamable HTTP MCP 端點要求使用"serverUrl"。 - 未限定範圍的規則在非 UI 編輯時執行:請使用
trigger: glob(或手動@提及),讓設計指南僅在編輯 UI 程式碼時載入。
下一步
- MCP 伺服器參考 — 工具清單、參數以及匿名與 Pro 層級
- OpenAI Codex 整合 —
AGENTS.md與 Codex MCP 設定
Last updated on