Mozaic MCP Server

Mozaic MCP Server

Provides AI assistants access to the ADEO Mozaic Design System, enabling lookups of design tokens, component documentation, icons, and CSS utilities, plus generation of Vue and React component code snippets.

Category
访问服务器

README

Mozaic MCP Server

An MCP (Model Context Protocol) server that exposes the Mozaic Design System by ADEO to Claude and other AI assistants.

View Documentation | Try the Playground

Note: This project is under active development. Contributions and feedback are welcome!

What It Does

This server indexes the entire Mozaic Design System and makes it queryable through MCP tools. AI assistants can:

  • Look up design tokens (colors, spacing, typography, etc.)
  • Get component documentation with props, slots, events, and examples
  • Search and retrieve icons with SVG/React/Vue code
  • Search documentation pages
  • Generate component code snippets

Quick Start

pnpm install
pnpm build   # Compiles TypeScript & builds the database
pnpm start   # Starts the MCP server

What's Indexed

Type Count Description
Design Tokens 586 Colors, typography, spacing, shadows, borders, screens, grid
Vue Components 52 Props, slots, events, examples
React Components 39 Props, callbacks, examples
Icons 1,473 SVG icons in 15 categories (354 unique, 5 sizes each)
CSS Utilities 6 Flexy, Container, Margin, Padding, Ratio, Scroll (500+ classes)
Documentation 281 MDX pages with full-text search

Documentation sources:

  • Design System docs (220 pages)
  • Vue Storybook docs (58 pages) - Getting Started, Usage guides
  • React Storybook docs (3 pages) - Getting Started, Usage guides

MCP Tools

Component Tools

Tool Description
get_component_info Get Vue/React component details (props, slots, events, examples)
list_components List framework components by category
generate_vue_component Generate Vue component code
generate_react_component Generate React component code

CSS Utility Tools

Tool Description
get_css_utility Get CSS utility classes and examples (Flexy, Margin, etc.)
list_css_utilities List available CSS utilities by category (layout, utility)

Icon Tools

Tool Description
search_icons Search icons by name, type (navigation, media, social), or size (16-64px)
get_icon Get icon details with SVG markup and ready-to-use React/Vue code

Installation Tools

Tool Description
get_install_info Get installation commands, imports, and quick start code for a component (beta)

Other Tools

Tool Description
get_design_tokens Query tokens by category (color, spacing, typography, shadow, border, screen, grid)
search_documentation Full-text search across all docs

Token Categories

Category Count Examples
color 482 --color-primary-01-100, --color-button-solid-*
typography 60 --font-size-*, --line-height-*
spacing 19 $mu025 to $mu1000 (Magic Unit system)
screen 12 Breakpoints: s, m, l, xl, xxl
shadow 3 Box shadows with x, y, blur, spread, opacity
border 3 Border widths
radius 3 Border radius values
grid 4 Gutters, magic-unit, rem values

CSS Utilities

CSS-only layout and utility classes (no Vue/React wrapper). Use get_css_utility tool to get full class lists and examples.

Utility Category Description
Flexy layout Flexbox 12-column grid with responsive classes
Container layout Responsive container with max-width
Margin utility Margin utilities using Magic Unit scale
Padding utility Padding utilities using Magic Unit scale
Ratio utility Aspect ratio utilities (16:9, 4:3, 1:1, etc.)
Scroll utility Scroll prevention utility

Architecture

┌─────────────────────────────────────────────────────────────┐
│                     Claude Desktop                          │
└─────────────────────────┬───────────────────────────────────┘
                          │ stdio
┌─────────────────────────▼───────────────────────────────────┐
│                    MCP Server                               │
│  ┌─────────────────────────────────────────────────────┐   │
│  │ Tools: get_component_info, get_css_utility, ...     │   │
│  └─────────────────────────┬───────────────────────────┘   │
│                            │                                │
│  ┌─────────────────────────▼───────────────────────────┐   │
│  │                 SQLite Database                     │   │
│  │  tokens | components | icons | css_utilities | docs │   │
│  └─────────────────────────────────────────────────────┘   │
└─────────────────────────────────────────────────────────────┘
                          ▲
                          │ build
┌─────────────────────────┴───────────────────────────────────┐
│                    Source Repositories                      │
│  mozaic-design-system  │  mozaic-vue  │  mozaic-react      │
└─────────────────────────────────────────────────────────────┘

Scripts

Script Description
pnpm build Compile TypeScript and build database
pnpm build:docs Generate documentation diagrams
pnpm start Start the MCP server
pnpm dev Development mode with watch
pnpm clean Remove dist and database
pnpm test Run unit tests
pnpm database:sanity Validate database integrity

Documentation

Next Steps

Benchmarking: MCP vs Claude Skills

Compare performance and effectiveness of MCP server approach vs native Claude skills:

  • [ ] Define benchmark scenarios (component lookup, code generation, documentation search)
  • [ ] Measure response accuracy and completeness
  • [ ] Compare token usage and latency
  • [ ] Evaluate context window efficiency
  • [ ] Document trade-offs and recommendations

Release Process

Steps to publish the MCP server:

  • [ ] npm registry: Publish to npm (npm publish)
  • [ ] Smithery: Submit to smithery.ai MCP marketplace
  • [ ] GitHub release: Create tagged release with changelog
  • [ ] Claude Desktop config: Document installation in claude_desktop_config.json
  • [ ] Version strategy: Define semver policy for database schema changes

Future Improvements

  • [ ] Incremental database updates (avoid full rebuild)
  • [ ] Watch mode for local development
  • [ ] Caching layer for frequently accessed data
  • [ ] Support for custom/extended tokens
  • [ ] Multi-language documentation support

Version History

Compatibility with Mozaic Design System versions:

MCP Server Mozaic Version Date Changes
1.0.0 2.x 2024-12 Initial release with Vue 3, React, CSS utils

Mozaic Repositories Indexed

Repository Branch Description
mozaic-design-system main Tokens, docs, styles
mozaic-vue main Vue 3 components
mozaic-react main React components

Updating for New Mozaic Versions

When a new Mozaic version is released:

  1. Pull latest changes: pnpm build (clones/updates repos automatically)
  2. Run sanity check: pnpm database:sanity
  3. Run tests: pnpm test
  4. Update version table above
  5. Tag release: git tag vX.Y.Z

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选