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

[![MCP](https://img.shields.io/badge/MCP-server-6f42c1)](https://modelcontextprotocol.io)
[![principles](https://img.shields.io/badge/principles-74-blue)](#-knowledge-base)
[![patterns](https://img.shields.io/badge/patterns-30-blue)](#-knowledge-base)
[![tokens](https://img.shields.io/badge/tokens-89-blue)](#-knowledge-base)
[![licence](https://img.shields.io/badge/licence-MIT-green)](LICENSE)

A Model Context Protocol server that gives a coding agent a design reference to
consult: 74 principles, 30 patterns and 89 tokens, each with rationale, good and
bad examples, and a book citation — rather than the agent guessing what good UI
looks like.

Every tool returns formatted Markdown, not JSON, because the consumer is a
language model.

## What it looks like in use

Asked to review a modal, the agent calls `get_accessibility_checklist`:

```markdown
# Accessibility Checklist: Modal Dialogs
**Target Level:** WCAG AA

## Critical Requirements

- [ ] Use role="dialog" and aria-modal="true" [Level A]
- [ ] Provide accessible name via aria-labelledby or aria-label [Level A]
- [ ] Trap keyboard focus within modal [Level A]
- [ ] Close modal on Escape key [Level AA]
- [ ] Return focus to trigger element on close [Level AA]
- [ ] Initial focus on first interactive element (or title) [Level A]

## Additional Requirements

- [ ] Background content marked as inert [Level A]
- [ ] Scroll lock on body while modal is open [Level AA]

## Related Principles
Use `get_design_principles` with these IDs for detailed guidance:
- `accessibility-keyboard-navigation`: Keyboard Navigation
- `accessibility-focus-visible`: Visible Focus Indicators
- `accessibility-touch-targets`: Touch Target Size
```

And `search_design_knowledge` with `"modal"`:

```
Found 2 result(s) for "modal":

1. **Modal Dialog** [pattern]
   Category: ui | ID: `pattern-modal`
   Users need to complete a focused task or acknowledge important information before continuing.
   Tags: feedback, modal, dialog, popup, overlay

2. **z-modal** [token]
   Category: z-index | ID: `z-modal`
   Modal layer
   Tags: z-index

Use `get_design_principles` or `get_design_patterns` with the ID to get full details.
```

Both blocks are verbatim output from the running server.

## 📊 Knowledge Base

- **74 Design Principles** - Nielsen's heuristics, Gestalt, Laws of UX, accessibility, mobile, typography
- **30 Design Patterns** - Navigation, forms, feedback, layout patterns with accessibility considerations
- **89 Design Tokens** - Colors, spacing, typography, shadows, breakpoints, animations
- **13 Categories** - Organized from introductory concepts to specialized topics

## 🛠️ Tools

| Tool | Description |
|------|-------------|
| `search_design_knowledge` | Fuzzy search across all principles, patterns, and tokens |
| `get_design_principles` | Retrieve principles by ID, category, subcategory, or tag |
| `get_design_patterns` | Retrieve patterns by ID, type, platform, or tag |
| `get_design_tokens` | Retrieve design tokens by name or category |
| `get_accessibility_checklist` | WCAG-based checklist for component types |

## 📚 Resources

- `uiux://categories` - List all design categories
- `uiux://principles/all` - Complete principle list
- `uiux://patterns/all` - Complete pattern list
- `uiux://tokens/all` - Complete token list
- `uiux://stats` - Knowledge base statistics

## 💬 Prompts

- `ui_review` - Review UI designs for usability issues
- `accessibility_audit` - Perform accessibility audits
- `pattern_recommendation` - Get pattern recommendations for design problems
- `design_system_tokens` - Get token recommendations for design systems

## 🚀 Installation

```bash
npm install
npm run build
```

## 📖 Usage

### With Claude Desktop

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

```json
{
  "mcpServers": {
    "uiux": {
      "command": "node",
      "args": ["/path/to/ui-ux-design-mcp/dist/index.js"]
    }
  }
}
```

### Standalone

```bash
npm start
```

## 🎯 Content Coverage

### Principles

**UX Principles (25)**
- Nielsen's 10 Usability Heuristics
- Laws of UX (Fitts's Law, Hick's Law, Miller's Law, Jakob's Law, etc.)
- Core UX (Progressive Disclosure, Feedback, Affordance, Mental Models)

**Gestalt Principles (8)**
- Proximity, Similarity, Continuity, Closure
- Figure-Ground, Common Region, Common Fate, Focal Point

**UI Principles (11)**
- Visual Hierarchy, Contrast, Alignment, Whitespace
- Typography, Color Theory, Depth, Responsive Design, etc.

**Accessibility Principles (14)**
- WCAG foundations (Perceivable, Operable, Understandable, Robust)
- Color contrast, keyboard navigation, screen readers, ARIA

**Mobile Principles (8)**
- Touch design, thumb zones, gestures, platform patterns

**Typography Principles (8)**
- Scale, readability, pairing, responsive typography

### Patterns

**Navigation (7)**: Tabs, Sidebar, Hamburger, Bottom Nav, Breadcrumbs, Search, Pagination

**Forms (7)**: Inline Validation, Multi-Step, Form Fields, Autocomplete, Input Masking, Toggle, Date Picker

**Feedback (8)**: Toast, Modal, Loading Spinner, Skeleton, Progress, Empty State, Error Message, Alert Banner

**Layout (8)**: Card, List, Grid, Hero, Split View, Infinite Scroll, Bottom Sheet, FAB

### Tokens

- **Colors**: Semantic palette (primary, success, warning, error, info, neutral)
- **Spacing**: 4px base unit scale (0-128px)
- **Typography**: Type scale with line heights
- **Border Radius**: Rounded corners scale
- **Shadows**: Elevation levels
- **Breakpoints**: Responsive design breakpoints
- **Z-Index**: Layering system
- **Animation**: Durations and easings

## 🔧 Development

```bash
npm run dev        # run from source with tsx
npm run build      # compile to dist/
npm test           # vitest — asserts the counts below and the data's integrity
npm run typecheck  # tsc --noEmit
```

The test suite guards the numbers this README advertises, so a principle added
without updating the docs fails CI rather than shipping a wrong claim. It also
checks for duplicate ids, kebab-case ids, and dangling `relatedPrinciples`
references — the tools tell callers to look those ids up, so a dangling one is a
dead end for the model on the other side.

## 📄 License

MIT — see [LICENSE](LICENSE).

## 🙏 Attribution

Design knowledge synthesized from public domain sources:
- Jakob Nielsen's usability research
- Gestalt psychology principles
- WCAG accessibility guidelines
- Material Design documentation
- Apple Human Interface Guidelines

TDQS

A3.7/5.0

Scored across 5 tools

Disambiguation4/5

The four retrieval tools target distinct resource types: tokens, principles, patterns, and accessibility checklists. The only overlap is search_design_knowledge, which can surface content also available through the specific getters, but its fuzzy-search purpose is described clearly enough to distinguish it.

Naming Consistency5/5

All tool names follow a consistent snake_case verb_noun pattern using get_ or search_ prefixes. The naming is predictable and easy to scan.

Tool Count5/5

Five tools is well-scoped for a read-only UI/UX knowledge server. Each tool maps to a meaningful knowledge category or discovery operation, with no redundant entries.

Completeness5/5

The surface covers the core UI/UX reference needs: design tokens, principles, patterns, accessibility requirements, and cross-knowledge search. For a read-only knowledge domain, there are no obvious missing lifecycle operations or dead ends.

Maintenance

ActivityInactive
ResponsivenessNo recent community issues