Storybook Mcp Server avatar
Storybook Mcp Server

Pricing

Pay per event

Go to Apify Store
Storybook Mcp Server

Storybook Mcp Server

Connect AI assistants to any Storybook via MCP. 6 tools for components, stories, props, and visual testing. Works with Claude, ChatGPT, n8n.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Piotr Kaplon

Piotr Kaplon

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

22 days ago

Last modified

Share

Connect AI assistants to any Storybook instance via MCP (Model Context Protocol). This Actor provides 6 tools for interacting with UI component libraries, design systems, and Storybook documentation.

Features

  • Component Discovery: Browse and list all available components
  • Story Management: Access stories with filtering capabilities
  • Detailed Inspection: Get comprehensive story information including props and args
  • Visual Testing: Capture screenshots of individual or multiple stories
  • Responsive Testing: Test components across various viewport dimensions
  • Universal Compatibility: Works with any publicly accessible Storybook instance

Available Operations

OperationDescriptionRequired Params
list_componentsList all components in the Storybook-
list_storiesList all stories, optionally filtered by componentcomponentId (optional)
get_story_detailsGet detailed information about a specific storystoryId
get_component_propsGet props/properties definition for a componentcomponentId
capture_screenshotCapture a screenshot of a specific storystoryId
capture_all_screenshotsCapture screenshots of all storiesmaxScreenshots (optional)

Usage Examples

List All Components

{
"storybookUrl": "https://your-storybook.com",
"operation": "list_components"
}

List Stories for a Component

{
"storybookUrl": "https://your-storybook.com",
"operation": "list_stories",
"componentId": "components-button"
}

Get Story Details

{
"storybookUrl": "https://your-storybook.com",
"operation": "get_story_details",
"storyId": "components-button--primary"
}

Capture Screenshot

{
"storybookUrl": "https://your-storybook.com",
"operation": "capture_screenshot",
"storyId": "components-button--primary",
"viewportWidth": 1280,
"viewportHeight": 720
}

Capture All Screenshots

{
"storybookUrl": "https://your-storybook.com",
"operation": "capture_all_screenshots",
"maxScreenshots": 50,
"viewportWidth": 1280,
"viewportHeight": 720
}

Input Parameters

ParameterTypeRequiredDefaultDescription
storybookUrlstringYes-URL of your Storybook instance
modestringNobatchbatch for one-time operations, standby for MCP server
operationstringNolist_componentsOperation to perform
componentIdstringNo-Component ID for filtering
storyIdstringNo-Story ID for details/screenshots
viewportWidthintegerNo1280Viewport width for screenshots
viewportHeightintegerNo720Viewport height for screenshots
waitForSelectorstringNo-CSS selector to wait for before screenshot
waitTimeintegerNo1000Wait time in ms after page load
maxScreenshotsintegerNo50Max screenshots for batch capture

Supported Storybook Versions

  • Storybook 6.x (uses /stories.json)
  • Storybook 7.x and 8.x (uses /index.json)

Output

Results are saved to the Actor's default dataset. Screenshots are saved to the key-value store with public URLs returned in the results.

Example Output (list_components)

{
"operation": "list_components",
"id": "components-button",
"name": "Button",
"kind": "Components/Button",
"title": "Components/Button"
}

Example Output (capture_screenshot)

{
"operation": "capture_screenshot",
"storyId": "components-button--primary",
"filename": "screenshot-components-button--primary.png",
"url": "https://api.apify.com/v2/key-value-stores/.../records/screenshot-components-button--primary.png",
"viewport": { "width": 1280, "height": 720 }
}

Integration with AI Assistants

This Actor can be used as an MCP server in standby mode for integration with:

  • Claude Desktop: Connect via HTTP transport
  • Claude Code: Use as MCP tool
  • n8n Workflows: HTTP Request node to the standby server
  • Custom AI Agents: JSON-RPC over HTTP

Standby Mode

Run in standby mode for persistent MCP server:

{
"storybookUrl": "https://your-storybook.com",
"mode": "standby"
}

The server will be available at the Actor's standby URL.

Public Storybook Examples

You can test with these public Storybooks:

  • Storybook Official: https://5ccbc373887ca40020446347-gemkrrfkxg.chromatic.com/
  • Carbon Design System: https://react.carbondesignsystem.com/
  • Shopify Polaris: https://polaris.shopify.com/

Limitations

  • Storybook instance must be publicly accessible (or use a tunnel for local instances)
  • Screenshot capture requires components to render within timeout
  • Some Storybooks may have CORS restrictions

License

MIT License

Support

For issues or feature requests, please open an issue on the Actor's GitHub repository.