Storybook Compass MCP
Allows querying a published Storybook's metadata via /index.json to discover and search components, retrieve component docs, recommend components and patterns, build recommendation matrices, and surface design token, typography, spacing, theme, and catalog quality guidance.
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., "@Storybook Compass MCP recommend the best components for a booking results page with filters and alerts"
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.
Storybook Compass MCP
Compass is a read-only MCP server that turns any published Storybook into an AI-queryable component catalog. Point it at a Storybook URL and MCP-compatible assistants can discover components, get metadata-grounded recommendations, and build UX planning matrices β no Storybook addon, build flag, or code change required on the Storybook side.
π§° Tools
These are the primary tools exposed by this MCP server to MCP-compatible clients for fast, metadata-based Compass Storybook querying.
π§
recommend_component: Recommend the best Compass component or pattern for a plain-language use case.π§©
create_component_recommendation_matrix: Build a multi-need recommendation matrix for UX planning.π
search_components: Search by path, story/docs id, tags, import paths, and entry names.π
get_component_docs: Return compact metadata-derived component guidance, availability, ids, examples metadata, and usage caveats.π
list_components: List Compass components from normalized Storybook metadata.ποΈ
discover_foundation_entries: Return metadata-derived discovery guidance for foundation-related entries only.π¨
get_design_tokens: Return design token guidance from metadata signals.π
get_color_palette: Return color guidance with explicit unavailable handling.βοΈ
get_typography_guidance: Return typography guidance with source evidence.π
get_spacing_guidance: Return spacing guidance with source evidence.π§±
get_base_style_guidance: Return base/global style guidance from metadata.π
get_theme_usage_examples: Return theme usage guidance and examples from metadata.π
get_component_style_dependencies: Return metadata-derived discovery guidance for style dependency hints only.π
get_catalog_quality_report: Return metadata coverage and limitations summary.
Supporting utilities and resources:
β»οΈ
refresh_metadata_cache: Force in-memory metadata refresh with stale fallback details.β
smoke_test: Verify server wiring and basic contract behavior.π¦
compass://components: Component resource listing.β
compass://server/help: Help resource for server usage.π
use_compass_components: Prompt resource for Compass-first prompting.
Related MCP server: storybook-mcp-server
MCP Output Compatibility
recommend_component,get_component_docs,discover_foundation_entries,get_component_style_dependencies, andget_catalog_quality_reportnow publish MCPoutputSchemaand return additivestructuredContenton successful calls.Existing
content[0].textremains JSON text so current text-consuming clients can continue parsing responses without migration.Error responses remain unchanged:
isError: trueplus JSON text error envelopes, with nostructuredContent.
Recommendation Alias Rules
recommend_componentuses a small, deterministic, query-side alias expansion step to improve recall for common UX phrasing.Alias behavior is maintained in
src/recommendation/constants.tsviaQUERY_TERM_ALIAS_RULESandALIAS_MATCH_SCORE_MULTIPLIER.Rules are directional and curated (kept intentionally small) to limit false positives; direct metadata matches should continue to outrank alias-only matches.
π¬ Sample Prompts
UX Team
Use the storybook-compass-mcp server.
For a booking listing screen, create a recommendation matrix for:
- result cards
- filters
- sorting
- alerts
- details drawer
Return: UI need, recommended Compass component/pattern, match type, confidence, composition hints, and UX notes.
Use Compass tools first and do not invent components.UI Designers
Use the storybook-compass-mcp server.
Find Compass patterns for a multi-step form with:
- primary action
- secondary action
- date selection
- quantity selector
- validation alert
For strongest candidates, inspect docs/examples and call out direct matches vs likely compositions.Code Developers
Use the storybook-compass-mcp server.
I am implementing a Vue 3 travel-date flow.
Recommend the best Compass component or pattern, inspect docs/examples, and suggest an implementation approach.
Return: recommendation, confidence, useful examples, implementation notes, and caveats.
Do not suggest external UI libraries or invented Compass components.π§ Quick Start
Choose the path that matches how you want to use Compass:
VS Code or another MCP client: run the server directly with Node.
SEA executable: use the packaged binary if you do not want to install Node.
ChatGPT in a browser: use the browser workflow guide if your ChatGPT workspace can connect to MCP tools.
VS Code or MCP Client
Run locally:
corepack enable
pnpm install
pnpm build
pnpm smoke-testConnect from VS Code MCP:
{
"servers": {
"storybook-compass-mcp": {
"type": "stdio",
"command": "node",
"args": ["dist/index.js"],
"cwd": "${workspaceFolder}",
"env": {
"STORYBOOK_BASE_URL": "https://react.carbondesignsystem.com"
}
}
}
}STORYBOOK_BASE_URL is required. Point it at the base URL of any published Storybook that serves /index.json (Storybook 7+). The example above uses IBM's public Carbon Design System Storybook so you can try the tools immediately.
SEA Executable
If you want to use the MCP server without installing Node, use the built SEA executable.
Use the built SEA executable as the server process in your MCP client or agent:
Build the executable once with
pnpm package:sea.Point your MCP client at the executable in
dist/sea/.Start the client or agent and ask it to use the Compass tools.
For a quick example in MCP Inspector or another stdio client:
{
"command": "dist/sea/storybook-compass-mcp-v0.1.0-win-x64.exe",
"args": [],
"cwd": "${workspaceFolder}"
}Set STORYBOOK_BASE_URL in your MCP client's environment configuration for the
executable, the same as the Node setup above.
More detailed build, signing, and Windows policy notes live in docs/sea-executable-usage.md.
SEA Artifacts In CI
The SEA workflow now packages executables on every push to main (plus manual dispatch) for:
Windows x64:
storybook-compass-mcp-v<version>-win-x64.exeLinux x64:
storybook-compass-mcp-v<version>-linux-x64macOS x64:
storybook-compass-mcp-v<version>-macos-x64macOS arm64:
storybook-compass-mcp-v<version>-macos-arm64
Each run uploads these binaries as Actions artifacts and also updates a mutable GitHub release tag sea-latest with convenient aliases:
storybook-compass-mcp-latest-win-x64.exestorybook-compass-mcp-latest-linux-x64storybook-compass-mcp-latest-macos-x64storybook-compass-mcp-latest-macos-arm64
ChatGPT in a Browser
If you use ChatGPT in a browser for UX/UI work, see docs/using-compass-with-chatgpt-browser.md.
π How This Compares To The Official Storybook MCP
Storybook ships an official MCP integration, @storybook/addon-mcp (moved into the storybookjs/storybook monorepo as of v10.6). The two solve different problems:
Official | Storybook Compass MCP (this project) | |
Where it runs | Inside the Storybook dev server (addon), HTTP | Standalone stdio process you point at any URL |
Storybook-side setup | Install addon + enable | None β works against any already-published Storybook |
Data source | Components manifest ( | Standard |
Data richness | Props, descriptions, code snippets | Titles, ids, tags, import paths, docs/story inventory |
Remote/deployed Storybooks | Chromatic-hosted or self-hosted | Any reachable published Storybook 7+ |
Framework coverage | Manifest limited to React frameworks, | Framework-agnostic (reads the index every Storybook emits) |
Focus | Story development, testing, docs inside the repo | Cross-repo component discovery, recommendation, and UX planning |
Use the official addon when you develop inside the Storybook repo and want rich props/snippets. Use Compass when you consume a design system from other codebases, UX workflows, or AI agents, and only have its published Storybook URL.
πΌοΈ Architecture
flowchart LR
A[AI Client] --> B[Storybook Compass MCP Server]
B --> C[Storybook Metadata JSON]
C --> D[Catalog + Cache]
D --> E[Tool Responses]
E --> Aπ§© Framework Note
Many design-system Storybooks target a single framework (Angular, React, Vue, or Web Components). This server provides framework-agnostic discovery with Vue-flavored implementation guidance; recommended patterns can be adapted for other frameworks when no framework-compatible package or Web Component exists.
See Using Compass with Vue and UX.
π οΈ Setup For Maintainers
corepack enable
pnpm install
pnpm build
pnpm smoke-testEquivalent npm flow:
npm install
npm run build
npm run smoke-testNode.js >=20
pnpm remains the maintainer default path
npm is a supported compatibility path for install and script execution
Use
node dist/index.jsfor MCP clients.Use
pnpm startornpm startonly for manual local terminal runs.npx storybook-compass-mcpis not supported because this repository is not published as an npm package.
β οΈ Known Limits
Storybook metadata may not include full rendered docs.
This reads structured Storybook JSON, not iframe HTML.
discover_foundation_entries, specialized foundation guidance tools,get_component_style_dependencies, andget_catalog_quality_reportreturn metadata-derived signals and guidance only.These tools do not return authoritative design token values, color values, spacing scales, or generated CSS.
For authoritative values and confirmed dependencies, verify in the design system docs/source.
Framework-specific examples are design guidance when working in other frameworks unless compatible packages exist.
Raw Storybook inspection (#12) is deferred until there is a real debugging need.
Any future raw iframe or rendered-doc inspection should remain opt-in, bounded, and lower-trust than structured metadata.
How To Interpret Results
Structured metadata is the primary source for this server.
Inferred metadata/path signals are lower-confidence guidance.
Deeper docs/source inspection is not available in the current version and is deferred unless added later under explicit guardrails.
π Docs
π License
MIT Β© 2026 Martin Kilmartin
Available Tools
16 toolscreate_component_recommendation_matrixB
Creates a generic component recommendation matrix for multiple UI needs using deterministic metadata matching.
Inputs: uiNeeds (required), title.
discover_foundation_entriesA
Returns metadata-derived discovery guidance for foundation-related Compass catalog entries only; not authoritative token values, CSS, package APIs, or rendered docs.
Inputs: limit, query, category. Returns: meta, entries, guidance, resultType
get_base_style_guidanceB
Returns metadata-discovered Compass base-style guidance with explicit unavailable handling.
Inputs: limit, query.
get_catalog_quality_reportA
Returns a compact metadata quality report for current catalog coverage and known limitations.
Inputs: no named parameters. Returns: meta, summary, coverage, guidance, +3 more
get_color_paletteC
Returns metadata-discovered Compass color guidance with explicit unavailable handling.
Inputs: limit, query.
get_component_docsB
Returns compact metadata-derived component guidance, availability, ids, examples metadata, and usage caveats for a component, story id, or docs id.
Inputs: id (required), includeExamples. Returns: query, matched, examples, component, +4 more
get_component_style_dependenciesA
Returns metadata-derived discovery guidance for style dependency hints on a known component path only; not authoritative token values, CSS, package APIs, or rendered docs.
Inputs: componentPath (required). Returns: meta, guidance, resultType, dependencies, +1 more
get_design_tokensC
Returns metadata-discovered Compass design token guidance with source confidence and evidence.
Inputs: limit, query.
get_spacing_guidanceB
Returns metadata-discovered Compass spacing guidance with source confidence and evidence.
Inputs: limit, query.
get_theme_usage_examplesC
Returns metadata-discovered Compass theme usage guidance and examples.
Inputs: limit, query.
get_typography_guidanceC
Returns metadata-discovered Compass typography guidance with source confidence and evidence.
Inputs: limit, query.
list_componentsC
Lists Compass components from normalized Storybook metadata.
Inputs: limit.
recommend_componentB
Recommends Compass components for a plain-language UI use case using deterministic metadata matching.
Inputs: useCase (required), limit. Returns: meta, query, guidance, resultType, +1 more
refresh_metadata_cacheB
Forces an in-memory refresh of normalized Storybook metadata and reports stale fallback details when refresh fails.
Inputs: no named parameters.
search_componentsB
Searches Compass components by path, ids, tags, import paths, and entry names.
Inputs: query (required), limit.
smoke_testB
Returns a successful response from the Compass MCP scaffold.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 16 tools
The component-facing tools (list, search, get_component_docs, recommend_component, create_component_recommendation_matrix) are reasonably distinct, but the foundation/guidance cluster overlaps heavily: get_design_tokens, get_color_palette, get_typography_guidance, discover_foundation_entries, get_base_style_guidance and get_theme_usage_examples all read as 'get guidance about a foundation category' with unclear boundaries. An agent could easily pick color_palette when design_tokens or foundation_entries was intended. get_component_style_dependencies versus get_component_docs is also a subtle distinction.
The set follows a clear verb_noun convention (list_components, search_components, get_*_guidance, recommend_component, refresh_metadata_cache). Deviations are minor: smoke_test lacks an action verb and create_component_recommendation_matrix is unusually long but still follows the pattern.
16 tools is at the upper edge for a metadata/guidance server, and the count is inflated by six near-adjacent foundation guidance endpoints that could plausibly be consolidated into one parameterized tool. Each tool is small, so it is borderline rather than clearly over-scoped.
The surface covers discovery (list/search), detail retrieval (docs), recommendation (single and matrix), foundation guidance across spacing, color, typography, tokens and theming, plus cache refresh and a quality report. Gaps are minor, e.g. no explicit per-component prop/API or story enumeration beyond get_component_docs, but core lifecycle is covered.
Maintenance
Related MCP Connectors
Serves your design system and coding standards to coding agents, so they stop guessing.
Verified component catalog over remote MCP: agents pick component ids and get a stamped project repo that builds. Connect at https://www.botkelp.com/mcp. Auth: MCP OAuth 2.1, or a Bearer bk_live_ API key; initialize and tools/list are open.
Live React design-system APIs, patterns, and code validation so AI agents build real UI, not slop.
Find UI components and themes, retrieve code, and generate with hosted 21st AI when enabled.
Related MCP Servers
- AlicenseAqualityBmaintenanceServer that enables AI assistants to interact with Storybook design systems. Extract component HTML, analyze styles, and help with design system adoption and refactoring.9465 npm73MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI assistants to browse Storybook components, manage stories, inspect props, and capture screenshots of components.61 npm15AGPL 3.0
- AlicenseAqualityDmaintenanceIntegrates with a running Storybook instance to let AI-powered coding tools browse, inspect, and scaffold components from natural language.4MIT
- AlicenseNot gradedqualityDmaintenanceA standalone MCP server that provides AI assistants with comprehensive access to BrowserStack's design system components, enabling component search, detailed prop analysis, and usage examples from Storybook.MIT