@gostudent/shared-ui-library-mcp 1.23.2-DT-16968
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/README.md +71 -0
- package/library-manifest.json +1569 -0
- package/package.json +21 -0
- package/server.mjs +161 -0
package/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# @gostudent/shared-ui-library-mcp
|
|
2
|
+
|
|
3
|
+
MCP server for `@gostudent/shared-ui-library`. Gives Claude accurate, always-up-to-date knowledge of the component library — props, variants, usage examples, icons, and design tokens — without needing to read source files.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## What it exposes
|
|
8
|
+
|
|
9
|
+
| Tool | Input | Returns |
|
|
10
|
+
|---|---|---|
|
|
11
|
+
| `list_components` | — | All components with descriptions |
|
|
12
|
+
| `get_component` | `name: string` | Props, variants, and usage examples for one component |
|
|
13
|
+
| `list_icons` | — | All icon names and supported sizes |
|
|
14
|
+
| `get_tokens` | `category?: string`, `brand?: "base" \| "gs" \| "sk"` | Design tokens, optionally filtered by category |
|
|
15
|
+
| `search_components` | `query: string` | Components matching a name, description, or prop keyword |
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## How to connect locally
|
|
20
|
+
|
|
21
|
+
Add to your project's `.mcp.json`:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"mcpServers": {
|
|
26
|
+
"library": {
|
|
27
|
+
"command": "node",
|
|
28
|
+
"args": ["/absolute/path/to/shared-ui-library/src/mcp/server.mjs"]
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Or, once published, use the npm package directly:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"mcpServers": {
|
|
39
|
+
"library": {
|
|
40
|
+
"command": "npx",
|
|
41
|
+
"args": ["@gostudent/shared-ui-library-mcp@latest"]
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Restart Claude Code after editing `.mcp.json`. Run `/mcp` to confirm the `library` server is connected.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## How the manifest is generated
|
|
52
|
+
|
|
53
|
+
The server reads `library-manifest.json` at startup. This file is a build artifact — it is regenerated on every `npm run build` by `scripts/generate-library-manifest.mjs`.
|
|
54
|
+
|
|
55
|
+
The generator:
|
|
56
|
+
- Walks `src/components/` and parses each component's Storybook stories file — extracting the description, `argTypes` (props + allowed values), and the first 3 story `args` as JSX usage examples
|
|
57
|
+
- Walks `src/icons/` to collect icon names and size values from `types.ts`
|
|
58
|
+
- Reads `src/tokens/output/{base,gs,sk}/tokens.js` and groups tokens by category prefix
|
|
59
|
+
|
|
60
|
+
Because the manifest is regenerated from source on every build, it is always in sync with the actual library — no manual maintenance needed.
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Publishing
|
|
65
|
+
|
|
66
|
+
The MCP package is published separately from the library via two manual CI jobs:
|
|
67
|
+
|
|
68
|
+
- **`dt_prerelease_mcp`** — feature branches (`DT-*`); publishes with `--tag next`
|
|
69
|
+
- **`release_mcp`** — master only; publishes as `latest`
|
|
70
|
+
|
|
71
|
+
The package version is synced to the library version at publish time by reading `../../package.json`.
|