The most comprehensive UI MCP server available. 13 tools, 5 resources, 3 prompts for end-to-end UI development: generate components, manage design tokens, audit accessibility, auto-fix issues, inspect live pages, compare screenshots, generate Storybook stories, extract Figma styles, compose layouts, and preview responsive designs -- across React, Vue, Svelte, Angular, and Web Components.
Works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor IDE, Continue.dev, Cline, and Zed.
npx -y @elsahafy/ui-toolkit-mcp
npm install -g @elsahafy/ui-toolkit-mcp
claude mcp add ui-toolkit -- npx -y @elsahafy/ui-toolkit-mcp
Add to claude_desktop_config.json:
{
"mcpServers": {
"ui-toolkit": {
"command": "npx",
"args": ["-y", "@elsahafy/ui-toolkit-mcp"]
}
}
}
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"ui-toolkit": {
"command": "npx",
"args": ["-y", "@elsahafy/ui-toolkit-mcp"]
}
}
}
For inspect_page, live_audit, and responsive_preview, install Playwright separately:
npm install playwright
npx playwright install chromium
All other tools work without Playwright.
generate_componentGenerate production-ready UI components from natural language. Automatically audits the output and reports issues inline.
"Generate a card component with image, title, and action buttons in React"
Parameters:
description (required) -- What to buildframework (required) -- react | vue | svelte | angular | web-componentscomponent_name (required) -- PascalCase name (e.g., ProductCard)variant -- default | outlined | filled | ghost | elevatedsize -- sm | md | lg | xlauto_audit -- Automatically audit generated output (default: true)include_styles -- Include CSS with design tokens (default: true)include_tests -- Generate test file (default: false)responsive -- Include breakpoints (default: true)Generated components are automatically registered in the component registry.
compose_layoutCompose a full page layout from previously generated components in the registry.
"Compose a page from Hero, Features, and Footer components in React"
Parameters:
component_names (required) -- Array of component names from the registryframework (required) -- Target frameworklayout_description -- Description of the page layoutProduces a complete page with imports, semantic structure (<header>, <main>, <footer>), and skip navigation.
import_design_tokensImport design tokens from Figma Tokens JSON, Style Dictionary, or CSS custom properties.
Parameters:
tokens_json (required) -- Raw JSON string of tokensformat (required) -- figma-tokens | style-dictionary | css-custom-propertiesnamespace -- Optional prefix (e.g., brand)merge_strategy -- replace | merge-overwrite | merge-keepextract_figma_stylesExtract design tokens directly from a Figma file via the REST API.
Parameters:
figma_file_key (required) -- Alphanumeric file key from Figma URLfigma_pat (required) -- Figma Personal Access Token (never stored or logged)node_ids -- Optional specific nodes to extractnamespace -- Optional CSS variable prefixmerge_strategy -- How to handle existing tokensexport_tokensExport the active token store as CSS custom properties, JSON, or Style Dictionary format.
Parameters:
format -- css | json | style-dictionary (default: css)clear_tokensClear all design tokens from the active store.
audit_componentAudit markup for WCAG accessibility, performance, and responsive design issues. Returns scored findings with fix suggestions.
Parameters:
markup (required) -- HTML/JSX/Vue/Svelte markupcomponent_name -- For report labelingcategories -- ["accessibility", "performance", "responsive"]wcag_level -- A | AA | AAAframework -- Affects how markup is parsed29 built-in rules: 12 accessibility (WCAG), 9 performance, 8 responsive design.
auto_fix_componentAutomatically fix common accessibility and performance issues based on audit findings.
"Auto-fix the accessibility issues in this component"
Parameters:
markup (required) -- The markup to fixfindings (required) -- Array of AuditFinding objects from audit_componentSupported auto-fixes: missing alt text, missing lang attribute, missing lazy loading, positive tabindex, px font-sizes to rem.
live_auditNavigate to a live URL and audit the rendered HTML. Combines browser inspection with markup auditing in one call. Requires Playwright.
Parameters:
target_url (required) -- HTTP/HTTPS URL (private IPs blocked)categories -- Audit categories to runwcag_level -- WCAG conformance levelInstall separately:
npm install playwright && npx playwright install chromium
inspect_pageNavigate to a live URL and extract accessibility tree, component structure, performance metrics, and screenshot.
Parameters:
target_url (required) -- HTTP/HTTPS URL (private IPs blocked)viewport_width / viewport_height -- Viewport sizewait_for -- load | domcontentloaded | networkidletimeout_ms -- Navigation timeoutinclude_screenshot -- Base64 PNG screenshot (default: true)visual_diffPixel-by-pixel PNG comparison for visual regression testing. No Playwright required.
Parameters:
before_image (required) -- Base64 PNGafter_image (required) -- Base64 PNGthreshold -- Per-channel tolerance (0-255, default: 10)responsive_previewScreenshot a URL at mobile (375px), tablet (768px), and desktop (1280px) viewports. Requires Playwright.
Parameters:
target_url (required) -- HTTP/HTTPS URL (private IPs blocked)generate_storyAuto-generate CSF3 Storybook stories with prop detection, play functions, and accessibility addon config.
Parameters:
component_code (required) -- Full component source codeframework (required) -- react | vue | svelte | angularcomponent_name (required) -- PascalCase namestory_title -- Storybook path (default: Components/{name})Detects props via regex from: TypeScript interfaces (React), defineProps (Vue), export let (Svelte), @Input() (Angular).
| URI | Description |
|---|---|
ui://tokens/active |
Currently loaded design tokens |
ui://patterns/components |
Component pattern library (12 patterns with a11y requirements) |
ui://components/registry |
Registry of all generated components with audit scores |
ui://server/health |
Server version, tool count, token count, uptime |
ui://audit/checklist |
Full audit rule reference (auto-generated from rule definitions) |
| Prompt | Description |
|---|---|
build_page |
Generate a full page with multiple components using design tokens |
component_audit |
Comprehensive audit + fix workflow |
design_to_code |
Full Figma-to-code: extract tokens, generate components, audit, generate stories |
Every component generated by generate_component is automatically audited for accessibility, performance, and responsive issues. Critical findings are reported inline. No other UI MCP server does this.
All generated components are tracked with metadata (framework, tokens used, audit score, timestamp). Use compose_layout to assemble them into full pages.
Import tokens from Figma, Style Dictionary, or CSS custom properties. Export in any format. Tokens are automatically applied to generated components.
All 13 tools support React, Vue, Svelte, Angular, and Web Components. One server, any framework.
src/
index.ts # Server entry (thin orchestrator)
lib/
types.ts # Shared TypeScript interfaces
token-store.ts # In-memory design token state
component-registry.ts # Component tracking
framework-templates.ts # 5 framework component generators
story-templates.ts # CSF3 story templates + prop detection
accessibility-rules.ts # 12 WCAG audit rules
performance-rules.ts # 9 performance audit rules
responsive-rules.ts # 8 responsive design rules
pattern-library.ts # 12 component patterns
browser.ts # Playwright lifecycle + URL validation
validation.ts # Shared input validation
utils.ts # Shared utilities (kebab, clamp, fileExt)
tools/
generate-component.ts # + auto-audit + registry
import-design-tokens.ts
audit-component.ts
auto-fix-component.ts
inspect-page.ts
visual-diff.ts
generate-story.ts
extract-figma-styles.ts
export-tokens.ts
clear-tokens.ts
live-audit.ts
responsive-preview.ts
compose-layout.ts
index.ts # Tool registry + dispatch
resources/
index.ts # 5 resources
prompts/
index.ts # 3 workflow prompts
tests/
lib/ # 11 library test files
tools/ # 12 tool test files
184 tests across 23 test files. All source files have dedicated test coverage.
markup parameters are analyzed via regex, never evaluatedmaxLength constraints enforced at runtimeMIT