@dreamtree-org/twreact-ui 1.1.43 → 1.1.44

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 +28 -0
  2. package/package.json +7 -2
package/README.md CHANGED
@@ -12,6 +12,7 @@ A comprehensive React + Tailwind CSS components library for building modern web
12
12
  - 🧩 **Composable**: Flexible APIs with props, slots, and render functions
13
13
  - 🎨 **Customizable**: Easy theming with Tailwind config
14
14
  - 📦 **Tree Shakeable**: Import only what you need
15
+ - 🤖 **AI-native**: a companion [MCP server](#ai-agents-mcp-server) serves live prop contracts to coding agents
15
16
 
16
17
  ## Installation
17
18
 
@@ -43,6 +44,33 @@ function App() {
43
44
  }
44
45
  ```
45
46
 
47
+ ## AI agents (MCP server)
48
+
49
+ If you build UI with an AI coding agent (Claude Code, Cursor, …), wire up the
50
+ companion **[`@dreamtree-org/twreact-ui-mcp`](https://www.npmjs.com/package/@dreamtree-org/twreact-ui-mcp)**
51
+ [Model Context Protocol](https://modelcontextprotocol.io) server. It gives the
52
+ agent live, queryable access to this library — `list_components`,
53
+ `get_component` (authoritative props/variants/sizes/examples per component),
54
+ `search_components`, the per-component docs as resources, and a `compose_ui`
55
+ prompt — so it stops guessing prop names.
56
+
57
+ Add it to your MCP client config (no install needed — `npx` fetches it):
58
+
59
+ ```jsonc
60
+ {
61
+ "mcpServers": {
62
+ "dreamtree-ui": {
63
+ "command": "npx",
64
+ "args": ["-y", "@dreamtree-org/twreact-ui-mcp"]
65
+ }
66
+ }
67
+ }
68
+ ```
69
+
70
+ The catalog is a build-time snapshot baked into that package, so the server is
71
+ self-contained (no source or network needed at runtime). Upgrade it alongside
72
+ `@dreamtree-org/twreact-ui` to keep the served contracts current.
73
+
46
74
  ## Components
47
75
 
48
76
  ### Core Components
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dreamtree-org/twreact-ui",
3
- "version": "1.1.43",
3
+ "version": "1.1.44",
4
4
  "description": "A comprehensive React + Tailwind components library for building modern web apps",
5
5
  "author": {
6
6
  "name": "Partha Preetham Krishna",
@@ -34,6 +34,10 @@
34
34
  "build-storybook": "storybook build",
35
35
  "mcp": "node mcp/server.mjs",
36
36
  "mcp:smoke": "node mcp/smoke.mjs",
37
+ "mcp:snapshot": "node scripts/gen-mcp-snapshot.mjs",
38
+ "mcp:snapshot:check": "node scripts/check-mcp-snapshot.mjs",
39
+ "mcp:pkg:smoke": "node packages/mcp/smoke.mjs",
40
+ "prepublishOnly": "npm run mcp:snapshot && npm run mcp:snapshot:check",
37
41
  "skill:check": "node mcp/skill-check.mjs",
38
42
  "readme:check": "node scripts/readme-sync-check.mjs",
39
43
  "version:patch": "npm version patch && git push && git push --tags",
@@ -47,7 +51,8 @@
47
51
  "release:patch": "npm run release && npm run version:patch",
48
52
  "release:minor": "npm run release && npm run version:minor",
49
53
  "release:major": "npm run release && npm run version:major",
50
- "release:prerelease": "npm run release && npm run version:prerelease"
54
+ "release:prerelease": "npm run release && npm run version:prerelease",
55
+ "release:mcp": "npm run mcp:snapshot && npm run mcp:snapshot:check && npm run mcp:pkg:smoke && npm publish packages/mcp"
51
56
  },
52
57
  "keywords": [
53
58
  "react",