@uni-design-system/uni-mcp 11.4.1 → 11.6.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/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @uni-design-system/uni-mcp
2
2
 
3
+ ## 11.6.0
4
+
5
+ ## 11.5.0
6
+
7
+ ### Minor Changes
8
+
9
+ - [`42aee9e`](https://github.com/uni-design-system/uni/commit/42aee9e5e17f8c6a3cbfdde8cfbe412f33b1b179) Thanks [@gaenglish](https://github.com/gaenglish)! - The MCP now covers the CDK — the non-visual half of `uni-angular`.
10
+
11
+ Until now the index held components only, so `copyToClipboard`, `PermissionService`, the decimal helpers, the datasources and every other CDK export were invisible to an assistant: nothing in them has a selector. A new `cdk-adapter` walks the CDK barrel (`cdk/index.ts`) and indexes every exported function, injectable service, class, interface, type and const with its signature and JSDoc — read from the TypeScript AST, so arrow-function consts, generics and multi-line parameter lists come through as written. Each CDK module's docs page ships alongside as markdown.
12
+ - **`list-utilities`** — the inventory, grouped by module; filter by `module` or `kind`.
13
+ - **`get-utility`** — one export by id (`copy-to-clipboard`) or name (`copyToClipboard`): import line, signature, members, the other symbols in its module, and the module's docs page with usage examples.
14
+ - **`search`** gains a `utility` kind, and **`uni://utilities/{id}`** serves the same card as a resource.
15
+
16
+ The server's instructions point assistants at these before they hand-roll a browser API call.
17
+
3
18
  ## 11.4.1
4
19
 
5
20
  ## 11.4.0
package/README.md CHANGED
@@ -28,9 +28,9 @@ whole team gets the server. Equivalent `.mcp.json`:
28
28
  "mcpServers": {
29
29
  "uni": {
30
30
  "command": "npx",
31
- "args": ["-y", "@uni-design-system/uni-mcp@latest"]
32
- }
33
- }
31
+ "args": ["-y", "@uni-design-system/uni-mcp@latest"],
32
+ },
33
+ },
34
34
  }
35
35
  ```
36
36
 
@@ -64,11 +64,11 @@ so for answers that exactly match the APIs you have installed, replace
64
64
 
65
65
  In Claude Code, `/mcp` should list **uni** as connected. Then ask things like:
66
66
 
67
- - *"What Uni components are available for collecting user input?"*
68
- - *"Show me the props and a working example for `uni-button`."*
69
- - *"Which Uni theme tokens should style a card's background and border?"*
70
- - *"When should I use a drawer vs a dialog? Any accessibility requirements?"*
71
- - *"Generate a Uni theme from our brand color `#0052FF` and wire it up."*
67
+ - _"What Uni components are available for collecting user input?"_
68
+ - _"Show me the props and a working example for `uni-button`."_
69
+ - _"Which Uni theme tokens should style a card's background and border?"_
70
+ - _"When should I use a drawer vs a dialog? Any accessibility requirements?"_
71
+ - _"Generate a Uni theme from our brand color `#0052FF` and wire it up."_
72
72
 
73
73
  That last one uses the `generate-uni-theme` tool: it returns a complete
74
74
  WCAG-AA light + dark `uni-theme.ts` file (plus the `UNI_THEMES` provider
@@ -78,23 +78,25 @@ tokens, never by hardcoding hex values in components.
78
78
 
79
79
  ## Tools
80
80
 
81
- | Tool | Returns |
82
- |---|---|
83
- | `list-components` | inventory (id, name, summary, category, frameworks) |
84
- | `get-component` | full API card for one component (framework-scoped) |
85
- | `get-component-examples` | working snippets + Storybook links |
86
- | `list-tokens` | tokens filtered by type / kind / theme |
87
- | `get-token` | resolved value, style/behavioral kind, per-theme values |
88
- | `get-guidelines` | when-to-use, do/don't, accessibility |
89
- | `list-themes` | theme templates |
90
- | `get-theme-template` | **style overrides** (→ Emotion CSS) and **component options** (→ props), kept distinct |
91
- | `generate-uni-theme` | complete WCAG-AA light+dark `uni-theme.ts` from brand hex color(s), with vibe/scheme/shape options, provider registration snippet, and contrast report |
92
- | `generate-runtime-theme` | the same generated theme as validated JSON for `registerTheme()` — applies immediately, no file, no rebuild |
93
- | `get-runtime-theme` | a theme that ships with Uni (`LightTheme`, `DarkTheme`) as a registerable `UniTheme` |
94
- | `export-dtcg-tokens` | a built-in theme's color/radius/spacing scales as W3C DTCG JSON (Style Dictionary compatible) |
95
- | `create-icon-tokens` | convert raw SVG into `currentColor`-masked theme icon tokens |
96
- | `get-changelog` | release notes per package/version — how a coding agent answers "what changed since the version I have installed" |
97
- | `search` | keyword search across components, tokens, themes, guidelines |
81
+ | Tool | Returns |
82
+ | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------ |
83
+ | `list-components` | inventory (id, name, summary, category, frameworks) |
84
+ | `get-component` | full API card for one component (framework-scoped) |
85
+ | `get-component-examples` | working snippets + Storybook links |
86
+ | `list-utilities` | the CDK inventory — functions, services, classes and types grouped by module (clipboard, permission, timer, datasource, number, …) |
87
+ | `get-utility` | one CDK export: import line, signature, members, siblings in its module, and the module's docs page with usage |
88
+ | `list-tokens` | tokens filtered by type / kind / theme |
89
+ | `get-token` | resolved value, style/behavioral kind, per-theme values |
90
+ | `get-guidelines` | when-to-use, do/don't, accessibility |
91
+ | `list-themes` | theme templates |
92
+ | `get-theme-template` | **style overrides** (→ Emotion CSS) and **component options** (→ props), kept distinct |
93
+ | `generate-uni-theme` | complete WCAG-AA light+dark `uni-theme.ts` from brand hex color(s), with vibe/scheme/shape options, provider registration snippet, and contrast report |
94
+ | `generate-runtime-theme` | the same generated theme as validated JSON for `registerTheme()` — applies immediately, no file, no rebuild |
95
+ | `get-runtime-theme` | a theme that ships with Uni (`LightTheme`, `DarkTheme`) as a registerable `UniTheme` |
96
+ | `export-dtcg-tokens` | a built-in theme's color/radius/spacing scales as W3C DTCG JSON (Style Dictionary compatible) |
97
+ | `create-icon-tokens` | convert raw SVG into `currentColor`-masked theme icon tokens |
98
+ | `get-changelog` | release notes per package/version — how a coding agent answers "what changed since the version I have installed" |
99
+ | `search` | keyword search across components, CDK utilities, tokens, themes, guidelines |
98
100
 
99
101
  ### Which theme tool?
100
102
 
@@ -149,20 +151,20 @@ Client config (when deployed):
149
151
  "mcpServers": {
150
152
  "uni": {
151
153
  "url": "https://<host>/mcp",
152
- "headers": { "Authorization": "Bearer <UNI_MCP_TOKEN>" }
153
- }
154
- }
154
+ "headers": { "Authorization": "Bearer <UNI_MCP_TOKEN>" },
155
+ },
156
+ },
155
157
  }
156
158
  ```
157
159
 
158
160
  Environment:
159
161
 
160
- | Var | Purpose | Default |
161
- |---|---|---|
162
- | `PORT` | bind port (Render sets this) | `8080` |
163
- | `HOST` | bind address | `0.0.0.0` |
164
- | `UNI_MCP_TOKEN` | if set, require `Authorization: Bearer <token>` | _(none)_ |
165
- | `UNI_ALLOWED_HOSTS` | comma list enabling DNS-rebinding protection | _(none)_ |
162
+ | Var | Purpose | Default |
163
+ | ------------------- | ----------------------------------------------- | --------- |
164
+ | `PORT` | bind port (Render sets this) | `8080` |
165
+ | `HOST` | bind address | `0.0.0.0` |
166
+ | `UNI_MCP_TOKEN` | if set, require `Authorization: Bearer <token>` | _(none)_ |
167
+ | `UNI_ALLOWED_HOSTS` | comma list enabling DNS-rebinding protection | _(none)_ |
166
168
 
167
169
  Deploy with the repo-root [`render.yaml`](../../render.yaml) blueprint.
168
170
 
@@ -171,12 +173,13 @@ Deploy with the repo-root [`render.yaml`](../../render.yaml) blueprint.
171
173
  The server answers from a **built index** (`src/data/uni-index.json`) that is
172
174
  normalized from the monorepo's own sources at build time, then read at runtime:
173
175
 
174
- | Source | Adapter | Feeds |
175
- |---|---|---|
176
- | `packages/angular` component sources (signals API) | `angular-adapter` | per-framework component API |
177
- | `@uni-design-system/uni-core` themes/tokens | `token-adapter` | tokens (style + behavioral) & theme templates |
178
- | component `.mdx` docs pages (`## Overview` / `## Do` / `## Don't` / `## Accessibility`) | `mdx-adapter` | authored guidelines |
179
- | `packages/angular/storybook-static/index.json` + story sources | `storybook-adapter` | copy-pasteable examples |
176
+ | Source | Adapter | Feeds |
177
+ | --------------------------------------------------------------------------------------- | ------------------- | ----------------------------------------------------- |
178
+ | `packages/angular` component sources (signals API) | `angular-adapter` | per-framework component API |
179
+ | `@uni-design-system/uni-core` themes/tokens | `token-adapter` | tokens (style + behavioral) & theme templates |
180
+ | component `.mdx` docs pages (`## Overview` / `## Do` / `## Don't` / `## Accessibility`) | `mdx-adapter` | authored guidelines |
181
+ | `packages/angular` CDK barrel (`cdk/index.ts`) + each CDK module's `.mdx` page | `cdk-adapter` | utility signatures (from the TypeScript AST) and docs |
182
+ | `packages/angular/storybook-static/index.json` + story sources | `storybook-adapter` | copy-pasteable examples |
180
183
 
181
184
  The model is **framework-aware by construction**: each component carries a
182
185
  `bindings` map (`angular` today; `react` fills in as `uni-react` reaches parity)