ds-mcp-sync
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ds-mcp-sync Sync design tokens from Figma"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
DS MCP Sync Server
An MCP (Model Context Protocol) server that enables seamless synchronization between your Figma design system and your Design System codebase.
Features
šØ Design Token Sync - Extract colors, typography, spacing, and shadows from Figma styles
š§© Component Generation - Automatically generate React components from Figma components
š Storybook Integration - Auto-generate Storybook stories with all component variants
āļø Atomic Design - Maps Figma components to atoms, molecules, and organisms
š Incremental Updates - Only sync what has changed
š Smart Analysis - Learns from existing component patterns
Related MCP server: Figma to React MCP
Installation
Clone and install dependencies:
git clone <repository-url>
cd ds-mcp-sync
npm install
npm run buildConfigure your credentials:
Create a config/mcp-config.json file or set environment variables:
{
"figma": {
"fileId": "your-figma-file-id",
"accessToken": "your-figma-personal-access-token",
"componentPrefix": "DS"
},
"mds": {
"rootPath": "../design-system",
"componentPath": "component-lib/components",
"tokenPath": "component-lib/tokens",
"storybookPath": "component-lib/.storybook"
}
}Environment Variables (alternative):
export FIGMA_ACCESS_TOKEN="your-token-here"
export FIGMA_FILE_ID="your-file-id"
export DS_ROOT_PATH="../design-system"Getting Figma Credentials
1. Get Figma Personal Access Token
Go to Figma Account Settings
Scroll to "Personal Access Tokens"
Click "Create a new personal access token"
Give it a name (e.g., "DS Sync") and create
Copy the token and add it to your config
2. Get Figma File ID
From your Figma design system URL:
https://www.figma.com/file/ABC123DEF456/Design-System
^^^^^^^^^^^^
This is your file IDMCP Integration with Claude Code
Add this server to your Claude Code MCP configuration:
macOS/Linux: ~/.claude_mcp.json
Windows: %APPDATA%\Claude\claude_mcp.json
{
"mcpServers": {
"ds-mcp-sync": {
"command": "node",
"args": ["/path/to/ds-mcp-sync/dist/index.js"],
"env": {
"FIGMA_ACCESS_TOKEN": "your-token",
"FIGMA_FILE_ID": "your-file-id"
}
}
}
}Usage with Claude Code
Once configured, you can use these commands in Claude Code:
Check for Updates
claude "Check if there are any new components in Figma"Sync Design Tokens
claude "Sync design tokens from Figma to DS"Generate Specific Component
claude "Generate the Button component from Figma"Full Synchronization
claude "Sync all new components from Figma to DS"Validate Setup
claude "Validate the MCP server setup"Available MCP Tools
Tool | Description |
| Compare Figma with current DS and report differences |
| Extract and update design tokens from Figma styles |
| Create a specific component with TypeScript and stories |
| Perform complete synchronization (with optional dry-run) |
| Test Figma connection and validate configuration |
How It Works
1. Design Token Extraction
Fetches color, typography, and effect styles from Figma
Converts to DS token format (
colors.primary.500)Updates
component-lib/tokens/tokens.ts
2. Component Analysis
Scans Figma components and their variants
Determines atomic level (atoms/molecules/organisms) based on name and structure
Extracts component properties and maps to TypeScript props
3. Code Generation
Generates React components following DS patterns
Creates TypeScript interfaces with proper typing
Adds theme provider integration
Generates comprehensive Storybook stories
4. File Organization
component-lib/
āāā components/
ā āāā atoms/
ā ā āāā Button/
ā ā āāā Button.tsx
ā ā āāā Button.stories.tsx
ā ā āāā index.ts
ā āāā molecules/
ā āāā organisms/
āāā tokens/
āāā tokens.tsComponent Mapping Rules
Figma Component | Atomic Level | Reason |
Button, Input, Icon | Atoms | Basic UI elements |
Card, Modal, Dropdown | Molecules | Groups of atoms |
Header, Table, Navigation | Organisms | Complex layouts |
Configuration Options
{
"figma": {
"fileId": "string", // Required: Figma file ID
"accessToken": "string", // Required: Personal access token
"componentPrefix": "string" // Optional: Filter components by prefix
},
"mds": {
"rootPath": "string", // Path to MDS root directory
"componentPath": "string", // Relative path to components
"tokenPath": "string", // Relative path to tokens
"storybookPath": "string" // Relative path to Storybook config
},
"dryRun": false, // Run without making file changes
"verbose": true // Enable detailed logging
}Troubleshooting
Common Issues
"Figma API connection failed"
Verify your personal access token
Check that the token has access to the file
Ensure the file ID is correct
"DS paths not accessible"
Verify the
rootPathpoints to your DS directoryCheck that component directories exist
Ensure write permissions
"Component generation failed"
Check that the Figma component has proper naming
Verify component properties are set up correctly
Look for TypeScript compilation errors
Debug Mode
Set verbose: true in config or VERBOSE=true environment variable for detailed logging.
Development
# Development mode with hot reload
npm run dev
# Build for production
npm run build
# Run linting
npm run lint
# Type checking
npm run typecheckContributing
Fork the repository
Create a feature branch
Make your changes
Add tests if applicable
Submit a pull request
License
MIT License - see LICENSE file for details.
Need help? Check the troubleshooting section or create an issue on GitHub.# ds-mcp-sync
Available Tools
5 toolscheck_figma_updatesB
Check for new or updated components in Figma design system
Inputs: no named parameters.
generate_componentC
Generate a specific component from Figma
Inputs: componentName (required).
sync_allC
Perform full synchronization between Figma and DS
Inputs: dryRun.
sync_tokensA
Sync design tokens from Figma to DS
Inputs: no named parameters.
validate_setupC
Validate MCP server configuration and connections
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogā¦
TDQS
Scored across 5 tools
Each tool has a distinct purpose: checking updates, generating a component, syncing all, syncing tokens, and validating setup. No overlap in functionality.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., check_figma_updates, generate_component).
5 tools is well-scoped for a Figma-DS sync server, covering key operations without being too few or excessive.
The tools cover the full sync workflow: checking updates, generating components, syncing tokens, performing full sync, and validating setup. No major gaps apparent.
Maintenance
Related MCP Connectors
Build and manage your design system with AI: tokens, themes, components, icons, Figma and code.
Access and maintain design system docs, tokens, components, skills, and contexts across any project.
Design System Manager for shadcn/ui: tokens, fonts, radius, components, icons, blocks, Figma sync.
Visual builder for React Native and Expo apps. Read and update project design tokens.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables bidirectional synchronization between IDEs and Figma for Design System management, allowing developers to generate React components and synchronize design tokens, icons, and components across platforms.1MIT
- AlicenseBqualityDmaintenanceAutomates the conversion of Figma designs into TypeScript React components and integrates with GitHub to create pull requests for the generated code. It includes visual regression testing with Playwright and accessibility validation to ensure implementations match the original designs.521 npmMIT
- AlicenseAqualityDmaintenanceConverts Figma designs into production-ready React components with design token extraction, widget registry integration, and micro-frontend module generation.351 npm1MIT
- AlicenseNot gradedqualityDmaintenanceConnects Figma designs to React components using your actual component library, enabling AI tools to generate production-ready code with proper imports.1MIT