@viantotech/mcp-storybook
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| CACHE_TTL | No | Cache TTL in seconds | 300 |
| CACHE_ENABLED | No | Cache enabled (true/false) | true |
| STORYBOOK_BASE_URL | Yes | URL of your Storybook deployment | |
| STORYBOOK_AUTH_TYPE | No | Auth type | none |
| STORYBOOK_CLIENT_ID | No | OAuth client ID | |
| STORYBOOK_DATA_SOURCE | No | Data source | auto |
| STORYBOOK_ACCESS_TOKEN | No | Bearer token | |
| STORYBOOK_CLIENT_SECRET | No | OAuth client secret | |
| STORYBOOK_REFRESH_TOKEN | No | OAuth refresh token | |
| STORYBOOK_SESSION_COOKIE | No | Session cookie value | |
| STORYBOOK_BASIC_AUTH_PASSWORD | No | Basic auth password | |
| STORYBOOK_BASIC_AUTH_USERNAME | No | Basic auth username |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| list_storiesC | List Story Book entries (metadata only, no full content). |
| search_storiesB | Search stories by title, description, tags, sections, and content. |
| get_storyB | Get a full story with optional content length cap. |
| get_story_sectionC | Get one section from a story. |
| get_story_metadataB | Get story metadata without loading full content. |
| list_componentsB | List UI components from Storybook (grouped), e.g. Components/Button, Components/Alert. Metadata only. |
| get_componentB | Get one component by name or path (Alert, Components/Alert). Includes docs overview and story variant ids. |
| get_component_configA | Storybook Controls config per component: argTypes (variant, size, …) and stylePresets (Default, Secondary, …) with args. |
| get_design_tokensA | Extract design tokens (colors, spacing, typography, shadows, etc.) from Storybook CSS variables. |
| get_component_dependenciesB | Get component dependency graph: which components a component uses, and which components use it. |
| map_figma_componentA | Map a Figma component name/node/URL to the corresponding Storybook component with suggested props. |
| find_stories_by_source_fileA | Reverse lookup: given a component source file path, find matching Storybook stories. |
| preview_storyB | Build a Storybook iframe preview URL for a story with optional args, globals, and viewport. |
| get_story_instructionsA | Get best-practice instructions for writing Storybook stories (CSF3, argTypes, play functions). |
| get_component_usageB | Get copy-paste-ready component usage code (import + JSX) built from story argTypes and preset args. |
| compare_versionsB | Compare two Storybook deployments and return structured diff (added/removed/modified components, prop changes). |
| get_catalog_summaryA | Call BEFORE writing any UI code: compact catalog of every design-system component (name, import, short description, key props). Use it to reuse existing components instead of building new ones. Entries marked source=pending exist in code but are not in Storybook yet. |
| validate_usageA | Call AFTER writing JSX/TSX that uses design-system components: checks component names, props, and enum values against Storybook argTypes and reports invalid usage with suggestions. |
| find_token_driftB | Find hardcoded colors, spacing, radius, and font sizes in CSS/JSX that match design tokens, with var(--token) replacements. Near matches (tolerance > 0) are hints only. |
| scaffold_storyA | Call after creating a new component: generates a CSF3 *.stories.tsx file that follows this Storybook's conventions, and remembers the component locally so other tools see it before Storybook is redeployed. Returns file content only; write it yourself. |
| remember_componentA | Record a component that exists in code but is not yet in the deployed Storybook, so catalog and validation tools include it. Stored in a local file only. |
| list_pending_componentsA | List locally remembered components not yet in the deployed Storybook. Entries now present in Storybook are dropped automatically; old entries are flagged stale. |
| forget_componentB | Remove a component from local pending-component memory. |
| get_story_contextB | Retrieve concise Story Book context for a natural-language question. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| stories-index | Metadata for all stories (no full content). |
TDQS
Scored across 24 tools
Most tools have clearly distinct purposes (catalog, validation, story retrieval, token analysis, pending memory) and descriptions give usage timing. However, get_catalog_summary vs list_components and several story-context tools overlap enough that an agent may need to read descriptions carefully to choose correctly.
All tool names use lower snake_case and predictable verb_noun patterns (get_component, list_stories, validate_usage, scaffold_story). No mixed conventions.
24 tools is on the heavy end for a single MCP server; while the domain is broad, several read-only listing/context tools could be consolidated. The rubric treats 16-25 tools as borderline heavy.
Surface covers catalog, components, stories, tokens, validation, version diffing, Figma mapping, and pending component memory, which is extensive. Minor gaps remain around direct story update/delete or component source retrieval, but core workflows are supported.