@sky.ui/mcp 0.0.1 → 0.0.2
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 +191 -182
- package/data/chart-api-sections.json +4184 -4184
- package/data/reactivity-readme-snapshot.json +1 -1
- package/data/theme-authoring-contract.json +598 -598
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +40 -29
- package/dist/catalog.js.map +1 -1
- package/dist/cem.d.ts +1 -1
- package/dist/cem.d.ts.map +1 -1
- package/dist/cem.js +5 -11
- package/dist/cem.js.map +1 -1
- package/dist/docs-read.js +6 -6
- package/dist/docs.js +4 -4
- package/dist/framework-wrappers.d.ts.map +1 -1
- package/dist/framework-wrappers.js +4 -8
- package/dist/framework-wrappers.js.map +1 -1
- package/dist/mcp-runtime-status.js +2 -2
- package/dist/package-resolve.d.ts +10 -0
- package/dist/package-resolve.d.ts.map +1 -0
- package/dist/package-resolve.js +87 -0
- package/dist/package-resolve.js.map +1 -0
- package/dist/reactivity-info.d.ts.map +1 -1
- package/dist/reactivity-info.js +4 -11
- package/dist/reactivity-info.js.map +1 -1
- package/dist/server.js +4 -4
- package/dist/source-read.d.ts.map +1 -1
- package/dist/source-read.js +6 -10
- package/dist/source-read.js.map +1 -1
- package/dist/utils-suggestion-grounding.d.ts.map +1 -1
- package/dist/utils-suggestion-grounding.js +4 -11
- package/dist/utils-suggestion-grounding.js.map +1 -1
- package/docs/agent-recipe-example-site.md +91 -91
- package/docs/ai-design-mcp-blueprint.md +75 -75
- package/docs/cross-model-mcp-playbook.md +127 -127
- package/docs/example-site-and-mcp-training.md +82 -82
- package/docs/mcp-capability-status.md +51 -51
- package/docs/mcp-tooling-roadmap.md +36 -36
- package/docs/sky-chart-option-api.md +47 -47
- package/docs/starter-prompt.md +17 -17
- package/docs/theme-config-guide.md +178 -178
- package/docs/utils-usage-guide.md +112 -110
- package/docs/vue-wrapper-v-model.md +36 -36
- package/package.json +72 -63
package/README.md
CHANGED
|
@@ -1,182 +1,191 @@
|
|
|
1
|
-
# @sky.ui/mcp
|
|
2
|
-
|
|
3
|
-
Model Context Protocol (MCP) server for [Sky UI](https://library.sky-ui.com). Gives AI coding assistants accurate component APIs, usage snippets, theme tokens, and utility classes—instead of guessing tag names or props.
|
|
4
|
-
|
|
5
|
-
Transport: **stdio** (Cursor, VS Code, Claude Desktop, and other MCP clients).
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## Install
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
npm install @sky.ui/mcp @sky.ui/core
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
|
18
|
-
|
|
19
|
-
| `@sky.ui/
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
|
74
|
-
|
|
75
|
-
| `
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
---
|
|
154
|
-
|
|
155
|
-
##
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
|
171
|
-
|
|
172
|
-
| `@sky.ui/
|
|
173
|
-
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
1
|
+
# @sky.ui/mcp
|
|
2
|
+
|
|
3
|
+
Model Context Protocol (MCP) server for [Sky UI](https://library.sky-ui.com). Gives AI coding assistants accurate component APIs, usage snippets, theme tokens, and utility classes—instead of guessing tag names or props.
|
|
4
|
+
|
|
5
|
+
Transport: **stdio** (Cursor, VS Code, Claude Desktop, and other MCP clients).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install "@sky.ui/mcp" "@sky.ui/core"
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
> Quote scoped names (`"@sky.ui/…"`) — required in PowerShell. See [powershell-scoped-packages.md](../../docs/powershell-scoped-packages.md).
|
|
16
|
+
|
|
17
|
+
| Package | Required | Role |
|
|
18
|
+
|---------|----------|------|
|
|
19
|
+
| `@sky.ui/core` | yes | Component metadata (CEM / AST) |
|
|
20
|
+
| `@sky.ui/utils` | no | Live utility-class catalog |
|
|
21
|
+
| `@sky.ui/reactivity` | no | Reactivity layer docs (optional peer via snapshot) |
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Quick start
|
|
26
|
+
|
|
27
|
+
Add to **`.cursor/mcp.json`** or **`.vscode/mcp.json`**:
|
|
28
|
+
|
|
29
|
+
```json
|
|
30
|
+
{
|
|
31
|
+
"mcpServers": {
|
|
32
|
+
"sky-ui": {
|
|
33
|
+
"command": "npx",
|
|
34
|
+
"args": ["-y", "@sky.ui/mcp@latest"]
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Reload the MCP panel after saving.
|
|
41
|
+
|
|
42
|
+
**Global / `npx` (recommended pattern):** MCP resolves `@sky.ui/core` from your **workspace** `node_modules` (via `process.cwd()` / `INIT_CWD`), not from the global install — same as ESLint, Prettier, and PostCSS plugins. Still install `@sky.ui/core` in the project:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
npm install "@sky.ui/mcp" "@sky.ui/core"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Health check:**
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npx @sky.ui/mcp -- --health
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Installed locally** (monorepo or app dependency):
|
|
55
|
+
|
|
56
|
+
```json
|
|
57
|
+
{
|
|
58
|
+
"mcpServers": {
|
|
59
|
+
"sky-ui": {
|
|
60
|
+
"command": "node",
|
|
61
|
+
"args": ["./node_modules/@sky.ui/mcp/dist/mcp-stdio-entry.js"]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The process speaks over stdin/stdout. If it exits immediately in a plain terminal, that is normal—no MCP client is attached.
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Tools
|
|
72
|
+
|
|
73
|
+
| Tool | Description |
|
|
74
|
+
|------|-------------|
|
|
75
|
+
| `get_project_guide` | Installation and bundler setup (Lit, React, Vue) |
|
|
76
|
+
| `sky_components` | List, search, or search-by-API over the component catalog |
|
|
77
|
+
| `get_sky_component_docs` | Props, events, slots, methods, types, and live doc-page snippets |
|
|
78
|
+
| `get_component_usage` | Copy-paste starter snippets for Lit, React, or Vue |
|
|
79
|
+
| `get_reactivity_layer` | `@sky.ui/reactivity` API reference |
|
|
80
|
+
| `get_chart_usage` | `sky-chart` option reference (Pro) |
|
|
81
|
+
| `get_theme` | Theme authoring: guide, fields, variables, compose |
|
|
82
|
+
| `get_docs` | Allowlisted guides (utils, charts, agent recipes) |
|
|
83
|
+
| `utility_classes` | Search and validate `@sky.ui/utils` class names |
|
|
84
|
+
|
|
85
|
+
Learn more: [modelcontextprotocol.io](https://modelcontextprotocol.io).
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## How documentation is sourced
|
|
90
|
+
|
|
91
|
+
Sky UI MCP combines two layers:
|
|
92
|
+
|
|
93
|
+
1. **Package metadata (authoritative API)** — `get_sky_component_docs` and `sky_components` read **`@sky.ui/core`** (installed in the project). Props, events, slots, and methods come from the Custom Elements Manifest and TypeScript sources.
|
|
94
|
+
|
|
95
|
+
2. **Published docs site (examples & routing)** — By default, MCP enriches component docs from **[library.sky-ui.com](https://library.sky-ui.com)**:
|
|
96
|
+
- `GET /api/mcp/manifest`
|
|
97
|
+
- `GET /api/mcp/component/{id}`
|
|
98
|
+
|
|
99
|
+
Enrichment adds **`exampleSiteSections`** (HTML / Sky / Vue / React snippets from doc pages) and **`exampleSitePageAi`** (routing hints). Responses include `_skyUiMcp.truthLayer` so assistants treat package API as canonical and site data as supplementary.
|
|
100
|
+
|
|
101
|
+
No configuration is required for production; the default origin is `https://library.sky-ui.com`.
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Environment variables
|
|
106
|
+
|
|
107
|
+
| Variable | Default | Description |
|
|
108
|
+
|----------|---------|-------------|
|
|
109
|
+
| `SKY_UI_EXAMPLE_SITE_BASE_URL` | `https://library.sky-ui.com` | Docs site origin (no path). Override for local dev, e.g. `http://localhost:3000`. |
|
|
110
|
+
| `SKY_UI_EXAMPLE_SITE_DISABLE` | — | Set `1` to skip live site fetches (offline / air-gapped). |
|
|
111
|
+
| `SKY_UI_EXAMPLE_SITE_EXTRA_HOSTS` | — | Comma-separated hostnames allowed after redirects. |
|
|
112
|
+
| `SKY_UI_MAIN_PACKAGE_ROOT` | auto | Path to `@sky.ui/core` when not resolved from `node_modules`. |
|
|
113
|
+
| `SKY_UI_MCP_PROJECT_ROOT` | auto | Workspace root when MCP runs globally (`npx`) but deps live in a project (same idea as ESLint cwd). |
|
|
114
|
+
| `SKY_UI_PERSONAL_TOKEN` | — | Pro package access (see below). |
|
|
115
|
+
| `SKY_UI_AUTH_TOKEN` | — | Alias for personal token. |
|
|
116
|
+
|
|
117
|
+
**Local docs site** (while running the Sky UI documentation site locally):
|
|
118
|
+
|
|
119
|
+
```json
|
|
120
|
+
"env": {
|
|
121
|
+
"SKY_UI_EXAMPLE_SITE_BASE_URL": "http://localhost:3000"
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Pro packages (`@sky.ui.pro/*`)
|
|
128
|
+
|
|
129
|
+
Pro artifacts require a license token:
|
|
130
|
+
|
|
131
|
+
1. Run `npx sky.ui.pro login` once, **or**
|
|
132
|
+
2. Set `SKY_UI_PERSONAL_TOKEN` / `SKY_UI_AUTH_TOKEN` in the MCP server `env` block.
|
|
133
|
+
|
|
134
|
+
Cursor does not inherit shell profile variables—set tokens explicitly in MCP config when needed.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Optional: HTTP POST server
|
|
139
|
+
|
|
140
|
+
For clients that cannot use stdio:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
npx @sky.ui/mcp serve:post
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
| Setting | Default |
|
|
147
|
+
|---------|---------|
|
|
148
|
+
| Port | `3001` (`SKY_UI_MCP_POST_PORT`) |
|
|
149
|
+
| Endpoints | `GET /health`, `POST /tool`, Streamable HTTP on `/` |
|
|
150
|
+
|
|
151
|
+
See `docs/cross-model-mcp-playbook.md` for auth, CORS, and rate-limit options.
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
## Setup checklist
|
|
156
|
+
|
|
157
|
+
1. Install `@sky.ui/mcp` and `@sky.ui/core` in the workspace (or use `npx`).
|
|
158
|
+
2. Ensure `@sky.ui/core` is built (`custom-elements.json` present) or install a published version from npm.
|
|
159
|
+
3. Add the MCP server to your editor config and reload.
|
|
160
|
+
4. Run `npx @sky.ui/mcp -- --health` and confirm `docsReady` and `exampleSite.baseUrl`.
|
|
161
|
+
|
|
162
|
+
---
|
|
163
|
+
|
|
164
|
+
## Troubleshooting
|
|
165
|
+
|
|
166
|
+
| Symptom | Action |
|
|
167
|
+
|---------|--------|
|
|
168
|
+
| `COMPONENT_DOCS_FAILED` | Install `@sky.ui/core`; set `SKY_UI_MAIN_PACKAGE_ROOT` if needed |
|
|
169
|
+
| `customElementsManifest: null` | Build `@sky.ui/core` or install a published build |
|
|
170
|
+
| Missing `exampleSiteSections` | Confirm [library.sky-ui.com/api/mcp/manifest](https://library.sky-ui.com/api/mcp/manifest) is reachable, or set `SKY_UI_EXAMPLE_SITE_BASE_URL` |
|
|
171
|
+
| Stale tools in Cursor | Reload MCP after upgrading `@sky.ui/mcp` |
|
|
172
|
+
| `UTILS_SUGGESTION_FAILED` | Install `@sky.ui/utils` or upgrade MCP (includes snapshot fallback) |
|
|
173
|
+
| Process exits in terminal | Expected without an MCP client on stdin |
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## Related packages
|
|
178
|
+
|
|
179
|
+
| Package | Link |
|
|
180
|
+
|---------|------|
|
|
181
|
+
| `@sky.ui/core` | [npm](https://www.npmjs.com/package/@sky.ui/core) |
|
|
182
|
+
| `@sky.ui/react` | [npm](https://www.npmjs.com/package/@sky.ui/react) |
|
|
183
|
+
| `@sky.ui/vue` | [npm](https://www.npmjs.com/package/@sky.ui/vue) |
|
|
184
|
+
| `@sky.ui/utils` | [npm](https://www.npmjs.com/package/@sky.ui/utils) |
|
|
185
|
+
| `@sky.ui/reactivity` | [npm](https://www.npmjs.com/package/@sky.ui/reactivity) |
|
|
186
|
+
|
|
187
|
+
---
|
|
188
|
+
|
|
189
|
+
## License
|
|
190
|
+
|
|
191
|
+
[Sky UI Free EULA](https://unpkg.com/@sky.ui/mcp/LICENSE.md) — proprietary; not open source.
|