@wizeworks/silicaui-mcp 0.3.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 WizeWorks
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,88 @@
1
+ # @wizeworks/silicaui-mcp
2
+
3
+ A local [MCP](https://modelcontextprotocol.io) server for **Silica UI**. It gives
4
+ your AI coding assistant real, extracted-from-source answers about the design
5
+ system — exact CSS class names, real component props, working usage examples,
6
+ composed blocks, and the behavior contract — instead of guessing.
7
+
8
+ [![Website](https://img.shields.io/badge/website-silicaui.com-8b5cf6?style=flat-square)](https://silicaui.com)
9
+ [![npm version](https://img.shields.io/npm/v/@wizeworks/silicaui-mcp.svg?style=flat-square)](https://www.npmjs.com/package/@wizeworks/silicaui-mcp)
10
+ [![npm downloads](https://img.shields.io/npm/dm/@wizeworks/silicaui-mcp.svg?style=flat-square)](https://www.npmjs.com/package/@wizeworks/silicaui-mcp)
11
+ [![license](https://img.shields.io/npm/l/@wizeworks/silicaui-mcp.svg?style=flat-square)](https://github.com/silicaui/silicaui/blob/main/LICENSE)
12
+ [![CI](https://img.shields.io/github/actions/workflow/status/silicaui/silicaui/ci.yml?branch=main&style=flat-square&label=CI)](https://github.com/silicaui/silicaui/actions/workflows/ci.yml)
13
+
14
+ ## Why
15
+
16
+ Every class name, prop, and usage example this server returns is **extracted
17
+ from Silica UI's actual source** at release time — never hand-written prose that
18
+ can drift out of date. `list_classes("button")` calls the real class generator;
19
+ `get_component("Select")` reads the real TypeScript props and a real, working
20
+ playground demo. If your assistant is about to write `<Button intent="primary">`
21
+ or `btn-purple`, this catches it before it ships.
22
+
23
+ ## Install
24
+
25
+ **Claude Code:**
26
+
27
+ ```bash
28
+ claude mcp add @wizeworks/silicaui -- npx -y @wizeworks/silicaui-mcp
29
+ ```
30
+
31
+ **Claude Desktop / other `.mcp.json`-style clients** — add to your MCP config:
32
+
33
+ ```json
34
+ {
35
+ "mcpServers": {
36
+ "@wizeworks/silicaui": {
37
+ "command": "npx",
38
+ "args": ["-y", "@wizeworks/silicaui-mcp"]
39
+ }
40
+ }
41
+ }
42
+ ```
43
+
44
+ **Cursor** — Settings → MCP → Add new MCP server, same command/args as above, or
45
+ add to `.cursor/mcp.json`:
46
+
47
+ ```json
48
+ {
49
+ "mcpServers": {
50
+ "@wizeworks/silicaui": {
51
+ "command": "npx",
52
+ "args": ["-y", "@wizeworks/silicaui-mcp"]
53
+ }
54
+ }
55
+ }
56
+ ```
57
+
58
+ No API key, account, or network access required after install — everything the
59
+ server answers with is bundled in the package.
60
+
61
+ ## Tools
62
+
63
+ | Tool | Purpose |
64
+ | --- | --- |
65
+ | `list_packages` | The Silica UI package family, purpose, install command, version. |
66
+ | `list_components({ package? })` | Component names + categories, optionally filtered to one package. |
67
+ | `get_component({ name })` | A component's real props (from source) + a real usage example (from the playground). |
68
+ | `list_classes({ component? })` | Exact, literal CSS class names — extracted from the actual class generators. |
69
+ | `get_tokens()` | Semantic color list, light/dark values, typography tokens. |
70
+ | `list_blocks({ category?, tag? })` | Composed page blocks (hero, FAQ, feature grid, …), summary only. |
71
+ | `get_block({ key })` | One block's full node tree. |
72
+ | `list_behaviors()` / `get_behavior({ type })` | The `data-sui-*` interactive-behavior contract. |
73
+ | `search_docs({ query })` | Free-text search across components, blocks, and behaviors. |
74
+
75
+ ## A note on versioning
76
+
77
+ This server ships a **static catalog**, regenerated from the Silica UI monorepo
78
+ and published in step with the rest of the family. It doesn't read your
79
+ project's actual installed `@wizeworks/silicaui` version — for the fast-moving, mostly
80
+ additive pre-1.0 stage that's a fine trade for zero setup and zero dependency on
81
+ your project's module resolution. If you're pinned to an older Silica UI
82
+ version and hit a mismatch, pin `@wizeworks/silicaui-mcp` to a matching release too.
83
+
84
+ ## Links
85
+
86
+ - [silicaui.com](https://silicaui.com) — website & docs
87
+ - [GitHub repo](https://github.com/silicaui/silicaui)
88
+ - [Issues](https://github.com/silicaui/silicaui/issues)
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env node
2
+ import { main } from "../dist/server.js";
3
+
4
+ main().catch((err) => {
5
+ console.error("[@wizeworks/silicaui-mcp] fatal:", err);
6
+ process.exit(1);
7
+ });
@@ -0,0 +1,46 @@
1
+ [
2
+ {
3
+ "type": "carousel",
4
+ "description": "`carousel` — a `track` of `slide`s with optional `prev`/`next` buttons and `dot` pagination. `params.autoplay` (+ `params.interval`, default 5000ms) advances automatically, pausing on hover; suppressed entirely in preview and when the user prefers reduced motion (§7, §9.8)."
5
+ },
6
+ {
7
+ "type": "disclosure",
8
+ "description": "`disclosure` — trigger/panel pairs, correlated by document order (architecture §7: \"parts correlate to their root by structural nesting, never by id\"). With `params.single`, opening one pair closes every other pair under the same root (single-open accordion); otherwise each pair toggles independently."
9
+ },
10
+ {
11
+ "type": "tabs",
12
+ "description": "`tabs` — a `tab`/`panel` list, exclusive selection, with roving arrow-key navigation (Left/Right, Up/Down, Home/End) per the standard tabs pattern. Pairing is positional (Nth `tab` ↔ Nth `panel`), same nesting-scoped lookup as `disclosure`."
13
+ },
14
+ {
15
+ "type": "menu",
16
+ "description": "`menu` — a click-triggered popup (dropdown/mega-menu): a `trigger` opens a `panel` of `item` parts. Escape and outside-click dismiss; Up/Down/Home/End rove focus across items while open. This is the vanilla counterpart to @wizeworks/silicaui-react's Base-UI-backed `DropdownMenu` — same authored markers, same `.dropdown*` classes, no React required."
17
+ },
18
+ {
19
+ "type": "marquee",
20
+ "description": "`marquee` — an auto-scrolling ticker. The motion itself is a CSS animation authored on the component (§7 prefers CSS-only where it suffices); this handler only wires `params.pauseOnHover` (default `true`) and keeps the animation paused for editor preview, matching the autoplay-suppression rule (§9.8) without a JS animation loop of its own."
21
+ },
22
+ {
23
+ "type": "scrollspy",
24
+ "description": "Shared implementation behind `scrollspy` and `toc`: `spy` parts are links (`href=\"#id\"`) tracked against the section they point to; the in-view one gets `aria-current=\"true\"` for a nav/TOC to style. `toc` differs only in its default intersection threshold (a smaller sliver of a heading counts as \"current\" for a table of contents than a full scrollspy section does)."
25
+ },
26
+ {
27
+ "type": "counter",
28
+ "description": "`counter` — animates the root's own text content from 0 to a target number once it scrolls into view. `params.target` overrides the parsed initial text (so authored content can show the final value statically); `duration` defaults to 1500ms. Suppressed (jumps straight to the final value) in preview, under reduced motion, or without `IntersectionObserver`."
29
+ },
30
+ {
31
+ "type": "dismiss",
32
+ "description": "`dismiss` — a self-dismissing widget (alert, toast): clicking its `trigger` hides or removes the root. `params.remove` (default `true`) removes the element outright; `false` just sets `hidden` (e.g. to keep layout stable)."
33
+ },
34
+ {
35
+ "type": "toc",
36
+ "description": "Shared implementation behind `scrollspy` and `toc`: `spy` parts are links (`href=\"#id\"`) tracked against the section they point to; the in-view one gets `aria-current=\"true\"` for a nav/TOC to style. `toc` differs only in its default intersection threshold (a smaller sliver of a heading counts as \"current\" for a table of contents than a full scrollspy section does)."
37
+ },
38
+ {
39
+ "type": "sidebar",
40
+ "description": "`sidebar` — a persistent nav panel that collapses IN PLACE to an icon rail (unlike `disclosure`, the root is never hidden — only its `data-collapsed` state changes, and CSS alone handles the width/label transition). Any number of `trigger` parts nested inside the root toggle it; `params.defaultCollapsed` seeds the initial state."
41
+ },
42
+ {
43
+ "type": "selection-list",
44
+ "description": "`selection-list` — a listbox of `item` parts (single- or multi-select, via `params.multiple`). Click (or Enter/Space on the focused item) toggles selection; the vanilla counterpart to @wizeworks/silicaui-react's `SelectionList`. Roving tabindex + ↑/↓/Home/End mirror the React component's keyboard behavior."
45
+ }
46
+ ]