@becket-ui/mcp 0.0.0-stage → 0.4.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 Kolmena de Software
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 CHANGED
@@ -1,3 +1,94 @@
1
- # Temporary Holding Version
1
+ # @becket-ui/mcp
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ An [MCP](https://modelcontextprotocol.io) server that teaches coding agents (Claude Code, Cursor, VS
4
+ Code and others) to build UIs with Becket UI: which components exist, their exact props, real
5
+ examples, the design tokens, the app-code rules, and a check for code that drifts from them.
6
+
7
+ It runs over stdio. All its data is generated at build time from this repo's own sources:
8
+ `@becket-ui/react` exports and type declarations, recipe variant values, Storybook stories,
9
+ `@becket-ui/tokens/index.css` and `packages/react/guides/building-with-becket.md`. It can't drift
10
+ from the library it ships with.
11
+
12
+ It ships with the same version number as `@becket-ui/react`: `@becket-ui/mcp@0.4.0` describes
13
+ `@becket-ui/react@0.4.0`. Needs Node 22 or later.
14
+
15
+ ## Tools
16
+
17
+ | Tool | What it returns |
18
+ | ----------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
19
+ | `installation` | Packages, the one CSS import, the theme on `<html>`, no provider |
20
+ | `list_components` | Every component by group, its parts, and whether it needs client JS |
21
+ | `get_component_props` | Exact TypeScript declarations and recipe variant values. Accepts parts too (`CardHeader`, `Thead`, `SearchIcon`) |
22
+ | `get_component_example` | Usage examples (the component's Storybook stories), all or one by name |
23
+ | `get_theme` | Tokens with dark and light values: colors, spacing, radii, sizes, font-sizes, shadows |
24
+ | `get_guidelines` | The app-code guide, whole or one section (`component`, `tokens`, `accessibility`, `example`, `checklist`, …) |
25
+ | `review_usage` | Checks code for raw layout, text and controls, literal colors, pixel spacing, recipe classes, Chakra imports and unknown exports, each with the Becket fix |
26
+
27
+ ## Connect
28
+
29
+ **Claude Code**
30
+
31
+ ```bash
32
+ claude mcp add becket-ui -- npx -y @becket-ui/mcp
33
+ ```
34
+
35
+ **Cursor**: `.cursor/mcp.json` in your app (or `~/.cursor/mcp.json`):
36
+
37
+ ```json
38
+ {
39
+ "mcpServers": {
40
+ "becket-ui": {
41
+ "command": "npx",
42
+ "args": ["-y", "@becket-ui/mcp"]
43
+ }
44
+ }
45
+ }
46
+ ```
47
+
48
+ **VS Code**: `.vscode/mcp.json`:
49
+
50
+ ```json
51
+ {
52
+ "servers": {
53
+ "becket-ui": {
54
+ "type": "stdio",
55
+ "command": "npx",
56
+ "args": ["-y", "@becket-ui/mcp"]
57
+ }
58
+ }
59
+ }
60
+ ```
61
+
62
+ To match an app that pins an older Becket, pin the server too: `@becket-ui/mcp@0.4.0`.
63
+
64
+ Then ask your agent something like "build a settings page with Becket UI". It should call
65
+ `get_guidelines` and `list_components` first, and `review_usage` before it finishes. Add a line to
66
+ your app's `CLAUDE.md` (or Cursor rules) to make that the habit:
67
+
68
+ > UI uses Becket UI. Before writing UI, call the becket-ui MCP's `get_guidelines`; before finishing,
69
+ > run `review_usage` on the changed files.
70
+
71
+ ## Develop
72
+
73
+ From the repo root:
74
+
75
+ ```bash
76
+ pnpm install
77
+ pnpm -F "@becket-ui/mcp..." build # tokens, react, then the server (tsup + scripts/build-data.mjs)
78
+ pnpm -F @becket-ui/mcp test # tool handlers + an end-to-end stdio test
79
+ ```
80
+
81
+ The build writes `packages/mcp/dist/server.js` and its data in `dist/data`. Rebuild after changing
82
+ components, tokens or the guide. To try unreleased changes in an agent, point it at your clone
83
+ instead of npm:
84
+
85
+ ```bash
86
+ claude mcp add becket-ui -- node /absolute/path/to/becket-ui/packages/mcp/dist/server.js
87
+ ```
88
+
89
+ Releases go out with `@becket-ui/react` and `@becket-ui/tokens` (one Changesets `fixed` group); see
90
+ CONTRIBUTING.md "Versions".
91
+
92
+ `review_usage` is heuristic (line patterns, not a parser). A line containing `TODO (MAV-…)` counts
93
+ as an acknowledged gap. Examples come from Storybook stories until per-component AI examples land
94
+ (MAV-39).