@vardum/mcp 0.4.1 → 0.4.3

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 CHANGED
@@ -4,12 +4,15 @@ 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 [MCP **0.4.1**](https://www.npmjs.com/package/@vardum/mcp/v/0.4.1),
8
- including revision-guarded Vard editing. The matching client batch uses CLI
9
- **0.8.1** and shared **0.4.1**. This patch makes setup self-contained without
10
- changing the tools or editor protocol. Older MCP 0.3.0 uses the legacy editing
11
- contract; installing it does not enable revision guards. The published 0.1.0
12
- artifact has a broken workspace dependency.
7
+ This README describes [MCP **0.4.3**](https://www.npmjs.com/package/@vardum/mcp/v/0.4.3),
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
+ This security patch updates input validation to Zod 4.6.6. The same 11 tools
13
+ and editor protocol remain; the MCP SDK stays at 1.32.1.
14
+ Older MCP 0.3.0 uses the legacy editing contract; installing it does not enable
15
+ revision guards. The published 0.1.0 artifact has a broken workspace dependency.
13
16
 
14
17
  ## Setup
15
18
 
@@ -18,7 +21,7 @@ API key in **Settings → API keys** first; it is restricted to that workspace
18
21
  and its selected permissions. Copy the workspace ID from Settings → General
19
22
  for tool calls. Use Node.js 22 or newer.
20
23
 
21
- These configurations pin **MCP 0.4.1** and need no source-repository access.
24
+ These configurations pin **MCP 0.4.3** and need no source-repository access.
22
25
  Deploy a server advertising `vardEditRevision: 1` from `GET /api/capabilities`
23
26
  before editable Vard reads or mutations; there is no legacy-edit fallback.
24
27
  Use a read key for inspection or a key with the required write permissions for
@@ -27,7 +30,7 @@ mutation. Keep real keys in the client's private configuration, never in Git.
27
30
  Claude Code:
28
31
 
29
32
  ```sh
30
- claude mcp add vardum --env VARDUM_API_KEY=varda_... -- npx -y @vardum/mcp@0.4.1
33
+ claude mcp add vardum --env VARDUM_API_KEY=varda_... -- npx -y @vardum/mcp@0.4.3
31
34
  ```
32
35
 
33
36
  Any client that reads a JSON config (Claude Desktop, Cursor, …):
@@ -37,7 +40,7 @@ Any client that reads a JSON config (Claude Desktop, Cursor, …):
37
40
  "mcpServers": {
38
41
  "vardum": {
39
42
  "command": "npx",
40
- "args": ["-y", "@vardum/mcp@0.4.1"],
43
+ "args": ["-y", "@vardum/mcp@0.4.3"],
41
44
  "env": { "VARDUM_API_KEY": "varda_..." }
42
45
  }
43
46
  }
@@ -124,6 +127,33 @@ revision. Do not automatically repeat a stale replacement list with a new token.
124
127
  An unresolved preview never permits bypassing the revision check or writing
125
128
  expanded folder outputs as manual mappings.
126
129
 
130
+ ## Output recipes
131
+
132
+ The `replace_vard_items` transformation help describes these optional fields:
133
+
134
+ | Field | Contract |
135
+ | --- | --- |
136
+ | `bg` | Opaque six-digit `#rrggbb` output background; requires an explicit format |
137
+ | `pad` | 0–45 percent inset on each edge, at most two decimals; positive values require `w`, `h`, a format and `fit: "contain"` |
138
+ | `format: "svg"` | Vector output from a passive geometric SVG, with contain fit and no `q` |
139
+ | `layer` | Existing SVG group ID; preserves the source canvas and ancestor transforms |
140
+ | `darkLayer` + `darkColor` | Paired SVG-only dark-mode color change for filled shapes in one group |
141
+ | `render: "v2"` | Explicit SVG-to-raster renderer; requires a raster format and `bg` |
142
+
143
+ For example, use this transformation for a new background-backed PNG:
144
+
145
+ ```json
146
+ { "w": 256, "h": 256, "fit": "contain", "format": "png", "bg": "#f4f0e8", "pad": 12.5, "render": "v2" }
147
+ ```
148
+
149
+ Copy existing transformations literally when editing. Omitting `render` retains
150
+ the legacy renderer; do not add `"v2"` to existing mappings automatically.
151
+ Use a matching server that implements these API and renderer features.
152
+ `vardEditRevision: 1` proves the guarded-editor contract only; it does not
153
+ advertise SVG, safe-area or v2 support. The server validates combinations and
154
+ source types. Group selection and SVG output require the supported passive
155
+ geometric SVG subset; unsupported inputs fail without a fallback.
156
+
127
157
  ## Folder rules
128
158
 
129
159
  `create_vard` accepts `name`, optional `isPublic` (defaults private) and optional
package/dist/index.js CHANGED
@@ -520,9 +520,9 @@ server.tool("replace_vard_items", "Replace manual items using the caller's origi
520
520
  .nullable()
521
521
  .describe("Literal saved pin: copy pinnedVersionId from get_vard, never resolved versionId. Null follows latest. Pinned outputs must not be writable."),
522
522
  transformation: z
523
- .record(z.unknown())
523
+ .record(z.string(), 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.1",
3
+ "version": "0.4.3",
4
4
  "description": "MCP server for workspace-scoped Vardum assets and Vards",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -18,9 +18,9 @@
18
18
  "access": "public"
19
19
  },
20
20
  "dependencies": {
21
- "@modelcontextprotocol/sdk": "1.31.0",
22
- "@vardum/shared": "^0.4.1",
23
- "zod": "^3.24.0"
21
+ "@modelcontextprotocol/sdk": "1.32.1",
22
+ "@vardum/shared": "^0.4.2",
23
+ "zod": "4.6.6"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@types/node": "^26.2.0",