simple-storybook-preview-mcp
# Simple Storybook Preview MCP
See your components render live inside the IDE as the AI edits them. No switching windows.
**[Documentation & Live Demo](https://matipojo.github.io/simple-storybook-preview-mcp/)**
  
## Quick Start
Add to `.cursor/mcp.json`:
```json
{
"mcpServers": {
"storybook-preview": {
"command": "npx",
"args": ["-y", "simple-storybook-preview-mcp"],
"env": {
"STORYBOOK_URL": "http://localhost:6006"
}
}
}
}
```
Start your Storybook dev server (`npm run storybook`), then ask the AI to edit a component — the preview appears automatically.
## Configuration
| Env Variable | Default | Description |
|---|---|---|
| `STORYBOOK_URL` | `http://localhost:6006` | Base URL of your running Storybook dev server |
| `DEBUG` | `false` | Set to `true` or `1` to show a debug log panel |
## How Story IDs Work
The AI derives story IDs from your Storybook file structure:
```
title segments lowercased, joined by dashes + double-dash + story export name
"Components/Button" + "Primary" → components-button--primary
"Forms/Input" + "WithLabel" → forms-input--withlabel
```
## Requirements
- **Node.js 18+**
- **Storybook 7+** dev server running
- IDE with **MCP Apps** support (e.g. Cursor)
Works with any framework Storybook supports (React, Vue, Angular, Svelte, etc.).
## Links
- [Documentation](https://matipojo.github.io/simple-storybook-preview-mcp/)
- [GitHub](https://github.com/matipojo/simple-storybook-preview-mcp)
## License
MIT
TDQS
Scored across 1 tool
With only one tool there is no possibility of confusion or overlap with other tools. The single purpose of rendering a Storybook story is clearly defined.
The tool name 'render_component' follows a clear verb_noun pattern, which is consistent and predictable. Even as a lone tool, the naming convention is clear and readable.
A single tool for a very narrow 'simple storybook preview' purpose is borderline. It is not trivial, but the surface feels thin and lacks supplementary functionality that might be expected in a fuller server.
The tool fully covers the core rendering action, and the convention-based storyId allows agents to target stories. A notable gap is the absence of a discovery mechanism to list available stories or validate storyIds, but for a 'simple' preview server this is a minor limitation.