Skip to main content
Glama
README.md
# UI/UX MCP Server

A comprehensive Model Context Protocol (MCP) server that integrates 5 powerful tools for complete UI/UX development workflows.

## Features

### ๐Ÿ“š Component Development (Storybook)
- Get and manage stories
- Run visual regression tests
- Accessibility testing
- Component documentation

### ๐Ÿ’… Styling System (Tailwind CSS)
- Generate configurations from design tokens
- Optimize and deduplicate classes
- Create custom design systems
- CSS variable generation

### ๐ŸŽฌ Animation (Framer Motion + GSAP)
- Create complex animation timelines
- Generate animation code
- Preview animations
- Multiple easing options

### ๐Ÿงช Testing & Automation (Playwright)
- Cross-browser UI testing
- Visual regression testing
- Screenshot capture across viewports
- Automated user flow testing

### ๐Ÿงฉ Component Library Management
- Generate components in React/Vue/Svelte
- Analyze component performance
- Accessibility compliance checking
- Auto-generate tests and documentation

### ๐Ÿ”„ Workflow Automation
- UX optimization analysis
- Design system generation from Storybook or code
- End-to-end workflow automation

## Installation

1. Clone this repository:
```bash
cd ~/KenKaiBuildMCP/design-ui-mcps/ui-ux-mcp-server
```

2. Install dependencies:
```bash
npm install
```

3. Create a `.env` file from the example:
```bash
cp .env.example .env
```

4. Configure your environment variables:
```env
STORYBOOK_URL=http://localhost:6006
# ... other configurations
```

5. Build the server:
```bash
npm run build
```

## Configuration

Add to your Claude Desktop MCP settings (`~/Library/Application Support/Claude/claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "ui-ux-mcp": {
      "command": "node",
      "args": ["/Users/YOUR_USERNAME/KenKaiBuildMCP/design-ui-mcps/ui-ux-mcp-server/dist/index.js"]
    }
  }
}
```

## Available Tools

### Storybook Tools
- `storybook_get_stories` - Get list of all Storybook stories
- `storybook_test_component` - Run visual and accessibility tests

### Tailwind Tools
- `tailwind_generate_config` - Generate Tailwind config from design tokens
- `tailwind_optimize_classes` - Optimize and deduplicate Tailwind classes

### Animation Tools
- `animation_create_timeline` - Create animation timeline with Framer Motion or GSAP
- `animation_preview` - Generate preview of animation sequence

### Playwright Tools
- `playwright_test_ui` - Run UI tests with Playwright
- `playwright_capture_screenshots` - Capture screenshots across browsers

### Component Tools
- `component_create` - Create a new UI component with best practices
- `component_analyze` - Analyze component for performance and accessibility

### Workflow Tools
- `workflow_optimize_ux` - Run comprehensive UX optimization analysis
- `workflow_build_design_system` - Generate complete design system from Storybook or code

## Usage Examples

### Run UX Optimization Analysis
```javascript
await workflow_optimize_ux({
  url: "https://your-website.com",
  analyses: ["performance", "accessibility", "mobile", "seo"]
})
```

### Create Animation Timeline
```javascript
await animation_create_timeline({
  library: "framer-motion",
  animations: [
    {
      target: ".hero-title",
      properties: { opacity: 1, y: 0 },
      duration: 0.6,
      delay: 0.2
    }
  ]
})
```

### Generate Design System
```javascript
await workflow_build_design_system({
  source: "storybook",
  sourceId: "http://localhost:6006",
  includeTokens: true,
  includeComponents: true,
  includeDocumentation: true
})
```

## Development

### Run in development mode:
```bash
npm run dev
```

### Run tests:
```bash
npm test
```

### Lint code:
```bash
npm run lint
```

## Architecture

```
ui-ux-mcp-server/
โ”œโ”€โ”€ src/
โ”‚   โ”œโ”€โ”€ index.ts           # Main server entry point
โ”‚   โ””โ”€โ”€ tools/
โ”‚       โ”œโ”€โ”€ storybook.ts   # Storybook automation
โ”‚       โ”œโ”€โ”€ tailwind.ts    # Tailwind CSS management
โ”‚       โ”œโ”€โ”€ animation.ts   # Animation tools
โ”‚       โ”œโ”€โ”€ playwright.ts  # Browser automation
โ”‚       โ”œโ”€โ”€ components.ts  # Component management
โ”‚       โ””โ”€โ”€ workflows.ts   # Workflow automation
โ”œโ”€โ”€ dist/                  # Compiled JavaScript
โ”œโ”€โ”€ package.json
โ”œโ”€โ”€ tsconfig.json
โ””โ”€โ”€ README.md
```

## Requirements

- Node.js 18+
- npm or yarn
- Running Storybook instance (for Storybook features)

## Contributing

1. Fork the repository
2. Create your feature branch
3. Commit your changes
4. Push to the branch
5. Create a Pull Request

## License

MIT

## Support

For issues and questions, please open an issue in the repository.

TDQS

B3.1/5.0

Scored across 12 tools

Disambiguation4/5

Most tools have clearly distinct purposes targeting different aspects of UI/UX development (animation, component work, testing, styling, workflows). However, there is some potential overlap between 'component_analyze' and 'workflow_optimize_ux' as both involve analysis/optimization, and 'playwright_test_ui' and 'storybook_test_component' both involve testing, though their specific scopes (UI vs component) help differentiate them.

Naming Consistency4/5

The naming follows a consistent pattern of 'domain_action' or 'domain_verb_noun' (e.g., animation_create_timeline, component_analyze, storybook_get_stories). All tools use snake_case consistently. Minor deviations exist, such as 'playwright_capture_screenshots' using a verb_noun structure while others like 'tailwind_generate_config' use verb_noun, but overall it's highly readable and predictable.

Tool Count5/5

With 12 tools, the count is well-scoped for a UI/UX server covering animation, component development, testing, styling, and workflows. Each tool appears to serve a distinct function within this domain, and the number is neither too sparse nor overwhelming, fitting typical expectations for a specialized server.

Completeness4/5

The tool set covers key areas of UI/UX development comprehensively, including creation, analysis, testing, and optimization. Minor gaps exist, such as no explicit tools for updating or deleting components or animations, and limited coverage of collaboration features (e.g., version control or team workflows), but agents can likely work around these with the provided tools.

Maintenance

ActivityInactive
ResponsivenessNo issues