@diviops/mcp-server 1.5.68 → 1.5.70

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 (3) hide show
  1. package/README.md +44 -7
  2. package/dist/index.js +16 -11
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -495,7 +495,7 @@ The server exposes **100 always-on tools** across the categories below. Each cat
495
495
  | Library + templates | Reusable layouts + Theme Builder | `library_*`, `template_*`, `tb_*` |
496
496
  | Native Custom CSS | Read, preview, update and restore named site-wide CSS blocks | `custom_css_*` |
497
497
  | WordPress menus | Author reusable nav menus and theme-location assignments | `menu_*` |
498
- | Semantic SEO metadata | Inspect provider support and author two explicit TSF text fields with checksum/readback guards | `seo_*` |
498
+ | Semantic SEO metadata | Inspect provider support; TSF title/description plus TSF and Rank Math canonical/noindex with checksum/readback guards | `seo_*` |
499
499
  | Schema introspection | Module attribute discovery | `schema_*` |
500
500
  | Canvas / off-canvas | Popups, modals, menus | `canvas_*` |
501
501
  | SCF integration | Secure Custom Fields sync | `scf_*` |
@@ -794,12 +794,49 @@ permission, refuses content or supported Divi post-meta drift before mutation,
794
794
  uses the same full-content integrity/readback guard, and has no force override
795
795
  or second pre-restore snapshot in this MVP.
796
796
 
797
- `diviops_seo_metadata_update` is a separate explicit-metadata-only path. It
798
- accepts no raw provider keys, requires the checksum from
799
- `diviops_seo_metadata_get`, validates plain text before TSF sanitization,
800
- verifies exact stored readback, and performs request-local restoration on a
801
- mismatch. It does not create a persistent rollback snapshot; effective
802
- provider output is verified through a follow-up get request.
797
+ `diviops_seo_metadata_update` accepts fixed semantic fields and requires the
798
+ checksum from `diviops_seo_metadata_get`. TSF retains its title/description
799
+ set/clear contract and request-local rollback. The Rank Math
800
+ 1.0.279 adapter adds `canonical_url` set/clear and `noindex` set with the string
801
+ value `noindex`, on pages only. It requires per-page edit permission and Rank
802
+ Math general/advanced metadata capabilities. Other robots writes are refused.
803
+
804
+ Preview with `dry_run:true`. Rank Math noindex preserves other directives;
805
+ when those directives were inherited, the preview explains that the local
806
+ robots array will pin them. A computed canonical is not proof of an emitted
807
+ tag: Rank Math suppresses canonical output under noindex. Frontend filters and
808
+ query context require separate verification.
809
+
810
+ Every non-noop Rank Math apply saves a private typed recovery record and returns
811
+ `snapshot_id`. To preview or apply restoration, call the same update tool with
812
+ `restore_snapshot_id`, a fresh `expected_checksum`, and no `changes`. Restore
813
+ checks the provider/version/page and current permissions, refuses third-party
814
+ changes to affected fields, and preserves later changes to untouched fields.
815
+ Records use non-autoloaded options, have no automatic expiry and remain until
816
+ operator cleanup; they are not listed or restored by the page-content snapshot
817
+ tools. A failed or uncertain response can include applied changes: retain its
818
+ snapshot ID and inspect state rather than retrying blindly. Provider sitemap
819
+ invalidation does not establish external cache eviction.
820
+
821
+ TSF 5.1.4 additionally supports page `canonical_url` set/clear and `noindex`
822
+ set with `noindex` or `reset_default` without a value. Use the additive
823
+ `indexing.checksum` from a fresh read for these operations and their typed
824
+ `restore_snapshot_id`; retain the top-level checksum for title/description.
825
+ Do not mix text and indexing changes. Reset resumes provider inheritance;
826
+ it does not force indexing. Other robots fields keep their inherited state.
827
+ TSF retains a custom canonical under noindex and suppresses generated fallback.
828
+ Homepage canonical settings can override a page value. Typed recovery records
829
+ have no automatic expiry and require operator cleanup.
830
+
831
+ Pair MCP 1.5.70 with Free Agent 1.5.41 and restart the server. Native Classic
832
+ editor save/reopen, frontend canonical/robots, primed sitemap exclusion and
833
+ restoration, defaults drift and permission refusal passed on WordPress 7.1,
834
+ PHP 8.3 and Divi 5.13.1 for Rank Math 1.0.279 and TSF 5.1.4. TSF additionally
835
+ passed exact empty/zero/force-index restore and homepage/scheme checks. Block
836
+ editor, other provider versions, external cache eviction and MCP stdio runtime
837
+ are outside this qualification. Rank Math title/description, Yoast, social/schema
838
+ and bulk edits remain outside these adapters. See the [Rank Math contract](../docs/rank-math-seo-adapter.md)
839
+ and [TSF contract](../docs/tsf-indexing-adapter.md).
803
840
 
804
841
  ### `_meta.idempotent` markers
805
842
 
package/dist/index.js CHANGED
@@ -476,8 +476,8 @@ const BACKUP_FIELD = z
476
476
  .optional()
477
477
  .default(false)
478
478
  .describe("When true on supported content writes, capture a rollback snapshot before applying. dry_run + backup only reports the planned snapshot and does not create one.");
479
- const SEO_FIELD = z.enum(["seo_title", "meta_description"]);
480
- const SEO_PROVIDER = z.enum(["auto", "tsf"]);
479
+ const SEO_FIELD = z.enum(["seo_title", "meta_description", "canonical_url", "noindex"]);
480
+ const SEO_PROVIDER = z.enum(["auto", "tsf", "rank_math"]);
481
481
  const SEO_CHANGE = z.discriminatedUnion("action", [
482
482
  z.strictObject({
483
483
  field: SEO_FIELD,
@@ -488,6 +488,7 @@ const SEO_CHANGE = z.discriminatedUnion("action", [
488
488
  field: SEO_FIELD,
489
489
  action: z.literal("clear"),
490
490
  }),
491
+ z.strictObject({ field: z.literal("noindex"), action: z.literal("reset_default") }),
491
492
  ]);
492
493
  const SEO_CHANGES = z
493
494
  .array(SEO_CHANGE)
@@ -508,7 +509,7 @@ const SEO_CHANGES = z
508
509
  });
509
510
  // ── Read Tools ───────────────────────────────────────────────────────
510
511
  registerPluginTool("diviops_seo_provider_list", {
511
- description: "List the Free/core semantic SEO provider adapters and their installed, active, version, compatibility, field, and capability evidence. The first MVP reports only The SEO Framework and never loads an inactive provider. This is discovery only: it returns no post payload and provides no provider installation or activation path. Returns the standardized envelope.",
512
+ description: "List the Free/core semantic SEO provider adapters and their installed, active, version, compatibility, field, and capability evidence. Reports TSF text fields plus exact-version TSF and Rank Math canonical/noindex capabilities; never loads an inactive provider. Rank Math is source-assessed and requires native qualification. This is discovery only: it returns no post payload and provides no provider installation or activation path. Returns the standardized envelope.",
512
513
  inputSchema: {},
513
514
  annotations: { idempotentHint: true },
514
515
  _meta: { idempotent: "true" },
@@ -521,10 +522,10 @@ registerPluginTool("diviops_seo_provider_list", {
521
522
  };
522
523
  });
523
524
  registerPluginTool("diviops_seo_metadata_get", {
524
- description: "Read explicit and effective semantic SEO metadata for one provider-supported post. Free/core and explicit-metadata-only: caller-visible fields are fixed to seo_title and meta_description; no raw metadata keys or provider maps are accepted or returned. Requires edit_post before stored payload exposure. Returns exact explicit presence/value, effective provider output, deterministic checksum, provider lifecycle/capability evidence, canonical WordPress identity evidence, and cache status. Error codes include not_found, forbidden, seo.provider_absent, seo.provider_incompatible, seo.provider_unsupported, and seo.post_type_unsupported. Returns the standardized envelope.",
525
+ description: "Read explicit and effective semantic SEO metadata for one provider-supported post. Free/core and explicit-metadata-only: fields depend on provider: TSF seo_title/meta_description plus a separate indexing section on 5.1.4 pages, or Rank Math canonical_url/noindex; no raw metadata keys or provider maps are accepted or returned. Requires edit_post before stored payload exposure. Returns exact explicit presence/value, effective provider output, deterministic checksum, provider lifecycle/capability evidence, canonical WordPress identity evidence, and cache status. Error codes include not_found, forbidden, seo.provider_absent, seo.provider_incompatible, seo.provider_unsupported, and seo.post_type_unsupported. Returns the standardized envelope.",
525
526
  inputSchema: {
526
527
  post_id: z.number().int().positive().describe("WordPress post/page ID to inspect. Requires edit_post on this exact target."),
527
- provider: SEO_PROVIDER.optional().default("auto").describe("Provider selector. auto resolves only the active supported TSF adapter in V1."),
528
+ provider: SEO_PROVIDER.optional().default("auto").describe("Provider selector. auto refuses ambiguity when both providers are active."),
528
529
  },
529
530
  annotations: { idempotentHint: true },
530
531
  _meta: { idempotent: "true" },
@@ -1256,26 +1257,30 @@ registerPluginTool("diviops_meta_find_icon", {
1256
1257
  });
1257
1258
  // ── Write Tools ──────────────────────────────────────────────────────
1258
1259
  registerPluginTool("diviops_seo_metadata_update", {
1259
- description: "Update explicit TSF SEO metadata on one provider-supported post through the Free/core semantic contract. Explicit metadata only: changes is a strict one-or-two-item discriminated list for seo_title and meta_description; set requires a plain-text value and clear forbids one. Unknown properties, duplicate fields, HTML/markup, control or invalid UTF-8 bytes, serialized/non-scalar values, secret-like values, and unresolved Divi/global/provider/dynamic tokens are refused before mutation. Requires edit_post and expected_checksum; drift refuses before mutation with no force path. Uses TSF's public sanitize/write/clear lifecycle, exact stored readback, request-local rollback on error/mismatch, and reports before/after checksums, readback, lifecycle, cache, rollback, no-op, and write evidence. Effective output must be verified by a follow-up diviops_seo_metadata_get. No persistent snapshot, canonical override, robots, social, schema, redirect, bulk, cross-site, or automatic Divi extraction path exists." +
1260
+ description: "Update one page/post using fixed provider fields and expected_checksum. TSF retains seo_title/meta_description set/clear and its original top-level checksum. TSF 5.1.4 pages additionally support canonical_url set/clear and noindex set with value=noindex or reset_default without a value; use indexing.checksum from get for these operations and TSF restore. Do not mix text and indexing changes. TSF keeps unrelated robots defaults inherited and custom canonical URLs remain under noindex. Rank Math 1.0.279 supports canonical_url set/clear and noindex set with value='noindex' on pages; it preserves other robots directives and previews inherited defaults that become pinned. No generic robots arrays, force-index or noindex clear. reset_default is TSF-only. Both canonical/noindex adapters create a persistent typed recovery record before apply and return snapshot_id. To restore, omit changes and pass restore_snapshot_id with a fresh expected_checksum; restore refuses third-party changes and preserves untouched fields. Use dry_run to preview. Reads return provider-computed values, not verified frontend tags; Rank Math suppresses canonical output under noindex. TSF text-field persistent restore, other providers, social/schema/bulk edits are unsupported. Runtime qualification remains separate." +
1260
1261
  DRY_RUN_DESC_SUFFIX,
1261
1262
  inputSchema: {
1262
1263
  post_id: z.number().int().positive().describe("WordPress post/page ID to update. Requires edit_post on this exact target."),
1263
- provider: SEO_PROVIDER.optional().default("auto").describe("Provider selector. Use auto or tsf."),
1264
+ provider: SEO_PROVIDER.optional().default("auto").describe("Provider selector. Use auto, tsf, or rank_math."),
1264
1265
  expected_checksum: z
1265
1266
  .string()
1266
1267
  .regex(/^sha256:[a-f0-9]{64}$/)
1267
- .describe("Exact checksum returned by diviops_seo_metadata_get. Required; there is no force path."),
1268
- changes: SEO_CHANGES.describe("Strict semantic set/clear operations. Each field may appear at most once."),
1268
+ .describe("Checksum from get: indexing.checksum for TSF canonical/noindex or TSF restore; top-level checksum otherwise. No force path."),
1269
+ changes: SEO_CHANGES.optional().describe("Provide changes OR restore_snapshot_id. Rank Math noindex set value must be noindex."),
1270
+ restore_snapshot_id: z.string().regex(/^(?:rm|tsf)_[a-f0-9-]{36}$/).optional().describe("Restore one canonical/noindex operation for the selected provider; omit changes. Not a content snapshot."),
1269
1271
  dry_run: DRY_RUN_FIELD,
1270
1272
  },
1271
1273
  annotations: { idempotentHint: false },
1272
1274
  _meta: { idempotent: "conditional" },
1273
- }, async ({ post_id, provider, expected_checksum, changes, dry_run }) => {
1275
+ }, async ({ post_id, provider, expected_checksum, changes, restore_snapshot_id, dry_run }) => {
1274
1276
  const body = {
1275
1277
  provider: provider ?? "auto",
1276
1278
  expected_checksum,
1277
- changes,
1278
1279
  };
1280
+ if (changes !== undefined)
1281
+ body.changes = changes;
1282
+ if (restore_snapshot_id !== undefined)
1283
+ body.restore_snapshot_id = restore_snapshot_id;
1279
1284
  if (dry_run)
1280
1285
  body.dry_run = true;
1281
1286
  const result = await wp.requestEnveloped(`/seo/metadata/${post_id}`, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diviops/mcp-server",
3
- "version": "1.5.68",
3
+ "version": "1.5.70",
4
4
  "description": "MCP server exposing Divi 5 Visual Builder as tools for Claude",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",