design-token-bridge-mcp
Translates design tokens across platforms — extracts from Tailwind/CSS/Figma and generates native themes for Material 3, SwiftUI, and CSS variables with WCAG contrast validation.
README
design-token-bridge-mcp
<a href="https://glama.ai/mcp/servers/kenneives/design-token-bridge-mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/kenneives/design-token-bridge-mcp/badge" /> </a>
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
npm install -g design-token-bridge-mcp
From source
git clone https://github.com/kenneives/design-token-bridge-mcp.git
cd design-token-bridge-mcp
npm install && npm run build
Configure with Claude Code
Add to your Claude Code MCP settings (~/.claude/settings.json or project .mcp.json):
{
"mcpServers": {
"design-token-bridge": {
"type": "stdio",
"command": "npx",
"args": ["-y", "design-token-bridge-mcp"]
}
}
}
Or if installed from source:
{
"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
| Tool | Input | Description |
|---|---|---|
extract_tokens_from_tailwind |
tailwind.config.js content |
Parses colors, fontSize, spacing, borderRadius, boxShadow |
extract_tokens_from_css |
CSS file content | Extracts --color-*, --space-*, --radius-*, --shadow-* custom properties |
extract_tokens_from_figma_variables |
Figma Variables API JSON | Parses COLOR, FLOAT types, resolves aliases, handles multi-mode |
extract_tokens_from_json |
W3C DTCG format JSON | Parses $value/$type/$description, resolves {aliases}, handles groups |
Generators — Universal Tokens → Output
| Tool | Output | Description |
|---|---|---|
generate_material3_theme |
Kotlin (Jetpack Compose) | lightColorScheme(), Typography, Shapes with M3 naming |
generate_swiftui_theme |
Swift (SwiftUI) | Color extensions, Font structs, optional Liquid Glass (iOS 26+) |
generate_tailwind_config |
tailwind.config.js |
Theme extend block with rem units, ESM or CJS |
generate_css_variables |
CSS custom properties | :root block with light/dark mode via prefers-color-scheme |
Validation
| Tool | Description |
|---|---|
validate_contrast |
WCAG AA/AAA contrast checking for color pairs with pass/fail + ratios |
Universal Token Schema
All tools speak this common format:
{
"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 tokenstailwind.config.js— generated Tailwind configvariables.css— generated CSS custom propertiescontrast-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:
- v0 Setup Guide — free tier signup, web UI workflow
- Figma Setup Guide — free tier MCP config (6 calls/month)
- Claude Code Setup — full pipeline configuration
- Token Extraction Guide — manual extraction when APIs aren't available
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
# 91 unit tests
npm test
# 31 Playwright visual/responsive tests
npm run test:e2e
Contributing
See CONTRIBUTING.md for development setup, project structure, and PR guidelines.
License
MIT — see LICENSE.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。