@vardum/mcp 0.4.0 → 0.4.2
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 +65 -23
- package/dist/index.js +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -4,29 +4,32 @@ MCP server for [Vardum](https://vardum.com): lets an AI agent manage assets and
|
|
|
4
4
|
Vards using a key scoped to one workspace. Workspace creation, membership,
|
|
5
5
|
API-key management and domains are managed in the web app with a signed-in session.
|
|
6
6
|
|
|
7
|
-
This README describes
|
|
8
|
-
|
|
9
|
-
and
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
The
|
|
7
|
+
This README describes [MCP **0.4.2**](https://www.npmjs.com/package/@vardum/mcp/v/0.4.2),
|
|
8
|
+
including revision-guarded Vard editing and recipe help for backgrounds, safe
|
|
9
|
+
area and SVG rendering. The matching client batch uses
|
|
10
|
+
[CLI **0.8.3**](https://www.npmjs.com/package/@vardum/cli/v/0.8.3) and
|
|
11
|
+
[shared **0.4.2**](https://www.npmjs.com/package/@vardum/shared/v/0.4.2).
|
|
12
|
+
The same 11 tools and editor protocol remain; the MCP SDK is now 1.32.1.
|
|
13
|
+
Older MCP 0.3.0 uses the legacy editing contract; installing it does not enable
|
|
14
|
+
revision guards. The published 0.1.0 artifact has a broken workspace dependency.
|
|
13
15
|
|
|
14
16
|
## Setup
|
|
15
17
|
|
|
16
18
|
The server speaks MCP over stdio, so the client starts it. Create a workspace
|
|
17
|
-
API key in **Settings
|
|
19
|
+
API key in **Settings → API keys** first; it is restricted to that workspace
|
|
18
20
|
and its selected permissions. Copy the workspace ID from Settings → General
|
|
19
21
|
for tool calls. Use Node.js 22 or newer.
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
These configurations pin **MCP 0.4.2** and need no source-repository access.
|
|
24
|
+
Deploy a server advertising `vardEditRevision: 1` from `GET /api/capabilities`
|
|
25
|
+
before editable Vard reads or mutations; there is no legacy-edit fallback.
|
|
26
|
+
Use a read key for inspection or a key with the required write permissions for
|
|
27
|
+
mutation. Keep real keys in the client's private configuration, never in Git.
|
|
25
28
|
|
|
26
29
|
Claude Code:
|
|
27
30
|
|
|
28
31
|
```sh
|
|
29
|
-
claude mcp add vardum --env VARDUM_API_KEY=varda_... -- npx -y @vardum/mcp@0.4.
|
|
32
|
+
claude mcp add vardum --env VARDUM_API_KEY=varda_... -- npx -y @vardum/mcp@0.4.2
|
|
30
33
|
```
|
|
31
34
|
|
|
32
35
|
Any client that reads a JSON config (Claude Desktop, Cursor, …):
|
|
@@ -36,17 +39,13 @@ Any client that reads a JSON config (Claude Desktop, Cursor, …):
|
|
|
36
39
|
"mcpServers": {
|
|
37
40
|
"vardum": {
|
|
38
41
|
"command": "npx",
|
|
39
|
-
"args": ["-y", "@vardum/mcp@0.4.
|
|
42
|
+
"args": ["-y", "@vardum/mcp@0.4.2"],
|
|
40
43
|
"env": { "VARDUM_API_KEY": "varda_..." }
|
|
41
44
|
}
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
47
|
```
|
|
45
48
|
|
|
46
|
-
For a source checkout, build with `pnpm --filter "@vardum/mcp..." build` and
|
|
47
|
-
configure the client to run `node /absolute/path/to/vardum/apps/mcp/dist/index.js`.
|
|
48
|
-
This does not establish npm availability.
|
|
49
|
-
|
|
50
49
|
## Configuration
|
|
51
50
|
|
|
52
51
|
| Setting | Flag | Environment | Default |
|
|
@@ -86,8 +85,9 @@ Use `set_asset_visibility` with `workspaceId`, `assetId`, and an explicit boolea
|
|
|
86
85
|
Publishing exposes every ready version and its variants. A public Vard does not
|
|
87
86
|
publish its files: its anonymous manifest remains unavailable while any mapped
|
|
88
87
|
asset is private. Making a file private cannot revoke downloaded or cached
|
|
89
|
-
copies.
|
|
90
|
-
|
|
88
|
+
copies. The server must implement asset visibility, enforce workspace read access to
|
|
89
|
+
private version/variant URLs, and require publish permission for visibility changes.
|
|
90
|
+
Installing this package does not add those backend capabilities.
|
|
91
91
|
|
|
92
92
|
## Guarded editing
|
|
93
93
|
|
|
@@ -123,7 +123,35 @@ A stale write returns a structured MCP tool error (`isError: true`) with
|
|
|
123
123
|
instruction to reload. Keep the intended edit, read `get_vard` again, review the
|
|
124
124
|
current definition, then reapply the edit with that reviewed definition's
|
|
125
125
|
revision. Do not automatically repeat a stale replacement list with a new token.
|
|
126
|
-
|
|
126
|
+
An unresolved preview never permits bypassing the revision check or writing
|
|
127
|
+
expanded folder outputs as manual mappings.
|
|
128
|
+
|
|
129
|
+
## Output recipes
|
|
130
|
+
|
|
131
|
+
The `replace_vard_items` transformation help describes these optional fields:
|
|
132
|
+
|
|
133
|
+
| Field | Contract |
|
|
134
|
+
| --- | --- |
|
|
135
|
+
| `bg` | Opaque six-digit `#rrggbb` output background; requires an explicit format |
|
|
136
|
+
| `pad` | 0–45 percent inset on each edge, at most two decimals; positive values require `w`, `h`, a format and `fit: "contain"` |
|
|
137
|
+
| `format: "svg"` | Vector output from a passive geometric SVG, with contain fit and no `q` |
|
|
138
|
+
| `layer` | Existing SVG group ID; preserves the source canvas and ancestor transforms |
|
|
139
|
+
| `darkLayer` + `darkColor` | Paired SVG-only dark-mode color change for filled shapes in one group |
|
|
140
|
+
| `render: "v2"` | Explicit SVG-to-raster renderer; requires a raster format and `bg` |
|
|
141
|
+
|
|
142
|
+
For example, use this transformation for a new background-backed PNG:
|
|
143
|
+
|
|
144
|
+
```json
|
|
145
|
+
{ "w": 256, "h": 256, "fit": "contain", "format": "png", "bg": "#f4f0e8", "pad": 12.5, "render": "v2" }
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Copy existing transformations literally when editing. Omitting `render` retains
|
|
149
|
+
the legacy renderer; do not add `"v2"` to existing mappings automatically.
|
|
150
|
+
Use a matching server that implements these API and renderer features.
|
|
151
|
+
`vardEditRevision: 1` proves the guarded-editor contract only; it does not
|
|
152
|
+
advertise SVG, safe-area or v2 support. The server validates combinations and
|
|
153
|
+
source types. Group selection and SVG output require the supported passive
|
|
154
|
+
geometric SVG subset; unsupported inputs fail without a fallback.
|
|
127
155
|
|
|
128
156
|
## Folder rules
|
|
129
157
|
|
|
@@ -159,6 +187,20 @@ consumes the committed snapshot without live resolution. There is no background
|
|
|
159
187
|
sync. Removing rules leaves source assets/manual mappings intact. Choose
|
|
160
188
|
`--delete` on the membership-updating pull: a normal no-delete pull keeps stale
|
|
161
189
|
disk files but drops their tracking, so a later `--delete` cannot remove them.
|
|
162
|
-
|
|
163
|
-
and
|
|
164
|
-
|
|
190
|
+
The CLI snapshot records locked URLs and byte checksums, not an archive. Frozen
|
|
191
|
+
restore needs those versions and URLs to remain reachable with the required read
|
|
192
|
+
permission. Source-key or workspace-slug renames, deleted versions, signing-key
|
|
193
|
+
rotation, expired signatures or changed transformation bytes can break an old
|
|
194
|
+
snapshot; checksum failure never falls back to latest. Do not assume a rule removal
|
|
195
|
+
or a successful live preview proves historical frozen restores.
|
|
196
|
+
|
|
197
|
+
## Self-hosted backend
|
|
198
|
+
|
|
199
|
+
The matching backend exposes `GET /api/capabilities` with `vardEditRevision: 1`
|
|
200
|
+
and dedicated `/editor` endpoints. Guarded editing needs no migration beyond the
|
|
201
|
+
upload/import baseline through `0015_upload_request_checksum.sql`. Folder rules
|
|
202
|
+
need recursive ready-original resolution with the collision/limit rules above.
|
|
203
|
+
Asset uploads need `GET /api/upload-limits`, accepted MIME validation and ready
|
|
204
|
+
version processing. Images and videos have separate byte limits; video delivery
|
|
205
|
+
keeps original bytes without transformation variants. Verify the actual instance
|
|
206
|
+
before granting an agent write permissions.
|
package/dist/index.js
CHANGED
|
@@ -522,7 +522,7 @@ server.tool("replace_vard_items", "Replace manual items using the caller's origi
|
|
|
522
522
|
transformation: z
|
|
523
523
|
.record(z.unknown())
|
|
524
524
|
.nullable()
|
|
525
|
-
.describe("Optional transformation parameters (w, h, fit, format, q) or null"),
|
|
525
|
+
.describe("Optional transformation parameters (w, h, fit, format, q, bg, pad, layer, darkLayer, darkColor, render) or null. bg is an opaque #rrggbb background and requires an explicit output format. For new SVG-to-raster recipes with bg, set render to v2 to rasterize vectors at the requested size before compositing. Omit render on existing recipes to preserve their renderer identity. render v2 requires an SVG source, raster format and bg. pad is a 0–45 percent inset per edge, with at most two decimals; positive pad requires w, h, a format and fit contain. SVG output requires a passive geometric SVG source, contain fit and no q. layer selects a named SVG group while preserving its canvas. darkLayer plus darkColor adapts one SVG group to dark mode. Omit bg for transparent padding."),
|
|
526
526
|
})
|
|
527
527
|
.strict())
|
|
528
528
|
.describe("Complete manual item list only; folderRules are preserved"),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vardum/mcp",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "MCP server for workspace-scoped Vardum assets and Vards",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"access": "public"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@modelcontextprotocol/sdk": "1.
|
|
22
|
-
"@vardum/shared": "^0.4.
|
|
21
|
+
"@modelcontextprotocol/sdk": "1.32.1",
|
|
22
|
+
"@vardum/shared": "^0.4.2",
|
|
23
23
|
"zod": "^3.24.0"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"url": "git+https://github.com/f-tuma/vardum.git",
|
|
32
32
|
"directory": "apps/mcp"
|
|
33
33
|
},
|
|
34
|
-
"homepage": "https://
|
|
34
|
+
"homepage": "https://vardum.com",
|
|
35
35
|
"bugs": {
|
|
36
36
|
"url": "https://github.com/f-tuma/vardum/issues"
|
|
37
37
|
},
|