@keystoneui/mcp 0.2.0-beta.1 → 0.2.0-beta.10
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 +21 -0
- package/README.md +27 -19
- package/dist/chunk-5RKRKR2Z.js +1435 -0
- package/dist/index.js +380 -60
- package/dist/server-WIAN72HA.js +88 -0
- package/package.json +23 -8
- package/dist/chunk-DZNQW5EA.js +0 -331
- package/dist/server-5ZV7UIUD.js +0 -137
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Keystone UI
|
|
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
|
@@ -12,11 +12,13 @@ The single binary runs in two modes:
|
|
|
12
12
|
### As an MCP server
|
|
13
13
|
|
|
14
14
|
```bash
|
|
15
|
-
npx -y @keystoneui/mcp init --client claude
|
|
15
|
+
npx -y @keystoneui/mcp@latest init --client claude
|
|
16
16
|
```
|
|
17
17
|
|
|
18
18
|
Supported clients: `claude`, `cursor`, `vscode`, `opencode`, `codex`. The `init` command writes the appropriate config file for the chosen client and points it at `npx @keystoneui/mcp@latest`.
|
|
19
19
|
|
|
20
|
+
The server runs with the settings of the project it starts in. Before using it in a project you have not reviewed, read [Projects you do not trust](https://keystoneui.io/docs/agents/mcp-server#projects-you-do-not-trust).
|
|
21
|
+
|
|
20
22
|
Once configured, ask your agent things like:
|
|
21
23
|
|
|
22
24
|
- *"List Keystone UI components."*
|
|
@@ -27,20 +29,23 @@ Once configured, ask your agent things like:
|
|
|
27
29
|
|
|
28
30
|
```bash
|
|
29
31
|
# Discover
|
|
30
|
-
npx keystoneui search "table pagination"
|
|
31
|
-
npx keystoneui list --type example
|
|
32
|
-
npx keystoneui blocks signin
|
|
32
|
+
npx @keystoneui/mcp search "table pagination"
|
|
33
|
+
npx @keystoneui/mcp list --type example
|
|
34
|
+
npx @keystoneui/mcp blocks signin
|
|
33
35
|
|
|
34
36
|
# Inspect
|
|
35
|
-
npx keystoneui view button
|
|
36
|
-
npx keystoneui docs button # /llms.mdx/docs/components/button
|
|
37
|
-
npx keystoneui examples table # all demo files for the table component
|
|
37
|
+
npx @keystoneui/mcp view button
|
|
38
|
+
npx @keystoneui/mcp docs button # /llms.mdx/docs/components/button
|
|
39
|
+
npx @keystoneui/mcp examples table # all demo files for the table component
|
|
38
40
|
|
|
39
41
|
# Install (delegates to shadcn CLI)
|
|
40
42
|
npx shadcn@latest add https://keystoneui.io/r/table-with-pagination.json
|
|
41
43
|
|
|
42
44
|
# Verify
|
|
43
|
-
npx keystoneui audit
|
|
45
|
+
npx @keystoneui/mcp audit
|
|
46
|
+
|
|
47
|
+
# Theme (a code from https://keystoneui.io/theme-builder)
|
|
48
|
+
npx @keystoneui/mcp theme k1_slate_0.55_0.2_262.5_large_inter
|
|
44
49
|
```
|
|
45
50
|
|
|
46
51
|
## Verbs
|
|
@@ -48,24 +53,27 @@ npx keystoneui audit
|
|
|
48
53
|
| Verb | Purpose |
|
|
49
54
|
|---|---|
|
|
50
55
|
| `init [--client <name>]` | Configure MCP client |
|
|
51
|
-
| `search <query> [--type T] [--limit N]` | Fuzzy search components, blocks, named examples |
|
|
52
|
-
| `list [--type T] [--limit N] [--offset N]` | List items (`T` = `ui` \| `block` \| `example`) |
|
|
53
|
-
| `view <name> [<name>...]` | Show
|
|
56
|
+
| `search <query> [--type T] [--limit N]` | Fuzzy search components, blocks, kits, named examples |
|
|
57
|
+
| `list [--type T] [--limit N] [--offset N]` | List items (`T` = `ui` \| `block` \| `example` \| `kit` \| `hook` \| `style` \| `theme` \| `font` \| `item`) |
|
|
58
|
+
| `view <name> [<name>...]` | Show the source of components, blocks, kits or package flavours |
|
|
54
59
|
| `examples <name>` | All demo files for a component or block |
|
|
55
|
-
| `docs <name
|
|
56
|
-
| `audit` | Print the post-install checklist |
|
|
57
|
-
| `blocks [<filter>]` | List or filter full-page blocks |
|
|
60
|
+
| `docs <name> [--type component\|block]` | Fetch the LLM-resolved MDX page (`/llms.mdx/docs/{components\|blocks}/<name>`); a kit or package flavour resolves to the section that documents it |
|
|
61
|
+
| `audit [--theme [css]] [--strict]` | Print the post-install checklist, or measure every text/surface token pair in your theme against WCAG AA |
|
|
62
|
+
| `blocks [<filter>]` | List or filter full-page blocks; an exact block name views it. Kits are listed with `list --type kit` |
|
|
63
|
+
| `theme <code> [--only theme,font,density]` | Decode a theme-builder code (`k1_…`, or `k2_…` with a heading font or compact density) and print its `shadcn add` command, optionally for some parts only |
|
|
58
64
|
|
|
59
65
|
Run `keystoneui help` for the full list. Without any verb the binary launches the MCP stdio server.
|
|
60
66
|
|
|
61
67
|
## MCP tools
|
|
62
68
|
|
|
63
|
-
When run without arguments the server exposes
|
|
69
|
+
When run without arguments the server exposes nine tools to MCP clients:
|
|
64
70
|
|
|
65
|
-
- `
|
|
66
|
-
- `
|
|
67
|
-
- `
|
|
68
|
-
- `
|
|
71
|
+
- `get_docs` — full docs page for a component, block, kit, or package flavour, including its API Reference
|
|
72
|
+
- `get_project_context` — install mode, aliases, theme CSS file, icon library, RSC
|
|
73
|
+
- `list_components` — list components, blocks, kits, or examples with pagination
|
|
74
|
+
- `search_components` — fuzzy search across components, blocks, kits, and examples
|
|
75
|
+
- `view_component` — full source for one or more components, blocks, kits, or package flavours
|
|
76
|
+
- `get_add_command` — generate the shadcn CLI command for installing components; `flavour: "package"` picks a block's or kit's package flavour for an app on `@keystoneui/react`
|
|
69
77
|
- `get_examples` — fetch live demo files for a component or block
|
|
70
78
|
- `get_theme_info` — semantic color tokens, radius scale, dark-mode setup
|
|
71
79
|
- `audit_checklist` — post-install verification checklist
|