@svgrid/mcp 2.2.1 → 2.3.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.
Files changed (4) hide show
  1. package/README.md +128 -120
  2. package/dist/data.js +714 -379
  3. package/dist/index.js +1 -1
  4. package/package.json +22 -4
package/README.md CHANGED
@@ -1,120 +1,128 @@
1
- <p align="center">
2
- <img src="https://svgrid.com/brand/svgrid-logo-icon-1200.png" alt="SvGrid" width="100" height="100" />
3
- </p>
4
-
5
- <h1 align="center">@svgrid/mcp</h1>
6
-
7
- <p align="center"><strong>The official Model Context Protocol server for SvGrid.</strong></p>
8
-
9
- <p align="center">
10
- <a href="https://www.npmjs.com/package/@svgrid/mcp"><img src="https://img.shields.io/npm/v/%40svgrid%2Fmcp.svg?label=%40svgrid%2Fmcp" alt="npm version" /></a>
11
- <a href="https://svgrid.com">Website</a> ·
12
- <a href="https://svgrid.com/docs">Docs</a>
13
- </p>
14
-
15
- ---
16
-
17
- Point any MCP-capable client - Claude Desktop, Claude Code, Cursor, Zed - at this server and the model answers with **accurate, version-pinned** facts about SvGrid: real prop, method, and event names, plus every demo's source as grounding. No hallucinated APIs, no stale blog posts.
18
-
19
- ## Tools exposed
20
-
21
- | Tool | Purpose |
22
- | --- | --- |
23
- | `list_examples` | Every demo: id, title, and one-line blurb. |
24
- | `get_example_source` | Full `.svelte` source for a demo by id. |
25
- | `list_docs` | Every documentation page (slug + title). |
26
- | `get_doc` | Markdown for a single doc by slug. |
27
- | `search_docs` | Case-insensitive substring search across the docs. |
28
- | `get_api_reference` | The curated public-API surface, grouped by category. |
29
- | `introspect_source` | Studio: infer an `EntitySchema` from a Drizzle file or sample rows. |
30
- | `scaffold_entity` | Studio: generate SvelteKit files for a single entity. |
31
-
32
- ### Studio: drive the app model (agent co-designer)
33
-
34
- The `studio_*` tools let an agent build and edit the **same validated project model the visual designer uses** - add entities, screens, blocks, components, wire data sources, theme, RBAC, auth, the typed data layer, and the deploy target - then generate the full runnable app or export the `studio.config.json` the designer can Load. Every edit runs through the model's own functions + `validateProject`, so the agent can't produce an invalid app.
35
-
36
- | Tool | Purpose |
37
- | --- | --- |
38
- | `studio_new_project` / `studio_load_project` | Start fresh, or load an existing `studio.config.json`. |
39
- | `studio_describe_project` / `studio_get_config` | Inspect the model / export it as `studio.config.json`. |
40
- | `studio_capabilities` | List block kinds, component keys, theme presets, data-source kinds, deploy targets. |
41
- | `studio_add_entity` | Add a table/model (+ default screen), by schema or introspection. |
42
- | `studio_add_screen` / `studio_add_block` / `studio_add_component` | Compose screens from data blocks + UI components. |
43
- | `studio_set_entity_source` | Bind an entity to memory / SQL / Supabase / REST / PGlite. |
44
- | `studio_set_theme` / `studio_set_access` / `studio_set_auth` / `studio_set_data_layer` / `studio_set_deploy_target` | Configure app-wide features. |
45
- | `studio_validate` | Report errors + warnings. |
46
- | `studio_generate_app` | Emit every file of the runnable SvelteKit app. |
47
-
48
- A typical session: `studio_new_project` `studio_add_entity` (×N) `studio_set_entity_source` `studio_set_data_layer` `studio_set_auth` `studio_generate_app` write the files and run `svelte-check`.
49
-
50
- ## Run
51
-
52
- ```bash
53
- # One-shot via npx (no install)
54
- npx @svgrid/mcp
55
-
56
- # Or install globally, then run the bin
57
- npm install -g @svgrid/mcp
58
- @svgrid/mcp
59
- ```
60
-
61
- The server speaks MCP over **stdio**: stdout is reserved for JSON-RPC, logs go to stderr.
62
-
63
- ## Connect Claude Desktop
64
-
65
- Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or
66
- `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
67
-
68
- ```json
69
- {
70
- "mcpServers": {
71
- "svgrid": {
72
- "command": "npx",
73
- "args": ["-y", "@svgrid/mcp"]
74
- }
75
- }
76
- }
77
- ```
78
-
79
- Restart Claude Desktop and open a new chat - the tools above are now available.
80
-
81
- ## Connect Claude Code
82
-
83
- ```bash
84
- claude mcp add svgrid -- npx -y @svgrid/mcp
85
- ```
86
-
87
- Then run `/mcp` in a session to confirm `svgrid` is listed. Ask something like
88
- *"using svgrid, build a grid that groups by department and shows a sparkline per row"*
89
- and the model will pull the relevant demo sources before generating code.
90
-
91
- ## Connect Cursor / Zed
92
-
93
- Add the same `mcpServers` block to the editor's MCP configuration:
94
-
95
- ```json
96
- {
97
- "mcpServers": {
98
- "svgrid": { "command": "npx", "args": ["-y", "@svgrid/mcp"] }
99
- }
100
- }
101
- ```
102
-
103
- ## Build from source
104
-
105
- ```bash
106
- cd packages/mcp
107
- pnpm build
108
- node dist/index.js
109
- ```
110
-
111
- `pnpm build` first runs `scripts/build-manifests.mjs`, which reads
112
- `examples/src/demos/*.svelte` and `docs/**/*.md` from the workspace and inlines
113
- them into `src/data.ts`, so the published package is fully self-contained.
114
-
115
- ## Licensing
116
-
117
- Commercial. Part of the SvGrid Enterprise offering; see [svgrid.com/pricing](https://svgrid.com/pricing).
118
- The MIT [`@svgrid/grid`](https://www.npmjs.com/package/@svgrid/grid) core is free for any use.
119
-
120
- SvGrid&trade; and sv-grid&trade; are trademarks of jQWidgets Ltd.
1
+ <p align="center">
2
+ <img src="https://svgrid.com/brand/svgrid-logo-icon-1200.png" alt="SvGrid" width="100" height="100" />
3
+ </p>
4
+
5
+ <h1 align="center">@svgrid/mcp</h1>
6
+
7
+ <p align="center"><strong>The official Model Context Protocol server for SvGrid.</strong></p>
8
+
9
+ <p align="center">
10
+ <a href="https://www.npmjs.com/package/@svgrid/mcp"><img src="https://img.shields.io/npm/v/%40svgrid%2Fmcp.svg?label=%40svgrid%2Fmcp" alt="npm version" /></a>
11
+ <a href="https://www.npmjs.com/package/@svgrid/mcp"><img src="https://img.shields.io/npm/dm/%40svgrid%2Fmcp.svg" alt="npm downloads" /></a>
12
+ <a href="https://svgrid.com/pricing/"><img src="https://img.shields.io/badge/license-commercial-blue.svg" alt="Commercial license" /></a>
13
+ </p>
14
+
15
+ <p align="center">
16
+ <a href="https://svgrid.com">Website</a> ·
17
+ <a href="https://svgrid.com/docs/help/mcp-server/">Docs</a> ·
18
+ <a href="https://svgrid.com/pricing/">Pricing</a>
19
+ </p>
20
+
21
+ ---
22
+
23
+ Point any MCP-capable client - Claude Desktop, Claude Code, Cursor, Zed - at this server and the model answers with **accurate, version-pinned** facts about SvGrid: real prop, method, and event names, plus every demo's source as grounding. No hallucinated APIs, no stale blog posts.
24
+
25
+ **Why this beats pasting docs into the chat.** A model working from memory invents plausible SvGrid APIs, because it learned from a mix of other grids and older versions. Pasting docs helps for one question and then falls out of the context window. This server puts the current API surface and 370+ working demo sources one tool call away, for every question, pinned to the version you installed.
26
+
27
+ ## Tools exposed
28
+
29
+ | Tool | Purpose |
30
+ | --- | --- |
31
+ | `list_examples` | Every demo: id, title, and one-line blurb. |
32
+ | `get_example_source` | Full `.svelte` source for a demo by id. |
33
+ | `list_docs` | Every documentation page (slug + title). |
34
+ | `get_doc` | Markdown for a single doc by slug. |
35
+ | `search_docs` | Case-insensitive substring search across the docs. |
36
+ | `get_api_reference` | The curated public-API surface, grouped by category. |
37
+ | `introspect_source` | Studio: infer an `EntitySchema` from a Drizzle file or sample rows. |
38
+ | `scaffold_entity` | Studio: generate SvelteKit files for a single entity. |
39
+
40
+ ### Studio: drive the app model (agent co-designer)
41
+
42
+ The `studio_*` tools let an agent build and edit the **same validated project model the visual designer uses** - add entities, screens, blocks, components, wire data sources, theme, RBAC, auth, the typed data layer, and the deploy target - then generate the full runnable app or export the `studio.config.json` the designer can Load. Every edit runs through the model's own functions + `validateProject`, so the agent can't produce an invalid app.
43
+
44
+ | Tool | Purpose |
45
+ | --- | --- |
46
+ | `studio_new_project` / `studio_load_project` | Start fresh, or load an existing `studio.config.json`. |
47
+ | `studio_describe_project` / `studio_get_config` | Inspect the model / export it as `studio.config.json`. |
48
+ | `studio_capabilities` | List block kinds, component keys, theme presets, data-source kinds, deploy targets. |
49
+ | `studio_add_entity` | Add a table/model (+ default screen), by schema or introspection. |
50
+ | `studio_add_screen` / `studio_add_block` / `studio_add_component` | Compose screens from data blocks + UI components. |
51
+ | `studio_set_entity_source` | Bind an entity to memory / SQL / Supabase / REST / PGlite. |
52
+ | `studio_set_theme` / `studio_set_access` / `studio_set_auth` / `studio_set_data_layer` / `studio_set_deploy_target` | Configure app-wide features. |
53
+ | `studio_validate` | Report errors + warnings. |
54
+ | `studio_generate_app` | Emit every file of the runnable SvelteKit app. |
55
+
56
+ A typical session: `studio_new_project` `studio_add_entity` (×N) → `studio_set_entity_source` → `studio_set_data_layer` → `studio_set_auth` → `studio_generate_app` → write the files and run `svelte-check`.
57
+
58
+ ## Run
59
+
60
+ ```bash
61
+ # One-shot via npx (no install)
62
+ npx @svgrid/mcp
63
+
64
+ # Or install globally, then run the bin
65
+ npm install -g @svgrid/mcp
66
+ @svgrid/mcp
67
+ ```
68
+
69
+ The server speaks MCP over **stdio**: stdout is reserved for JSON-RPC, logs go to stderr.
70
+
71
+ ## Connect Claude Desktop
72
+
73
+ Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or
74
+ `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
75
+
76
+ ```json
77
+ {
78
+ "mcpServers": {
79
+ "svgrid": {
80
+ "command": "npx",
81
+ "args": ["-y", "@svgrid/mcp"]
82
+ }
83
+ }
84
+ }
85
+ ```
86
+
87
+ Restart Claude Desktop and open a new chat - the tools above are now available.
88
+
89
+ ## Connect Claude Code
90
+
91
+ ```bash
92
+ claude mcp add svgrid -- npx -y @svgrid/mcp
93
+ ```
94
+
95
+ Then run `/mcp` in a session to confirm `svgrid` is listed. Ask something like
96
+ *"using svgrid, build a grid that groups by department and shows a sparkline per row"*
97
+ and the model will pull the relevant demo sources before generating code.
98
+
99
+ ## Connect Cursor / Zed
100
+
101
+ Add the same `mcpServers` block to the editor's MCP configuration:
102
+
103
+ ```json
104
+ {
105
+ "mcpServers": {
106
+ "svgrid": { "command": "npx", "args": ["-y", "@svgrid/mcp"] }
107
+ }
108
+ }
109
+ ```
110
+
111
+ ## Build from source
112
+
113
+ ```bash
114
+ cd packages/mcp
115
+ pnpm build
116
+ node dist/index.js
117
+ ```
118
+
119
+ `pnpm build` first runs `scripts/build-manifests.mjs`, which reads
120
+ `examples/src/demos/*.svelte` and `docs/**/*.md` from the workspace and inlines
121
+ them into `src/data.ts`, so the published package is fully self-contained.
122
+
123
+ ## Licensing
124
+
125
+ Commercial. Part of the SvGrid Enterprise offering; see [svgrid.com/pricing](https://svgrid.com/pricing/).
126
+ The MIT [`@svgrid/grid`](https://www.npmjs.com/package/@svgrid/grid) core is free for any use.
127
+
128
+ SvGrid&trade; and sv-grid&trade; are trademarks of jQWidgets Ltd.