@diviops/mcp-server 1.5.67 → 1.5.68
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 +21 -1
- package/dist/index.js +30 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -8,6 +8,25 @@ The Node.js MCP server inside the DiviOps harness. It gives Claude Code, Codex,
|
|
|
8
8
|
Claude Code <-> MCP Server (stdio) <-> WordPress REST API <-> DiviOps Agent plugin
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
+
## 1.5.68 release note — named site-wide CSS blocks
|
|
12
|
+
|
|
13
|
+
With Free Agent 1.5.39, `diviops_custom_css_get`, `diviops_custom_css_upsert`
|
|
14
|
+
and `diviops_custom_css_restore` read, preview, update and restore named blocks
|
|
15
|
+
in the active theme's native Custom CSS. Writes default to preview and require
|
|
16
|
+
an explicit apply with a fresh checksum. Unrelated CSS and theme options are
|
|
17
|
+
preserved; writes retain a seven-day recovery snapshot.
|
|
18
|
+
|
|
19
|
+
Initialize or reconcile storage through **Divi > Theme Options > General >
|
|
20
|
+
Custom CSS**, save visibly, then read again before applying. Missing or divergent
|
|
21
|
+
native storage is refused. A Customizer save can leave Divi's legacy mirror out
|
|
22
|
+
of sync; the tools do not repair it automatically. CSS support is a bounded
|
|
23
|
+
subset, and changing themes requires a fresh read. Check state after a cancelled
|
|
24
|
+
or failed write before retrying; use the CSS-specific restore tool for recovery.
|
|
25
|
+
|
|
26
|
+
Native editing, frontend rendering, recovery and child-theme isolation were
|
|
27
|
+
verified on WordPress 7.1, PHP 8.3 and Divi 5.13.1. Update both components and
|
|
28
|
+
restart the MCP server.
|
|
29
|
+
|
|
11
30
|
## 1.5.67 release note — WP-CLI term metadata and assignments
|
|
12
31
|
|
|
13
32
|
`term meta list <term-id> --format=json` is available as a default read alongside
|
|
@@ -467,13 +486,14 @@ The skill enforces the Divi block format, the design system, and the response co
|
|
|
467
486
|
|
|
468
487
|
## Tools at a glance
|
|
469
488
|
|
|
470
|
-
The server exposes **
|
|
489
|
+
The server exposes **100 always-on tools** across the categories below. Each category links to representative tools; the full table lives in [server-reference.md](../docs/server-reference.md).
|
|
471
490
|
|
|
472
491
|
| Category | Use case | Tool prefixes |
|
|
473
492
|
|----------|----------|---------------|
|
|
474
493
|
| Page authoring | Create, edit, restructure pages | `page_*`, `section_*`, `module_*` |
|
|
475
494
|
| Design system | Manage colors, fonts, variables, presets | `variable_*`, `global_color_*`, `global_font_*`, `preset_*` |
|
|
476
495
|
| Library + templates | Reusable layouts + Theme Builder | `library_*`, `template_*`, `tb_*` |
|
|
496
|
+
| Native Custom CSS | Read, preview, update and restore named site-wide CSS blocks | `custom_css_*` |
|
|
477
497
|
| WordPress menus | Author reusable nav menus and theme-location assignments | `menu_*` |
|
|
478
498
|
| Semantic SEO metadata | Inspect provider support and author two explicit TSF text fields with checksum/readback guards | `seo_*` |
|
|
479
499
|
| Schema introspection | Module attribute discovery | `schema_*` |
|
package/dist/index.js
CHANGED
|
@@ -1365,6 +1365,36 @@ registerPluginTool("diviops_page_update_content", {
|
|
|
1365
1365
|
pageContentCandidates.cancel(reservation.data.content_ref);
|
|
1366
1366
|
}
|
|
1367
1367
|
});
|
|
1368
|
+
registerPluginTool("diviops_custom_css_get", {
|
|
1369
|
+
description: "Read raw site-wide Additional CSS for the active stylesheet, its legacy Divi mirror and a complete state checksum. Requires admin and edit_css. Existing initialized native CSS post only; initialize or reconcile through Divi Theme Options > General > Custom CSS, then reread and verify the mirror agrees. Customizer alone may leave a divergent mirror. Refuses preprocessed CSS and unsupported data hooks. This is not computed browser CSS or generic Theme Options access.",
|
|
1370
|
+
inputSchema: {}, annotations: { readOnlyHint: true }, _meta: { idempotent: "true" },
|
|
1371
|
+
}, async (_args, context) => {
|
|
1372
|
+
const result = await wp.requestEnveloped("/custom-css", { signal: context?.signal });
|
|
1373
|
+
return { content: [{ type: "text", text: serializeEnvelope(result, "diviops_custom_css_get") }] };
|
|
1374
|
+
});
|
|
1375
|
+
registerPluginTool("diviops_custom_css_upsert", {
|
|
1376
|
+
description: "Append or replace one named site-wide CSS block while preserving unrelated bytes. Read custom_css_get and pass checksum as expected_checksum. Defaults to preview; explicitly pass dry_run:false to commit the same proposal. Uses a mandatory seven-day CSS recovery snapshot and exact readback. Requires existing initialized active-theme CSS storage, admin and edit_css; no generic option writes or new CSS posts. Refuses ambiguous markers and raw unquoted URL grouping; use quoted or base64 URLs. A failure or cancellation does not prove no write: read state and inspect snapshot/recovered/record_verified before further action. Optimistic checksum is not a native-editor lock.",
|
|
1377
|
+
inputSchema: {
|
|
1378
|
+
name: z.string().regex(/^[a-z][a-z0-9-]{0,63}$/), css: z.string().max(262144),
|
|
1379
|
+
expected_checksum: z.string().regex(/^sha256:[a-f0-9]{64}$/),
|
|
1380
|
+
dry_run: z.boolean().optional().default(true),
|
|
1381
|
+
},
|
|
1382
|
+
annotations: { idempotentHint: false }, _meta: { idempotent: "false" },
|
|
1383
|
+
}, async ({ name, css, expected_checksum, dry_run }, context) => {
|
|
1384
|
+
const result = await wp.requestEnveloped("/custom-css/upsert", { method: "POST", body: { name, css, expected_checksum, dry_run: dry_run ?? true }, signal: context?.signal });
|
|
1385
|
+
return { content: [{ type: "text", text: serializeEnvelope(result, "diviops_custom_css_upsert") }] };
|
|
1386
|
+
});
|
|
1387
|
+
registerPluginTool("diviops_custom_css_restore", {
|
|
1388
|
+
description: "Preview or restore only the CSS post/mirror owned by a custom_css_upsert snapshot. Read current custom_css_get and pass its checksum. Defaults to preview; dry_run:false commits. Requires admin and edit_css, matching active stylesheet/post identity and unexpired verified snapshot. Refuses conflicting third-party changes; no whole-option restore, CSS post deletion or cache/revision rollback. On incomplete recovery inspect recovered and record_verified; do not blindly retry.",
|
|
1389
|
+
inputSchema: {
|
|
1390
|
+
snapshot_id: z.string().regex(/^css_[a-f0-9-]{36}$/), expected_checksum: z.string().regex(/^sha256:[a-f0-9]{64}$/),
|
|
1391
|
+
dry_run: z.boolean().optional().default(true),
|
|
1392
|
+
},
|
|
1393
|
+
annotations: { idempotentHint: false }, _meta: { idempotent: "false" },
|
|
1394
|
+
}, async ({ snapshot_id, expected_checksum, dry_run }, context) => {
|
|
1395
|
+
const result = await wp.requestEnveloped("/custom-css/restore", { method: "POST", body: { snapshot_id, expected_checksum, dry_run: dry_run ?? true }, signal: context?.signal });
|
|
1396
|
+
return { content: [{ type: "text", text: serializeEnvelope(result, "diviops_custom_css_restore") }] };
|
|
1397
|
+
});
|
|
1368
1398
|
registerPluginTool("diviops_page_settings_get", {
|
|
1369
1399
|
description: "Read ordinary WordPress page background settings: stored values/presence, native defaults and a settings_checksum. These are not computed browser colors. Requires edit permission. No Theme Builder layout or global Theme Options access.",
|
|
1370
1400
|
inputSchema: { page_id: z.number().int().positive() },
|