mcp-design-system-extractor
v1.3.0MCP server for Storybook design systems — extract component HTML, styles and metadata.
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
list_components
List all UI components available in your design system/Storybook. Returns components like modals, dialogs, buttons, forms, cards, etc. with their names, categories, and variant count. Use this to explore what components are available for building UI features. Use category="all" or omit category parameter to list all components. Supports pagination to handle large component libraries.
| Parameter | Type | Description |
|---|---|---|
category | string | Filter components by category path (e.g., "Components/Buttons", "Layout"). Use "all" or omit to list all components. |
compact | boolean | If true (default), returns compact format with only id, name, title, and variantCount. If false, returns full component data including all stories. |
page | number | Page number (1-based). Default is 1. |
pageSize | number | Number of components per page (1-100). Default is 20. |
get_component_html
Extract HTML from a component. Default is async (returns job_id, poll with job_status). Set async=false for sync mode. Use variantsOnly=true to get variant list.
| Parameter | Type | Description |
|---|---|---|
componentId * | string | The story ID in format "component-name--story-name" (e.g., "button--primary") or component ID (e.g., "button") when using variantsOnly. |
async | boolean | If true (default), returns job_id immediately - use job_status to poll for results. If false, waits for result synchronously. |
includeStyles | boolean | Whether to include extracted CSS styles in the response. Storybook boilerplate CSS is filtered out. Default: false. |
timeout | number | Custom timeout in milliseconds (5000-60000). Only used in sync mode (async=false). Default is 15000ms. |
variantsOnly | boolean | If true, returns only the list of available variants/stories for the component (synchronous). Use component ID without story suffix. |
search_components
Search design system components by name, title, category, or purpose. Find UI components like modals, dialogs, buttons, forms, cards, etc. Supports text search (query) and semantic search by purpose. Available purposes: "form inputs", "navigation", "feedback", "data display", "layout", "buttons", "progress", "media". Supports pagination for large result sets.
| Parameter | Type | Description |
|---|---|---|
page | number | Page number (1-based). Default is 1. |
pageSize | number | Number of components per page (1-100). Default is 20. |
purpose | string | Semantic search by purpose. Available: "form inputs", "navigation", "feedback", "data display", "layout", "buttons", "progress", "media". Can be combined with query. |
query | string | Text search query (e.g., "button", "form", "nav"). Use "*" to list all. Case-insensitive partial matching. Optional if purpose is provided. |
searchIn | string | Where to search: "name" (component name only), "title" (full path), "category" (grouping), or "all" (search everywhere, default) |
get_component_dependencies
Analyze rendered HTML to find which other components a given component internally uses by detecting React components, web components, and CSS class patterns
| Parameter | Type | Description |
|---|---|---|
componentId * | string | The story ID of the component (e.g., "example-button--primary") |
get_theme_info
Get design system theme information (colors, spacing, typography, breakpoints)
| Parameter | Type | Description |
|---|---|---|
includeAll | boolean | Whether to include all CSS custom properties found (default: false) |
get_external_css
Extract design tokens from CSS files. DEFAULT BEHAVIOR: Returns ONLY tokens and file statistics (small response ~1-3K tokens). Does NOT return CSS content by default to avoid token limits. For full CSS content, explicitly set includeFullCSS=true and maxContentSize. Perfect for analyzing design system tokens without hitting response size limits.
| Parameter | Type | Description |
|---|---|---|
cssUrl * | string | URL of CSS file to analyze. IMPORTANT: Tool returns only design tokens by default (not CSS content) to avoid response size limits. |
extractTokens | boolean | Extract design tokens (colors, spacing, typography, etc.). Default: true. This is the main purpose of this tool. |
includeFullCSS | boolean | OPTIONAL: Set to true ONLY if you need the actual CSS content. WARNING: Large CSS files may hit token limits. Default: false (recommended). |
maxContentSize | number | OPTIONAL: Max CSS content characters when includeFullCSS=true. Default: 10000. Larger files will be truncated. |
job_status
Check the status of an async job. Returns status, progress, and result when completed. Poll this endpoint to get results from get_component_html.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | The job ID returned from get_component_html |
job_cancel
Cancel a queued or running job. Returns whether the cancellation was successful.
| Parameter | Type | Description |
|---|---|---|
job_id * | string | The job ID to cancel |
job_list
List all jobs with their status. Shows what each job is processing and whether it is still running.
| Parameter | Type | Description |
|---|---|---|
status | string | Filter by status: "all" (default), "active" (queued/running), "completed" (completed/failed/cancelled) |