@tetrascience-npm/tetrascience-react-ui 0.6.0-beta.84.1 → 0.6.0-beta.85.1

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.
Files changed (2) hide show
  1. package/README.md +55 -0
  2. package/package.json +18 -12
package/README.md CHANGED
@@ -392,6 +392,61 @@ Visit <http://localhost:6006>.
392
392
  - [Theming Guide](./THEMING.md) - Customise the design system
393
393
  - [Contributing](./CONTRIBUTING.md#development-setup) - Clone the repo and run `yarn storybook`
394
394
 
395
+ ## MCP server (for AI coding agents)
396
+
397
+ This library exposes an [MCP](https://modelcontextprotocol.io/) server so AI
398
+ coding agents (Claude Code, Cursor, Claude Desktop) can query authoritative
399
+ component lists, prop/variant options, and usage examples instead of guessing —
400
+ reducing hallucinated component APIs when scaffolding a data app.
401
+
402
+ There are two endpoints. Pick whichever fits; you can add both.
403
+
404
+ | Endpoint | URL | Tools |
405
+ | --- | --- | --- |
406
+ | **Deployed** (no local checkout needed) | `https://ts-lib-ui-kit-storybook.vercel.app/api/mcp` | docs: `list_components`, `get_component`, `search_components` |
407
+ | **Local** (needs `yarn storybook` running) | `http://localhost:6006/mcp` | full set: docs **+** write/preview/test stories |
408
+
409
+ ### Add the connection
410
+
411
+ **Claude Code** — register the deployed server (HTTP transport):
412
+
413
+ ```bash
414
+ claude mcp add --transport http ts-ui-kit https://ts-lib-ui-kit-storybook.vercel.app/api/mcp
415
+ ```
416
+
417
+ Use `--scope project` to share it with your team via a checked-in `.mcp.json`, or
418
+ `--scope user` to make it available across all your projects. For the local
419
+ server, run `yarn storybook` first, then:
420
+
421
+ ```bash
422
+ claude mcp add --transport http ts-ui-kit-local http://localhost:6006/mcp
423
+ ```
424
+
425
+ **Cursor / Claude Desktop / other clients** — add an HTTP MCP server to the
426
+ client's MCP config (e.g. Cursor's `.cursor/mcp.json`, or Claude Desktop's
427
+ `claude_desktop_config.json`):
428
+
429
+ ```json
430
+ {
431
+ "mcpServers": {
432
+ "ts-ui-kit": {
433
+ "type": "http",
434
+ "url": "https://ts-lib-ui-kit-storybook.vercel.app/api/mcp"
435
+ }
436
+ }
437
+ }
438
+ ```
439
+
440
+ **Any client (generic helper):**
441
+
442
+ ```bash
443
+ npx mcp-add --type http --url "https://ts-lib-ui-kit-storybook.vercel.app/api/mcp"
444
+ ```
445
+
446
+ Then ask your agent something like *"using the ts-ui-kit MCP, list the available
447
+ components"* or *"build a form using ts-ui-kit primitives"* to confirm it's wired
448
+ up.
449
+
395
450
  ## Tech Stack
396
451
 
397
452
  - React 19
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tetrascience-npm/tetrascience-react-ui",
3
- "version": "0.6.0-beta.84.1",
3
+ "version": "0.6.0-beta.85.1",
4
4
  "description": "TetraScience React UI",
5
5
  "type": "module",
6
6
  "author": "TetraScience",
@@ -87,7 +87,8 @@
87
87
  "postbuild": "yarn dlx @tailwindcss/cli@4.2.2 -i ./src/index.tailwind.css -o ./dist/index.tailwind.css --minify",
88
88
  "dev": "yarn storybook",
89
89
  "storybook": "storybook dev -p 6006",
90
- "build-storybook": "storybook build",
90
+ "build-storybook": "storybook build && yarn run build-storybook:metadata",
91
+ "build-storybook:metadata": "tsx scripts/mcp/build-metadata.ts",
91
92
  "prepare": "husky",
92
93
  "prepublishOnly": "yarn run build",
93
94
  "release": "semantic-release",
@@ -173,19 +174,21 @@
173
174
  "@commitlint/config-conventional": "^20.5.0",
174
175
  "@databricks/sql": "^1.12.0",
175
176
  "@eslint/js": "^9.9.0",
177
+ "@modelcontextprotocol/sdk": "^1.29.0",
176
178
  "@semantic-release/changelog": "^6.0.3",
177
179
  "@semantic-release/commit-analyzer": "^13.0.1",
178
180
  "@semantic-release/git": "^10.0.1",
179
181
  "@semantic-release/github": "^12.0.6",
180
182
  "@semantic-release/npm": "^13.1.5",
181
183
  "@semantic-release/release-notes-generator": "^14.1.0",
182
- "@storybook/addon-a11y": "^10.2.15",
183
- "@storybook/addon-docs": "^10.2.15",
184
- "@storybook/addon-links": "^10.2.15",
185
- "@storybook/addon-themes": "^10.2.15",
186
- "@storybook/addon-vitest": "^10.2.15",
187
- "@storybook/builder-vite": "^10.2.15",
188
- "@storybook/react-vite": "^10.2.15",
184
+ "@storybook/addon-a11y": "^10.4.6",
185
+ "@storybook/addon-docs": "^10.4.6",
186
+ "@storybook/addon-links": "^10.4.6",
187
+ "@storybook/addon-mcp": "^0.6.0",
188
+ "@storybook/addon-themes": "^10.4.6",
189
+ "@storybook/addon-vitest": "^10.4.6",
190
+ "@storybook/builder-vite": "^10.4.6",
191
+ "@storybook/react-vite": "^10.4.6",
189
192
  "@tailwindcss/vite": "^4.2.2",
190
193
  "@types/eslint-plugin-jsx-a11y": "^6",
191
194
  "@types/jsdom": "^27",
@@ -195,6 +198,7 @@
195
198
  "@types/react-dom": "^19.0.0",
196
199
  "@types/react-plotly.js": "^2.6.3",
197
200
  "@types/react-syntax-highlighter": "^15",
201
+ "@vercel/node": "^5.4.5",
198
202
  "@vitejs/plugin-react": "^4.3.1",
199
203
  "@vitest/browser": "^3",
200
204
  "@vitest/coverage-v8": "^3",
@@ -206,7 +210,7 @@
206
210
  "eslint-plugin-react-hooks": "^5.1.0-rc.0",
207
211
  "eslint-plugin-react-refresh": "^0.4.9",
208
212
  "eslint-plugin-sonarjs": "^3.0.7",
209
- "eslint-plugin-storybook": "^10.2.15",
213
+ "eslint-plugin-storybook": "^10.4.6",
210
214
  "eslint-plugin-unicorn": "^63.0.0",
211
215
  "fast-xml-parser": "^5.3.4",
212
216
  "globals": "^15.9.0",
@@ -221,15 +225,17 @@
221
225
  "semantic-release": "^25.0.3",
222
226
  "shadcn": "^3.8.5",
223
227
  "snowflake-sdk": "^2.3.3",
224
- "storybook": "^10.2.15",
228
+ "storybook": "^10.4.6",
225
229
  "tailwindcss": "^4.2.2",
226
230
  "ts-morph": "^27.0.2",
231
+ "tsx": "^4.20.6",
227
232
  "tw-animate-css": "^1.4.0",
228
233
  "typescript": "^5.5.3",
229
234
  "typescript-eslint": "^8.0.1",
230
235
  "vite": "^7.3.1",
231
236
  "vite-plugin-dts": "^4.5.4",
232
- "vitest": "^3"
237
+ "vitest": "^3",
238
+ "zod": "^3.25.76"
233
239
  },
234
240
  "resolutions": {
235
241
  "jackspeak": "2.1.1",