@storybook/mcp 0.8.0 → 10.6.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,225 @@
1
+ # @storybook/mcp
2
+
3
+ ## 0.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#298](https://github.com/storybookjs/mcp/pull/298) [`ae6e9bb`](https://github.com/storybookjs/mcp/commit/ae6e9bbdb55f4262e697a68437a00d4cd4accc4d) Thanks [@kasperpeulen](https://github.com/kasperpeulen)! - Expose serverless Storybook AI metadata from addon-mcp presets. The new preset returns MCP-shaped instructions and tool descriptors, plus a local `get-storybook-story-instructions` runner that shares the same builders as the live MCP server.
8
+
9
+ - [#308](https://github.com/storybookjs/mcp/pull/308) [`ff09619`](https://github.com/storybookjs/mcp/commit/ff09619079520ed238eff91bd385b7ba0cb7b102) Thanks [@JReinhold](https://github.com/JReinhold)! - Support v0 (inline) and v1 (split/ref) Storybook manifest formats. `@storybook/mcp` follows `$ref` pointers into sibling `services/` payloads for static and remote sources; `@storybook/addon-mcp` adds an in-process manifest provider for `experimentalDocgenServer` dev mode and fixes composition so local docgen-server and remote v0/v1 composed sources all work.
10
+
11
+ ### Patch Changes
12
+
13
+ - [#329](https://github.com/storybookjs/mcp/pull/329) [`86ff2bf`](https://github.com/storybookjs/mcp/commit/86ff2bfb62818cf1370aacec1a672f1f608e8cf2) Thanks [@kasperpeulen](https://github.com/kasperpeulen)! - Fold the "CRITICAL: Never hallucinate component properties!" guidance from the documented AGENTS.md snippet into the Documentation Workflow server instructions, so the docs no longer need to recommend a manual AGENTS.md addition. The separate "Verification Rules" section is merged into the Documentation Workflow (the guidance is about checking documentation before starting work, not about verifying it afterwards), keeping the full default instructions under the 2,048-character client truncation limit.
14
+
15
+ - [#242](https://github.com/storybookjs/mcp/pull/242) [`d142450`](https://github.com/storybookjs/mcp/commit/d142450ba94ce341d0a0ef869ddd057610d10fbd) Thanks [@kasperpeulen](https://github.com/kasperpeulen)! - Show private composed Storybooks as own-MCP guidance when accessed through the local MCP proxy.
16
+
17
+ - [#335](https://github.com/storybookjs/mcp/pull/335) [`3486c0d`](https://github.com/storybookjs/mcp/commit/3486c0d81bbbfb25940291a0b8560fa6c0e625b5) Thanks [@kasperpeulen](https://github.com/kasperpeulen)! - Close the shared-code and docs-question gaps in the default (review-off) workflow steering, which eval runs showed agents falling through:
18
+
19
+ - The dev and validation instructions now trigger on "anything that changes how the UI looks" (the stories skill's proven phrasing) instead of only "any component or story" — a theme-token edit is literally neither, so agents (GPT-5.5 on the MCP path consistently) finished shared-file changes with shell-level verification only, never calling preview-stories or run-story-tests. The preview-stories and run-story-tests descriptions carry the same trigger, including that a shared file has no stories of its own so the consumers' stories are the ones to surface, and that typecheck/lint does not replace story tests.
20
+ - The docs-question rule now opens the server instructions ("Answer questions about component props, API, or usage with the documentation tools — never from source or type definitions") — Claude Code was observed grepping component source for props questions without ever reaching the rule further down. Design-system discovery is unconditional for new UI work — agents answered docs requests by grepping component source while still producing a correct-looking answer. The get-documentation and list-all-documentation descriptions repeat that steering at the tool level, where it reaches agents even when a client truncates server instructions, and get-storybook-story-instructions (the tool billed as the source of truth for story work, on both the MCP and `storybook ai` CLI channels) appends a Design-System Documentation section whenever the docs tools are registered.
21
+
22
+ The review-off server instructions stay under the 2,048-char client truncation limit (now 2,046 chars), paid for by tightening existing sentences without dropping any rule.
23
+
24
+ - [#320](https://github.com/storybookjs/mcp/pull/320) [`da8d525`](https://github.com/storybookjs/mcp/commit/da8d525167045299985bcb6f236f91502716c9e8) Thanks [@kasperpeulen](https://github.com/kasperpeulen)! - Slimmed the `experimentalReview` server instructions under the 2,048-character client truncation limit. Claude Code hard-truncates MCP server instructions at 2,048 characters, and the review-flavored instructions had grown to ~8.7k — the Validation and Documentation workflow sections never reached the model and agents stopped using the documentation tools. With the flag on, the dev, test, and docs sections now use slim variants that only carry the workflow triggers; the detailed guidance moved into the tool descriptions and tool results (`get-stories-by-component`, `get-changed-stories`, `display-review`, `list-all-documentation`), which are never truncated. The default (review off) instructions are unchanged. A unit test enforces the limit for every toolset configuration in both review modes.
25
+
26
+ - [#279](https://github.com/storybookjs/mcp/pull/279) [`367ecc1`](https://github.com/storybookjs/mcp/commit/367ecc1eabdc92f3fa60e6159b2d79a2bb2f6f77) Thanks [@huang-julien](https://github.com/huang-julien)! - Support the externalized-docgen component manifest format. Newer Storybooks emit a `components.json` whose entries are lightweight stubs carrying a `docgen.$ref` pointer instead of inline `path`/docgen data, with the full component data served from a referenced file. `get-documentation` and `get-documentation-for-story` now resolve that reference (through the same auth-aware manifest provider) before formatting, so composition/multi-source documentation works against Storybooks using the new format. `path` and the top-level manifest `v` field are now optional to accommodate stubs and referenced docgen files.
27
+
28
+ ## 0.7.0
29
+
30
+ ### Minor Changes
31
+
32
+ - [#209](https://github.com/storybookjs/mcp/pull/209) [`f59e38c`](https://github.com/storybookjs/mcp/commit/f59e38c1b91500f886cd923141b6ce45fa6c5822) Thanks [@kasperpeulen](https://github.com/kasperpeulen)! - Add support for subcomponent docs
33
+
34
+ ## 0.6.2
35
+
36
+ ### Patch Changes
37
+
38
+ - [#206](https://github.com/storybookjs/mcp/pull/206) [`70b5b23`](https://github.com/storybookjs/mcp/commit/70b5b2333a3bd37fc8065cc56cc8f8dcd474572e) Thanks [@kasperpeulen](https://github.com/kasperpeulen)! - Support Storybook component manifests that use `reactComponentMeta` for React prop extraction.
39
+
40
+ This keeps MCP documentation output working when Storybook is configured to emit the newer
41
+ `reactComponentMeta` payload instead of `reactDocgen` or `reactDocgenTypescript`.
42
+
43
+ - [#204](https://github.com/storybookjs/mcp/pull/204) [`b2a327d`](https://github.com/storybookjs/mcp/commit/b2a327dde8d0529ee3a2b80e033ce35991ad538e) Thanks [@JReinhold](https://github.com/JReinhold)! - upgrade tmcp dependencies
44
+
45
+ ## 0.6.1
46
+
47
+ ### Patch Changes
48
+
49
+ - [#172](https://github.com/storybookjs/mcp/pull/172) [`a610073`](https://github.com/storybookjs/mcp/commit/a610073f123efc2843e1e0deffd6eb2902d94c96) Thanks [@JReinhold](https://github.com/JReinhold)! - Simplify package READMEs for docs-site-first documentation
50
+
51
+ ## 0.6.0
52
+
53
+ ### Minor Changes
54
+
55
+ - [#185](https://github.com/storybookjs/mcp/pull/185) [`c5439b7`](https://github.com/storybookjs/mcp/commit/c5439b72425a614e23549ba661d43df87a58443a) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Add MCP server-level instructions to both packages
56
+
57
+ Both `@storybook/mcp` and `@storybook/addon-mcp` now include server instructions in the MCP `initialize` response. These instructions guide agents on how to use the available tools effectively without requiring explicit prompting from users.
58
+
59
+ ### Patch Changes
60
+
61
+ - [#194](https://github.com/storybookjs/mcp/pull/194) [`eb0ea73`](https://github.com/storybookjs/mcp/commit/eb0ea73f30c73a8102d9023c5201d1459d791fa1) Thanks [@JReinhold](https://github.com/JReinhold)! - Forward `sources` through `createStorybookMcpHandler()` into the per-request transport context.
62
+
63
+ ## 0.5.1
64
+
65
+ ### Patch Changes
66
+
67
+ - [#181](https://github.com/storybookjs/mcp/pull/181) [`ff217d8`](https://github.com/storybookjs/mcp/commit/ff217d8d901b3b6ec932613792df17118b452fe3) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Rename feature flag `experimentalComponentsManifest` → `componentsManifest`
68
+
69
+ The Storybook feature flag has been renamed from `experimentalComponentsManifest` to `componentsManifest` and now defaults to `true` in Storybook core.
70
+
71
+ ## 0.5.0
72
+
73
+ ### Minor Changes
74
+
75
+ - [#171](https://github.com/storybookjs/mcp/pull/171) [`b3a8356`](https://github.com/storybookjs/mcp/commit/b3a835605a760cdfb8748c17f6daec8701fb5914) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Export `addGetStoryDocumentationTool` directly instead of renaming it to `addGetComponentStoryDocumentationTool`.
76
+
77
+ **Breaking change**: If you were importing `addGetComponentStoryDocumentationTool` from `@storybook/mcp`, update your import to use `addGetStoryDocumentationTool` instead.
78
+
79
+ ### Patch Changes
80
+
81
+ - [#175](https://github.com/storybookjs/mcp/pull/175) [`6a098f9`](https://github.com/storybookjs/mcp/commit/6a098f96d3da58d572037e07a2aa33dab2a51bfd) Thanks [@JReinhold](https://github.com/JReinhold)! - Add story ID based inputs for preview/testing workflows and surface story IDs in docs outputs.
82
+
83
+ This change keeps existing path-based story inputs (`absoluteStoryPath` + `exportName`) while adding a `storyId` input shape for `preview-stories` and `run-story-tests`. It also adds `withStoryIds` to `list-all-documentation` and includes story IDs in `get-documentation` story sections, so agents can discover and reuse IDs directly without extra filesystem lookup steps.
84
+
85
+ ## 0.4.1
86
+
87
+ ### Patch Changes
88
+
89
+ - [#131](https://github.com/storybookjs/mcp/pull/131) [`9cf991c`](https://github.com/storybookjs/mcp/commit/9cf991c65e0c67bf85b011ab6ed29dac9cac2cfa) Thanks [@JReinhold](https://github.com/JReinhold)! - Fixed type bundling issue
90
+
91
+ ## 0.4.0
92
+
93
+ ### Minor Changes
94
+
95
+ - [#168](https://github.com/storybookjs/mcp/pull/168) [`c0793d4`](https://github.com/storybookjs/mcp/commit/c0793d4dd9b1895f6f67be21a5bf0339a3458e95) Thanks [@kasperpeulen](https://github.com/kasperpeulen)! - Add react-docgen-typescript support for component manifest parsing.
96
+
97
+ ## 0.3.0
98
+
99
+ ### Minor Changes
100
+
101
+ - [#165](https://github.com/storybookjs/mcp/pull/165) [`e088e05`](https://github.com/storybookjs/mcp/commit/e088e0501619b29bf7f38ef2ee2b60c8477c803a) Thanks [@JReinhold](https://github.com/JReinhold)! - Remove support for XML format.
102
+
103
+ ## Breaking Change
104
+
105
+ The related option to configure XML vs markdown format now has no impact, the output is always formatted as markdown.
106
+
107
+ - [#140](https://github.com/storybookjs/mcp/pull/140) [`f9fce2a`](https://github.com/storybookjs/mcp/commit/f9fce2a12b691d1187d8bc719c88e912e27e3391) Thanks [@kasperpeulen](https://github.com/kasperpeulen)! - Add multi-source composition with OAuth for private Storybooks
108
+
109
+ ## 0.2.2
110
+
111
+ ### Patch Changes
112
+
113
+ - [#123](https://github.com/storybookjs/mcp/pull/123) [`b7aeb40`](https://github.com/storybookjs/mcp/commit/b7aeb40c32d831618774c13e316596e9ff840aa7) Thanks [@valentinpalkovic](https://github.com/valentinpalkovic)! - Minimize token usage by only including the 3 first stories in component documentation.
114
+
115
+ ... if there are already prop types. If there are no prop types, include all stories. Additional stories can be fetched individually using a new `get-documentation-for-story` tool.
116
+
117
+ - [#160](https://github.com/storybookjs/mcp/pull/160) [`bab8ec9`](https://github.com/storybookjs/mcp/commit/bab8ec9ece4f89661b458fbecd59b0a560948192) Thanks [@JReinhold](https://github.com/JReinhold)! - Render component-attached MDX docs entries in markdown output for `get-documentation`.
118
+
119
+ This fixes a regression where docs attached to components via `component.docs` in `components.json` were not included in markdown responses. The markdown formatter now emits a `## Docs` section below stories (and before props).
120
+
121
+ ## 0.2.1
122
+
123
+ ### Patch Changes
124
+
125
+ - [#122](https://github.com/storybookjs/mcp/pull/122) [`0254c09`](https://github.com/storybookjs/mcp/commit/0254c091f60ac8b1c69116c936bcb7a1540dc916) Thanks [@JReinhold](https://github.com/JReinhold)! - Add resultText to args of onListAllDocumentation and onGetDocumentation
126
+
127
+ ## 0.2.0
128
+
129
+ ### Minor Changes
130
+
131
+ - [#120](https://github.com/storybookjs/mcp/pull/120) [`c1fc816`](https://github.com/storybookjs/mcp/commit/c1fc8167a8077e3bb07bce3c9c22539b23a07a29) Thanks [@JReinhold](https://github.com/JReinhold)! - Add support for docs entries in manifests, sourced by MDX files.
132
+
133
+ # Breaking Changes
134
+
135
+ This change introduces a number of minor breaking changes to `@storybook/mcp`:
136
+
137
+ 1. The lower level tool adder functions have been renamed:
138
+ 2. `addGetComponentDocumentationTool` -> `addGetDocumentationTool`
139
+ 3. `addListAllComponentsTool` -> `addListAllDocumentationTool`
140
+ 4. The optional tool hooks have been renamed:
141
+ 5. `onListAllComponents` -> `onListAllDocumentation`
142
+ 6. `onGetComponentDocumentation` -> `onGetDocumentation`
143
+ 7. The exported `MANIFEST_PATH` constant have been removed in favor of two new constants, `COMPONENT_MANIFEST_PATH` and `DOCS_MANIFEST_PATH`
144
+
145
+ ## 0.1.1
146
+
147
+ ### Patch Changes
148
+
149
+ - [#105](https://github.com/storybookjs/mcp/pull/105) [`e27f6b2`](https://github.com/storybookjs/mcp/commit/e27f6b2a78354f252715ae14dd9de321c9055cda) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Update Valibot to v1.2.0 to fix security vulnerabilities
150
+
151
+ Valibot 1.1.0 contained 3 security vulnerabilities that are addressed in v1.2.0. This is a non-breaking security patch - no changes required for consumers.
152
+
153
+ ## 0.1.0
154
+
155
+ ### Minor Changes
156
+
157
+ - [#54](https://github.com/storybookjs/mcp/pull/54) [`5d18405`](https://github.com/storybookjs/mcp/commit/5d1840506f2ee4f1ae1f757ff133108a046cfc5d) Thanks [@JReinhold](https://github.com/JReinhold)! - Replace the `source` property in the context with `request`.
158
+
159
+ Now you don't pass in a source string that might be fetched or handled by your custom `manifestProvider`, but instead you pass in the whole web request. (This is automatically handled if you use the createStorybookMcpHandler() function).
160
+
161
+ The default action is now to fetch the manifest from `../manifests/components.json` assuming the server is running at `./mcp`. Your custom `manifestProvider()`-function then also does not get a source string as an argument, but gets the whole web request, that you can use to get information about where to fetch the manifest from. It also gets a second argument, `path`, which it should use to determine which specific manifest to get from a built Storybook. (Currently always `./manifests/components.json`, but in the future it might be other paths too).
162
+
163
+ ### Patch Changes
164
+
165
+ - [#86](https://github.com/storybookjs/mcp/pull/86) [`94c01d2`](https://github.com/storybookjs/mcp/commit/94c01d2c162b5f6a20268957a17eedf7beeb7156) Thanks [@JReinhold](https://github.com/JReinhold)! - Docs toolset: output markdown instead of XML, configurable via experimentalOutput: 'markdown' | 'xml' addon option
166
+
167
+ - [#85](https://github.com/storybookjs/mcp/pull/85) [`9f75d0f`](https://github.com/storybookjs/mcp/commit/9f75d0f0d9c2e24e6ec4078526a6876ebc31f6bb) Thanks [@JReinhold](https://github.com/JReinhold)! - Allow undefined request in server context when using custom manifestProvider
168
+
169
+ - [#79](https://github.com/storybookjs/mcp/pull/79) [`a9321a3`](https://github.com/storybookjs/mcp/commit/a9321a33e6ec907eacd876d7ede368fc672d95c6) Thanks [@JReinhold](https://github.com/JReinhold)! - get-documentation now only handles one component at a time
170
+
171
+ - [#61](https://github.com/storybookjs/mcp/pull/61) [`77536a7`](https://github.com/storybookjs/mcp/commit/77536a71812fe111f6b60c84bd2c26cb0eb00bc5) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - rename examples to stories in manifest
172
+
173
+ - [#55](https://github.com/storybookjs/mcp/pull/55) [`cddbf34`](https://github.com/storybookjs/mcp/commit/cddbf34a0c99296856ecfed2c24cf689fcb2fd2a) Thanks [@JReinhold](https://github.com/JReinhold)! - Support error.name in manifests
174
+
175
+ ## 0.0.7-next.0
176
+
177
+ ### Patch Changes
178
+
179
+ - [#61](https://github.com/storybookjs/mcp/pull/61) [`77536a7`](https://github.com/storybookjs/mcp/commit/77536a71812fe111f6b60c84bd2c26cb0eb00bc5) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - rename examples to stories in manifest
180
+
181
+ - [#55](https://github.com/storybookjs/mcp/pull/55) [`cddbf34`](https://github.com/storybookjs/mcp/commit/cddbf34a0c99296856ecfed2c24cf689fcb2fd2a) Thanks [@JReinhold](https://github.com/JReinhold)! - Support error.name in manifests
182
+
183
+ ## 0.0.6
184
+
185
+ ### Patch Changes
186
+
187
+ - [#48](https://github.com/storybookjs/mcp/pull/48) [`52be338`](https://github.com/storybookjs/mcp/commit/52be33863c62c703826fa915be7eae656c18a6ed) Thanks [@JReinhold](https://github.com/JReinhold)! - Add optional "enabled" function to the directly exported tool adders. This allow you to define a function that will dynamically enable/disable the tool however you want, eg. per request condition
188
+
189
+ - [#51](https://github.com/storybookjs/mcp/pull/51) [`2028709`](https://github.com/storybookjs/mcp/commit/20287092a914fb108af1d90d64adf4c604e1a81a) Thanks [@paoloricciuti](https://github.com/paoloricciuti)! - chore: update `tmcp`
190
+
191
+ ## 0.0.5
192
+
193
+ ### Patch Changes
194
+
195
+ - [#42](https://github.com/storybookjs/mcp/pull/42) [`57a1602`](https://github.com/storybookjs/mcp/commit/57a16022dda428ddc303eec615b5b4c73942144c) Thanks [@JReinhold](https://github.com/JReinhold)! - Add optional event handlers to the tool calls, so you can optionally run some functionality on all tool calls
196
+
197
+ ## 0.0.4
198
+
199
+ ### Patch Changes
200
+
201
+ - [#38](https://github.com/storybookjs/mcp/pull/38) [`fc83cd1`](https://github.com/storybookjs/mcp/commit/fc83cd1c7f50cc0d12bc24ed427c5b38fa52acee) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - include prop types in component documentation tool
202
+
203
+ ## 0.0.3
204
+
205
+ ### Patch Changes
206
+
207
+ - [#32](https://github.com/storybookjs/mcp/pull/32) [`531a2d4`](https://github.com/storybookjs/mcp/commit/531a2d4be0684c94d516b76d93863337883b2bad) Thanks [@copilot-swe-agent](https://github.com/apps/copilot-swe-agent)! - Support passing in a custom manifestProvider option to the MCP server, falling back to fetch() as the default
208
+
209
+ - [#33](https://github.com/storybookjs/mcp/pull/33) [`ae6ab44`](https://github.com/storybookjs/mcp/commit/ae6ab44e4c4bdf9797facab69c6748bc7a52ba9a) Thanks [@JReinhold](https://github.com/JReinhold)! - Export tools to be merged into other MCP servers.
210
+
211
+ Currently only [tmcp](https://github.com/paoloricciuti/tmcp)-based MCP servers supports using these tools directly.
212
+
213
+ ## 0.0.2
214
+
215
+ ### Patch Changes
216
+
217
+ - [#31](https://github.com/storybookjs/mcp/pull/31) [`512c958`](https://github.com/storybookjs/mcp/commit/512c9588bf6e6b39b7c4d58694229b1e67ffc1d2) Thanks [@JReinhold](https://github.com/JReinhold)! - use shared tsdown config for all monorepo packages, target node 20.19
218
+
219
+ ## 0.0.1
220
+
221
+ ### Patch Changes
222
+
223
+ - [#29](https://github.com/storybookjs/mcp/pull/29) [`4086e0d`](https://github.com/storybookjs/mcp/commit/4086e0d41d29a2e5c412a5cfd6bc65d97bf9ee76) Thanks [@JReinhold](https://github.com/JReinhold)! - Update documentation and repository links
224
+
225
+ - [#27](https://github.com/storybookjs/mcp/pull/27) [`2168250`](https://github.com/storybookjs/mcp/commit/2168250cc1f365a221b3c63dce375ed4bf1a583b) Thanks [@JReinhold](https://github.com/JReinhold)! - Initial release
package/README.md CHANGED
@@ -15,9 +15,9 @@ Learn more about Storybook at [storybook.js.org](https://storybook.js.org/?ref=r
15
15
 
16
16
  ### Example implementation
17
17
 
18
- Reference implementation: [apps/self-host-mcp/server.ts](../../apps/self-host-mcp/server.ts)
18
+ In-repo local server: [`serve.ts`](./serve.ts) (Node process that loads manifests from a directory or URL).
19
19
 
20
- The example repo demonstrates self-hosting patterns for both a Node.js process and a Netlify Function.
20
+ The snippets below cover the common self-hosting patterns.
21
21
 
22
22
  #### Minimal implementation
23
23
 
package/dist/index.d.ts CHANGED
@@ -1,8 +1,7 @@
1
- import { t as instructions_default } from "./instructions-CiOmp0JI.js";
2
- import { McpServer } from "tmcp";
3
1
  import * as v from "valibot";
2
+ import { McpServer } from "tmcp";
4
3
 
5
- //#region src/types.d.ts
4
+ //#region code/lib/mcp/.dts-emit/code/lib/mcp/src/types.d.ts
6
5
  /**
7
6
  * Represents a single Storybook source (local or remote).
8
7
  */
@@ -101,9 +100,6 @@ type ResolvedEntry = {
101
100
  doc: Doc;
102
101
  };
103
102
  declare const Story: v.ObjectSchema<{
104
- readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
105
- readonly snippet: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
106
- readonly summary: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
107
103
  readonly name: v.StringSchema<undefined>;
108
104
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
109
105
  readonly jsDocTags: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>;
@@ -111,6 +107,9 @@ declare const Story: v.ObjectSchema<{
111
107
  readonly name: v.StringSchema<undefined>;
112
108
  readonly message: v.StringSchema<undefined>;
113
109
  }, undefined>, undefined>;
110
+ readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
111
+ readonly snippet: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
112
+ readonly summary: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
114
113
  }, undefined>;
115
114
  type Story = v.InferOutput<typeof Story>;
116
115
  /** Inline (v0) docs entry: the full MDX `content` is embedded. */
@@ -129,11 +128,21 @@ declare const DocV0: v.ObjectSchema<{
129
128
  type DocV0 = v.InferOutput<typeof DocV0>;
130
129
  /** Inline (v0) component: docgen, stories and attached docs are all embedded. */
131
130
  declare const ComponentManifestV0: v.ObjectSchema<{
131
+ readonly name: v.StringSchema<undefined>;
132
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
133
+ readonly jsDocTags: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>;
134
+ readonly error: v.OptionalSchema<v.ObjectSchema<{
135
+ readonly name: v.StringSchema<undefined>;
136
+ readonly message: v.StringSchema<undefined>;
137
+ }, undefined>, undefined>;
138
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
139
+ readonly summary: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
140
+ readonly import: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
141
+ readonly reactDocgen: v.OptionalSchema<v.AnySchema, undefined>;
142
+ readonly reactDocgenTypescript: v.OptionalSchema<v.AnySchema, undefined>;
143
+ readonly reactComponentMeta: v.OptionalSchema<v.AnySchema, undefined>;
132
144
  readonly id: v.StringSchema<undefined>;
133
145
  readonly stories: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
134
- readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
135
- readonly snippet: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
136
- readonly summary: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
137
146
  readonly name: v.StringSchema<undefined>;
138
147
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
139
148
  readonly jsDocTags: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>;
@@ -141,14 +150,11 @@ declare const ComponentManifestV0: v.ObjectSchema<{
141
150
  readonly name: v.StringSchema<undefined>;
142
151
  readonly message: v.StringSchema<undefined>;
143
152
  }, undefined>, undefined>;
153
+ readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
154
+ readonly snippet: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
155
+ readonly summary: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
144
156
  }, undefined>, undefined>, undefined>;
145
157
  readonly subcomponents: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
146
- readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
147
- readonly summary: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
148
- readonly import: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
149
- readonly reactDocgen: v.OptionalSchema<v.AnySchema, undefined>;
150
- readonly reactDocgenTypescript: v.OptionalSchema<v.AnySchema, undefined>;
151
- readonly reactComponentMeta: v.OptionalSchema<v.AnySchema, undefined>;
152
158
  readonly name: v.StringSchema<undefined>;
153
159
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
154
160
  readonly jsDocTags: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>;
@@ -156,6 +162,12 @@ declare const ComponentManifestV0: v.ObjectSchema<{
156
162
  readonly name: v.StringSchema<undefined>;
157
163
  readonly message: v.StringSchema<undefined>;
158
164
  }, undefined>, undefined>;
165
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
166
+ readonly summary: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
167
+ readonly import: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
168
+ readonly reactDocgen: v.OptionalSchema<v.AnySchema, undefined>;
169
+ readonly reactDocgenTypescript: v.OptionalSchema<v.AnySchema, undefined>;
170
+ readonly reactComponentMeta: v.OptionalSchema<v.AnySchema, undefined>;
159
171
  }, undefined>, undefined>, undefined>;
160
172
  readonly docs: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
161
173
  readonly id: v.StringSchema<undefined>;
@@ -169,19 +181,6 @@ declare const ComponentManifestV0: v.ObjectSchema<{
169
181
  readonly message: v.StringSchema<undefined>;
170
182
  }, undefined>, undefined>;
171
183
  }, undefined>, undefined>, undefined>;
172
- readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
173
- readonly summary: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
174
- readonly import: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
175
- readonly reactDocgen: v.OptionalSchema<v.AnySchema, undefined>;
176
- readonly reactDocgenTypescript: v.OptionalSchema<v.AnySchema, undefined>;
177
- readonly reactComponentMeta: v.OptionalSchema<v.AnySchema, undefined>;
178
- readonly name: v.StringSchema<undefined>;
179
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
180
- readonly jsDocTags: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>;
181
- readonly error: v.OptionalSchema<v.ObjectSchema<{
182
- readonly name: v.StringSchema<undefined>;
183
- readonly message: v.StringSchema<undefined>;
184
- }, undefined>, undefined>;
185
184
  }, undefined>;
186
185
  type ComponentManifestV0 = v.InferOutput<typeof ComponentManifestV0>;
187
186
  /**
@@ -241,11 +240,21 @@ type ComponentManifestV1 = v.InferOutput<typeof ComponentManifestV1>;
241
240
  declare const ComponentManifestMap: v.VariantSchema<"v", [v.ObjectSchema<{
242
241
  readonly v: v.LiteralSchema<0, undefined>;
243
242
  readonly components: v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
243
+ readonly name: v.StringSchema<undefined>;
244
+ readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
245
+ readonly jsDocTags: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>;
246
+ readonly error: v.OptionalSchema<v.ObjectSchema<{
247
+ readonly name: v.StringSchema<undefined>;
248
+ readonly message: v.StringSchema<undefined>;
249
+ }, undefined>, undefined>;
250
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
251
+ readonly summary: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
252
+ readonly import: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
253
+ readonly reactDocgen: v.OptionalSchema<v.AnySchema, undefined>;
254
+ readonly reactDocgenTypescript: v.OptionalSchema<v.AnySchema, undefined>;
255
+ readonly reactComponentMeta: v.OptionalSchema<v.AnySchema, undefined>;
244
256
  readonly id: v.StringSchema<undefined>;
245
257
  readonly stories: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
246
- readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
247
- readonly snippet: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
248
- readonly summary: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
249
258
  readonly name: v.StringSchema<undefined>;
250
259
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
251
260
  readonly jsDocTags: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>;
@@ -253,14 +262,11 @@ declare const ComponentManifestMap: v.VariantSchema<"v", [v.ObjectSchema<{
253
262
  readonly name: v.StringSchema<undefined>;
254
263
  readonly message: v.StringSchema<undefined>;
255
264
  }, undefined>, undefined>;
265
+ readonly id: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
266
+ readonly snippet: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
267
+ readonly summary: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
256
268
  }, undefined>, undefined>, undefined>;
257
269
  readonly subcomponents: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
258
- readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
259
- readonly summary: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
260
- readonly import: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
261
- readonly reactDocgen: v.OptionalSchema<v.AnySchema, undefined>;
262
- readonly reactDocgenTypescript: v.OptionalSchema<v.AnySchema, undefined>;
263
- readonly reactComponentMeta: v.OptionalSchema<v.AnySchema, undefined>;
264
270
  readonly name: v.StringSchema<undefined>;
265
271
  readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
266
272
  readonly jsDocTags: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>;
@@ -268,6 +274,12 @@ declare const ComponentManifestMap: v.VariantSchema<"v", [v.ObjectSchema<{
268
274
  readonly name: v.StringSchema<undefined>;
269
275
  readonly message: v.StringSchema<undefined>;
270
276
  }, undefined>, undefined>;
277
+ readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
278
+ readonly summary: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
279
+ readonly import: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
280
+ readonly reactDocgen: v.OptionalSchema<v.AnySchema, undefined>;
281
+ readonly reactDocgenTypescript: v.OptionalSchema<v.AnySchema, undefined>;
282
+ readonly reactComponentMeta: v.OptionalSchema<v.AnySchema, undefined>;
271
283
  }, undefined>, undefined>, undefined>;
272
284
  readonly docs: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ObjectSchema<{
273
285
  readonly id: v.StringSchema<undefined>;
@@ -281,19 +293,6 @@ declare const ComponentManifestMap: v.VariantSchema<"v", [v.ObjectSchema<{
281
293
  readonly message: v.StringSchema<undefined>;
282
294
  }, undefined>, undefined>;
283
295
  }, undefined>, undefined>, undefined>;
284
- readonly path: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
285
- readonly summary: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
286
- readonly import: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
287
- readonly reactDocgen: v.OptionalSchema<v.AnySchema, undefined>;
288
- readonly reactDocgenTypescript: v.OptionalSchema<v.AnySchema, undefined>;
289
- readonly reactComponentMeta: v.OptionalSchema<v.AnySchema, undefined>;
290
- readonly name: v.StringSchema<undefined>;
291
- readonly description: v.OptionalSchema<v.StringSchema<undefined>, undefined>;
292
- readonly jsDocTags: v.OptionalSchema<v.RecordSchema<v.StringSchema<undefined>, v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, undefined>;
293
- readonly error: v.OptionalSchema<v.ObjectSchema<{
294
- readonly name: v.StringSchema<undefined>;
295
- readonly message: v.StringSchema<undefined>;
296
- }, undefined>, undefined>;
297
296
  }, undefined>, undefined>;
298
297
  }, undefined>, v.ObjectSchema<{
299
298
  readonly v: v.LiteralSchema<1, undefined>;
@@ -468,7 +467,10 @@ type CoreDocgenComponent = CoreDocgenPayload & {
468
467
  docs?: Record<string, CoreMdxDoc>;
469
468
  };
470
469
  //#endregion
471
- //#region src/tools/list-all-documentation.d.ts
470
+ //#region \0text-asset-stub.d.ts
471
+ declare const content: string;
472
+ //#endregion
473
+ //#region code/lib/mcp/.dts-emit/code/lib/mcp/src/tools/list-all-documentation.d.ts
472
474
  declare const LIST_TOOL_NAME = "list-all-documentation";
473
475
  declare function getListAllDocumentationToolMetadata(): {
474
476
  name: string;
@@ -480,7 +482,7 @@ declare function getListAllDocumentationToolMetadata(): {
480
482
  };
481
483
  declare function addListAllDocumentationTool(server: McpServer<any, StorybookContext>, enabled?: Parameters<McpServer<any, StorybookContext>['tool']>[0]['enabled']): Promise<void>;
482
484
  //#endregion
483
- //#region src/tools/get-documentation.d.ts
485
+ //#region code/lib/mcp/.dts-emit/code/lib/mcp/src/tools/get-documentation.d.ts
484
486
  declare const GET_TOOL_NAME = "get-documentation";
485
487
  declare function getDocumentationToolMetadata(options?: {
486
488
  multiSource?: boolean;
@@ -489,17 +491,17 @@ declare function getDocumentationToolMetadata(options?: {
489
491
  title: string;
490
492
  description: string;
491
493
  schema: v.ObjectSchema<{
494
+ id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "The component or docs entry ID (e.g., \"button\")">]>;
495
+ }, undefined> | v.ObjectSchema<{
492
496
  readonly storybookId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "The Storybook source ID (e.g., \"local\", \"tetra\"). Required when multiple Storybooks are composed. See list-all-documentation for available sources.">]>;
493
497
  readonly id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "The component or docs entry ID (e.g., \"button\")">]>;
494
- }, undefined> | v.ObjectSchema<{
495
- id: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "The component or docs entry ID (e.g., \"button\")">]>;
496
498
  }, undefined>;
497
499
  };
498
500
  declare function addGetDocumentationTool(server: McpServer<any, StorybookContext>, enabled?: Parameters<McpServer<any, StorybookContext>['tool']>[0]['enabled'], options?: {
499
501
  multiSource?: boolean;
500
502
  }): Promise<void>;
501
503
  //#endregion
502
- //#region src/tools/get-documentation-for-story.d.ts
504
+ //#region code/lib/mcp/.dts-emit/code/lib/mcp/src/tools/get-documentation-for-story.d.ts
503
505
  declare const GET_STORY_TOOL_NAME = "get-documentation-for-story";
504
506
  declare function getStoryDocumentationToolMetadata(options?: {
505
507
  multiSource?: boolean;
@@ -508,19 +510,19 @@ declare function getStoryDocumentationToolMetadata(options?: {
508
510
  title: string;
509
511
  description: string;
510
512
  schema: v.ObjectSchema<{
513
+ componentId: v.StringSchema<undefined>;
514
+ storyName: v.StringSchema<undefined>;
515
+ }, undefined> | v.ObjectSchema<{
511
516
  readonly storybookId: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "The Storybook source ID (e.g., \"local\", \"tetra\"). Required when multiple Storybooks are composed. See list-all-documentation for available sources.">]>;
512
517
  readonly componentId: v.StringSchema<undefined>;
513
518
  readonly storyName: v.StringSchema<undefined>;
514
- }, undefined> | v.ObjectSchema<{
515
- componentId: v.StringSchema<undefined>;
516
- storyName: v.StringSchema<undefined>;
517
519
  }, undefined>;
518
520
  };
519
521
  declare function addGetStoryDocumentationTool(server: McpServer<any, StorybookContext>, enabled?: Parameters<McpServer<any, StorybookContext>['tool']>[0]['enabled'], options?: {
520
522
  multiSource?: boolean;
521
523
  }): Promise<void>;
522
524
  //#endregion
523
- //#region src/utils/get-manifest.d.ts
525
+ //#region code/lib/mcp/.dts-emit/code/lib/mcp/src/utils/get-manifest.d.ts
524
526
  type SourceWithUrl = Source & {
525
527
  url: string;
526
528
  };
@@ -570,7 +572,7 @@ declare function resolveDoc(doc: DocEntry, request?: Request, manifestProvider?:
570
572
  */
571
573
  declare function getMultiSourceManifests(sources: Source[], request?: Request, manifestProvider?: (request: Request | undefined, path: string, source?: Source) => Promise<string>): Promise<SourceManifests[]>;
572
574
  //#endregion
573
- //#region src/utils/adapt-core-manifest.d.ts
575
+ //#region code/lib/mcp/.dts-emit/code/lib/mcp/src/utils/adapt-core-manifest.d.ts
574
576
  /** Converts the story-docs `stories` record (or an already-resolved array) into `Story[]`. */
575
577
  declare function adaptCoreStories(stories: CoreDocgenComponent['stories']): Story[] | undefined;
576
578
  /** Adapts one MDX service payload into a {@link Doc}. */
@@ -578,7 +580,7 @@ declare function adaptCoreDoc(doc: CoreMdxDoc): Doc;
578
580
  /** Adapts a core-format component (docgen + story-docs + attached MDX) into a {@link ComponentManifest}. */
579
581
  declare function adaptCoreComponent(core: CoreDocgenComponent): ComponentManifest;
580
582
  //#endregion
581
- //#region src/index.d.ts
583
+ //#region code/lib/mcp/.dts-emit/code/lib/mcp/src/index.d.ts
582
584
  type InitializeRequestParams = {
583
585
  protocolVersion: string;
584
586
  capabilities: {
@@ -616,4 +618,4 @@ interface StorybookMcpHandlerOptions extends StorybookContext {
616
618
  type Handler = (req: Request, context?: StorybookContext) => Promise<Response>;
617
619
  declare const createStorybookMcpHandler: (options?: StorybookMcpHandlerOptions) => Promise<Handler>;
618
620
  //#endregion
619
- export { COMPONENT_MANIFEST_PATH, type ComponentManifest, ComponentManifestMap, type CoreDocgenComponent, type CoreDocgenPayload, type CoreMdxDoc, type CoreMdxPayload, type CoreStoryDoc, type CoreStoryDocsPayload, DOCS_MANIFEST_PATH, type Doc, DocsManifestMap, GET_STORY_TOOL_NAME, GET_TOOL_NAME, LIST_TOOL_NAME, RequiresOwnMcpError, type RequiresOwnMcpNotice, type ResolvedEntry, instructions_default as STORYBOOK_MCP_INSTRUCTIONS, type Source, type SourceManifests, type Story, type StorybookContext, StorybookMcpHandlerOptions, adaptCoreComponent, adaptCoreDoc, adaptCoreStories, addGetDocumentationTool, addGetStoryDocumentationTool, addListAllDocumentationTool, createStorybookMcpHandler, getDocumentationToolMetadata, getListAllDocumentationToolMetadata, getMultiSourceManifests, getStoryDocumentationToolMetadata, resolveComponentEntry, resolveComponentStories, resolveDoc };
621
+ export { COMPONENT_MANIFEST_PATH, type ComponentManifest, ComponentManifestMap, type CoreDocgenComponent, type CoreDocgenPayload, type CoreMdxDoc, type CoreMdxPayload, type CoreStoryDoc, type CoreStoryDocsPayload, DOCS_MANIFEST_PATH, type Doc, DocsManifestMap, GET_STORY_TOOL_NAME, GET_TOOL_NAME, LIST_TOOL_NAME, RequiresOwnMcpError, type RequiresOwnMcpNotice, type ResolvedEntry, content as STORYBOOK_MCP_INSTRUCTIONS, type Source, type SourceManifests, type Story, type StorybookContext, StorybookMcpHandlerOptions, adaptCoreComponent, adaptCoreDoc, adaptCoreStories, addGetDocumentationTool, addGetStoryDocumentationTool, addListAllDocumentationTool, createStorybookMcpHandler, getDocumentationToolMetadata, getListAllDocumentationToolMetadata, getMultiSourceManifests, getStoryDocumentationToolMetadata, resolveComponentEntry, resolveComponentStories, resolveDoc };