UI Toolkit MCP Server
Provides tools to generate and audit Angular UI components, compose layouts from a registry, and generate Storybook stories for Angular components.
Integrates with Figma to extract design tokens from Figma files via the REST API, enabling import of styles and variables.
Provides tools to generate and audit React UI components, compose layouts from a registry, and generate Storybook stories for React components.
Generates CSF3 Storybook stories with prop detection, play functions, and accessibility addon configuration for component code.
Provides tools to generate and audit Svelte UI components, compose layouts from a registry, and generate Storybook stories for Svelte components.
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., "@UI Toolkit MCP Server Generate a button component in React"
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.
UI Toolkit MCP Server
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.
Installation
npx (No Install)
npx -y @elsahafy/ui-toolkit-mcpnpm (Global)
npm install -g @elsahafy/ui-toolkit-mcpClaude Code CLI
claude mcp add ui-toolkit -- npx -y @elsahafy/ui-toolkit-mcpClaude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"ui-toolkit": {
"command": "npx",
"args": ["-y", "@elsahafy/ui-toolkit-mcp"]
}
}
}Cursor IDE
Add to ~/.cursor/mcp.json:
{
"mcpServers": {
"ui-toolkit": {
"command": "npx",
"args": ["-y", "@elsahafy/ui-toolkit-mcp"]
}
}
}Optional: Browser Tools
For inspect_page, live_audit, and responsive_preview, install Playwright separately:
npm install playwright
npx playwright install chromiumAll other tools work without Playwright.
Related MCP server: memoire
Tools (13)
Component Generation
generate_component
Generate 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_layout
Compose 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 layout
Produces a complete page with imports, semantic structure (<header>, <main>, <footer>), and skip navigation.
Design Tokens
import_design_tokens
Import 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-keep
extract_figma_styles
Extract 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 tokens
export_tokens
Export the active token store as CSS custom properties, JSON, or Style Dictionary format.
Parameters:
format--css|json|style-dictionary(default:css)
clear_tokens
Clear all design tokens from the active store.
Auditing & Fixing
audit_component
Audit 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 parsed
29 built-in rules: 12 accessibility (WCAG), 9 performance, 8 responsive design.
auto_fix_component
Automatically 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 fromaudit_component
Supported auto-fixes: missing alt text, missing lang attribute, missing lazy loading, positive tabindex, px font-sizes to rem.
live_audit
Navigate 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 level
Browser Tools (Playwright)
Install separately:
npm install playwright && npx playwright install chromium
inspect_page
Navigate 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_diff
Pixel-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_preview
Screenshot a URL at mobile (375px), tablet (768px), and desktop (1280px) viewports. Requires Playwright.
Parameters:
target_url(required) -- HTTP/HTTPS URL (private IPs blocked)
Storybook
generate_story
Auto-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).
Resources (5)
URI | Description |
| Currently loaded design tokens |
| Component pattern library (12 patterns with a11y requirements) |
| Registry of all generated components with audit scores |
| Server version, tool count, token count, uptime |
| Full audit rule reference (auto-generated from rule definitions) |
Prompts (3)
Prompt | Description |
| Generate a full page with multiple components using design tokens |
| Comprehensive audit + fix workflow |
| Full Figma-to-code: extract tokens, generate components, audit, generate stories |
Key Features
Audit-at-Generation-Time
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.
Component Registry
All generated components are tracked with metadata (framework, tokens used, audit score, timestamp). Use compose_layout to assemble them into full pages.
Design Token Pipeline
Import tokens from Figma, Style Dictionary, or CSS custom properties. Export in any format. Tokens are automatically applied to generated components.
Framework Agnostic
All 13 tools support React, Vue, Svelte, Angular, and Web Components. One server, any framework.
Architecture
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 files184 tests across 23 test files. All source files have dedicated test coverage.
Security
No code execution -- all
markupparameters are analyzed via regex, never evaluatedURL validation blocks private IPs (127.x, 10.x, 172.16-31.x, 192.168.x, fe80::, fc00::, localhost)
Only HTTP/HTTPS schemes allowed for browser tools
Figma PAT is never stored, logged, or returned in responses (sanitized from error messages)
All string inputs have
maxLengthconstraints enforced at runtimeNo credential keywords in resource URIs
Input validation helper shared across all tool handlers
License
MIT
Available Tools
13 toolsaudit_componentA
Audit HTML/JSX/Vue/Svelte markup for accessibility (WCAG), performance, and responsive design issues. Returns scored findings with fix suggestions.
Inputs: markup (required), framework, categories, wcag_level, +1 more.
auto_fix_componentA
Automatically fix common accessibility and performance issues in markup based on audit findings. Returns the corrected markup with a list of applied fixes.
Inputs: markup (required), findings (required).
clear_tokensA
Clear all design tokens from the active token store. Use this to reset before importing a new set of tokens.
Inputs: no named parameters.
compose_layoutA
Compose a page layout from previously generated components in the registry. Produces a full page with imports, semantic structure, and skip navigation.
Inputs: framework (required), component_names (required), layout_description.
export_tokensB
Export active design tokens as CSS custom properties, JSON, or Style Dictionary format.
Inputs: format.
extract_figma_stylesA
Extract design tokens (colors, typography, effects) from a Figma file via the Figma REST API. Normalizes tokens and loads them into the active token store. Requires a Figma Personal Access Token.
Inputs: figma_pat (required), figma_file_key (required), node_ids, namespace, +1 more.
generate_componentA
Generate a production-ready UI component in any framework (React, Vue, Svelte, Angular, Web Components) from a natural language description. Uses active design tokens if loaded.
Inputs: framework (required), description (required), component_name (required), size, +5 more.
generate_storyB
Auto-generate a Storybook story file (CSF3 format) for a UI component. Detects props from code, includes default story, variant stories, play functions, and accessibility addon config.
Inputs: framework (required), component_code (required), component_name (required), story_title.
import_design_tokensA
Import design tokens from Figma Tokens JSON, Style Dictionary, or CSS custom properties into the active token store. Imported tokens are used by generate_component for styling.
Inputs: format (required), tokens_json (required), namespace, merge_strategy.
inspect_pageB
Inspect a live web page using a headless browser. Extracts accessibility tree, component structure, performance metrics, and an optional screenshot. Requires Playwright (optional dependency).
Inputs: target_url (required), wait_for, timeout_ms, viewport_width, +2 more.
live_auditB
Audit a live web page by navigating to it and running accessibility, performance, and responsive checks on the rendered HTML. Requires Playwright.
Inputs: target_url (required), categories, wcag_level.
responsive_previewA
Screenshot a URL at mobile (375px), tablet (768px), and desktop (1280px) viewports for responsive comparison. Requires Playwright.
Inputs: target_url (required).
visual_diffA
Compare two PNG screenshots pixel-by-pixel for visual regression testing. Returns diff statistics including changed pixel count and percentage. Does not require Playwright.
Inputs: after_image (required), before_image (required), threshold.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Most tools have clearly distinct purposes (generation, token management, auditing, layout composition). A few pairs could be confused: audit_component vs live_audit (static markup vs live page) and import_design_tokens vs extract_figma_styles (both load tokens into the store), but the descriptions clearly differentiate them.
Consistent snake_case throughout with a mostly predictable verb_noun pattern (generate_component, import_design_tokens, audit_component, clear_tokens, export_tokens). A handful lean noun-based (visual_diff, live_audit, responsive_preview), a minor deviation but still readable and coherent.
13 tools is well within the ideal 3-15 range and each maps to a distinct capability in the UI workflow (generation, tokens, audit, fix, storybook, layout, visual testing). No filler tools appear present.
The surface covers a broad lifecycle: token import/extract/export/clear, component generation, static and live auditing, auto-fix, storybook generation, responsive preview, visual diff, and layout composition. Minor gaps exist (no explicit component registry/list or delete operations), but core workflows are covered.
Maintenance
Related MCP Connectors
MCP server for Mint — AI-powered QA that runs your app in a real browser on every PR.
MCP server for StyleKit styles, tokens, recipes, lint and repair over stdio or HTTP.
A MCP server built for developers enabling Git based project management with project and personal…
Build your own tools from chat: design, test and host them on a shareable MCP server URL.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA unified MCP server with composable tools for GitHub operations, file management, shell execution, kanban boards, Discord messaging, and package management. Features role-based security, HTTP/stdio transports, and a web-based development UI.GPL 3.0
- AlicenseAqualityBmaintenanceDesign system MCP server. 20 tools: extract design tokens from any URL, pull from Figma or Penpot, generate React + shadcn/ui components from specs, run WCAG audits, sync tokens bidirectionally.50240 npm50MIT
- AlicenseAqualityDmaintenanceComprehensive MCP server for Fluent UI React v9 development, providing component knowledge, design tokens, code generation, and validation tools.129MIT
- AlicenseNot gradedqualityDmaintenanceMCP server for automatic Storybook story generation, component analysis, and validation. Auto-detects React frameworks and syncs component documentation.22 npm1MIT