Design Token Bridge Mcp

io.github.kenneives由 GitHub 帳號 kenneives 發布v1.0.2更新於 Oct 24, 2026

Translate design tokens between Tailwind, Figma, CSS, Material 3, and SwiftUI

已驗證STDIO僅桌面開發者工具媒體與設計

概覽

AI 產生的概覽

本機 MCP 伺服器,在 Tailwind、CSS、Figma 變數、W3C DTCG JSON、Material 3 與 SwiftUI 主題之間轉換設計權杖。

可以做什麼
  • 從 Tailwind 設定、CSS 自訂屬性、Figma Variables JSON 與 W3C DTCG JSON 擷取權杖,統一成通用權杖結構
  • 產生 Material 3 Kotlin 主題、SwiftUI 主題(可選 Liquid Glass)、Tailwind 設定或含明暗模式的 CSS 變數
  • 對顏色組合做 WCAG AA/AAA 對比度檢查,回傳是否通過與對比度比值
  • 可串接各步驟,把同一份權杖輸出到 Web、Android 與 iOS 目標
適用情境
適合需要把設計系統或品牌色盤同步到 Web、Android 與 iOS 程式庫的情境,也適合讓助理依現有 Tailwind、CSS 或 Figma 權杖來源重新產生原生主題檔並檢查對比度。
執行需求
以本機 stdio 程序在桌面端執行。可全域安裝 npm 套件或用 npx 執行,也可用 Node.js 從原始碼建置後執行建置產物。未宣告帳號、API 金鑰或環境變數;權杖輸入以檔案內容形式傳入。
安裝前請注意
工具會讀取你提供的權杖檔案內容並回傳產生的主題程式碼,提交到專案前應檢查產生的設定與主題。未宣告憑證或網路存取,但 README 連結的外部設定指南與第三方信任檔案不屬於伺服器本身。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Design Token Bridge Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

[AgentAvow Trust] — signed, offline-verifiable tool-safety grade

design-token-bridge-mcp

[圖片]
[AgentGraph Trust Score]

Verified on AgentGraph — trust infrastructure for AI agents. View profile

An MCP server that translates design tokens between platforms. Extract tokens from Tailwind, CSS, Figma, or W3C DTCG format — then generate native themes for Material 3 (Kotlin), SwiftUI (with Liquid Glass), Tailwind, and CSS Variables.

Built for the v0 → Figma → Claude Code design pipeline.

┌──────────────┐     ┌──────────────┐     ┌────────────────────────┐│  Tailwind     │     │              │     │  Material 3 (Kotlin)   ││  CSS Vars     │────▶│  Universal   │────▶│  SwiftUI (Swift)       ││  Figma Vars   │     │  Token       │     │  Tailwind Config       ││  W3C DTCG     │     │  Schema      │     │  CSS Variables         │└──────────────┘     └──────────────┘     └────────────────────────┘    Extractors           Bridge              Generators

Install

From npm

bash
npm install -g design-token-bridge-mcp

From source

bash
git clone https://github.com/kenneives/design-token-bridge-mcp.gitcd design-token-bridge-mcpnpm install && npm run build

Configure with Claude Code

Add to your Claude Code MCP settings (~/.claude/settings.json or project .mcp.json):

json
{  "mcpServers": {    "design-token-bridge": {      "type": "stdio",      "command": "npx",      "args": ["-y", "design-token-bridge-mcp"]    }  }}

Or if installed from source:

json
{  "mcpServers": {    "design-token-bridge": {      "type": "stdio",      "command": "node",      "args": ["/path/to/design-token-bridge-mcp/build/index.js"]    }  }}

Tools (9 total)

Extractors — Input → Universal Tokens

ToolInputDescription
extract_tokens_from_tailwindtailwind.config.js contentParses colors, fontSize, spacing, borderRadius, boxShadow
extract_tokens_from_cssCSS file contentExtracts --color-*, --space-*, --radius-*, --shadow-* custom properties
extract_tokens_from_figma_variablesFigma Variables API JSONParses COLOR, FLOAT types, resolves aliases, handles multi-mode
extract_tokens_from_jsonW3C DTCG format JSONParses $value/$type/$description, resolves {aliases}, handles groups

Generators — Universal Tokens → Output

ToolOutputDescription
generate_material3_themeKotlin (Jetpack Compose)lightColorScheme(), Typography, Shapes with M3 naming
generate_swiftui_themeSwift (SwiftUI)Color extensions, Font structs, optional Liquid Glass (iOS 26+)
generate_tailwind_configtailwind.config.jsTheme extend block with rem units, ESM or CJS
generate_css_variablesCSS custom properties:root block with light/dark mode via prefers-color-scheme

Validation

ToolDescription
validate_contrastWCAG AA/AAA contrast checking for color pairs with pass/fail + ratios

Universal Token Schema

All tools speak this common format:

json
{  "colors": {    "primary": { "value": "#6750A4", "description": "Brand primary", "category": "primary" }  },  "typography": {    "display-large": { "fontSize": 57, "lineHeight": 64, "fontWeight": 400, "fontFamily": "Inter" }  },  "spacing": { "xs": 4, "sm": 8, "md": 16 },  "radii": { "sm": 8, "md": 12, "lg": 16 },  "elevation": {    "low": {      "shadowColor": "#000000",      "shadowOffset": { "x": 0, "y": 2 },      "shadowRadius": 4,      "shadowOpacity": 0.1    }  },  "motion": {    "fast": { "duration": 150, "easing": "ease-out" }  }}

Example: Full Pipeline

1. Extract tokens from a Tailwind config

Use extract_tokens_from_tailwind with the contents of my tailwind.config.js

2. Generate native themes from the extracted tokens

Take those tokens and run them through:- generate_tailwind_config (for the web app)- generate_material3_theme (for Android)- generate_swiftui_theme with liquidGlass=true (for iOS)- generate_css_variables (for a vanilla CSS fallback)

3. Validate accessibility

Run validate_contrast on those tokens at AAA level

Example Output

See the examples/qt-games/ directory for a complete responsive landing page built entirely from MCP-generated tokens, including:

  • qt-games-tokens.json — extracted universal tokens
  • tailwind.config.js — generated Tailwind config
  • variables.css — generated CSS custom properties
  • contrast-report.json — WCAG validation (AAA pass)
  • index.html + styles.css — responsive landing page using the generated tokens

v0 + Figma Free Tier Setup

This MCP works with free tiers of both v0 and Figma. See the setup guides:

Tech Stack

  • TypeScript + Node.js
  • @modelcontextprotocol/sdk v1.x (stdio transport)
  • Zod for schema validation
  • Zero heavyweight dependencies — no Babel, no PostCSS, no Style Dictionary

Tests

bash
# 91 unit testsnpm test
# 31 Playwright visual/responsive testsnpm run test:e2e

Contributing

See CONTRIBUTING.md for development setup, project structure, and PR guidelines.

License

MIT — see LICENSE.

來源:README.md,提交 d13c8b3

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.2最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分