@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.
- package/README.md +128 -120
- package/dist/data.js +714 -379
- package/dist/index.js +1 -1
- 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://
|
|
12
|
-
<a href="https://svgrid.com/
|
|
13
|
-
</p>
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
|
30
|
-
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
| `
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
| `
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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™ and sv-grid™ are trademarks of jQWidgets Ltd.
|