@respira/wordpress-mcp-server 8.3.16 → 8.3.18

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/CHANGELOG.md CHANGED
@@ -5,6 +5,30 @@ All notable changes to Respira WordPress MCP Server will be documented in this f
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [8.3.18] - 2026-09-03
9
+
10
+ ### Fixed
11
+ - **A save could arrive at WordPress as a read, and answer as one.** If a site
12
+ is reached on a URL that redirects, for example the bare host when WordPress
13
+ considers the www one canonical, every request met a 301. HTTP clients follow
14
+ a 301 by re-sending the request as a GET and discarding the body, so a write
15
+ arrived at a route's read handler with its payload gone. The reporter's
16
+ `save_design_direction` came back with "no design direction is active on this
17
+ site", an error only the read path can raise, which pointed at an entirely
18
+ different feature. Two different payloads produced identical errors, because
19
+ neither was ever delivered. A 301, 302 or 303 on a write is now refused
20
+ outright, naming the address the site redirected to and where to correct it.
21
+ 307 and 308 keep the method and the body, so those are still followed.
22
+ Reported by T.W.
23
+
24
+ ## [8.3.17] - 2026-08-30
25
+
26
+ The last open finding closes: the Divi Library, as tools.
27
+
28
+ ### Added
29
+
30
+ - **wordpress_save_divi_library_item and wordpress_apply_divi_library_item.** Save a page, one section of it, or a supplied structure as a real Divi Library item, then apply it to any page as a live-linked global reference: the page stores only the reference, Divi expands it at render, and editing the library item once updates every page that carries it. Repetition by referencing, not re-writing. Requires plugin 8.8.1, released alongside.
31
+
8
32
  ## [8.3.16] - 2026-08-29
9
33
 
10
34
  The half-answer in 8.3.15 becomes a whole one.
package/README.md CHANGED
@@ -7,14 +7,14 @@
7
7
  <h1 align="center">Respira WordPress MCP Server</h1>
8
8
 
9
9
  <p align="center">
10
- <strong>218 MCP tools, 323 with the WooCommerce add-on. 17 page builders and the native Site Editor. MCP 2026-07-28 with legacy-client support.</strong><br>
10
+ <strong>220 MCP tools, 325 with the WooCommerce add-on. 17 page builders and the native Site Editor. MCP 2026-07-28 with legacy-client support.</strong><br>
11
11
  Element-level editing, full page creation, HTML-to-builder conversion with rendering fidelity validation, per-site tool governance, storefront design intelligence, stock images, bulk operations — all through one MCP server.
12
12
  </p>
13
13
 
14
14
  <p align="center">
15
15
  <a href="https://www.npmjs.com/package/@respira/wordpress-mcp-server"><img src="https://img.shields.io/npm/v/@respira/wordpress-mcp-server.svg?style=flat-square&color=10b981" alt="npm version"></a>
16
16
  <a href="https://www.npmjs.com/package/@respira/wordpress-mcp-server"><img src="https://img.shields.io/npm/dm/@respira/wordpress-mcp-server.svg?style=flat-square" alt="npm downloads"></a>
17
- <img src="https://img.shields.io/badge/tools-323-10b981?style=flat-square" alt="323 Tools with WooCommerce">
17
+ <img src="https://img.shields.io/badge/tools-325-10b981?style=flat-square" alt="325 Tools with WooCommerce">
18
18
  <img src="https://img.shields.io/badge/builders-17-10b981?style=flat-square" alt="17 Page Builders">
19
19
  <img src="https://img.shields.io/badge/TypeScript-100%25-blue?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript">
20
20
  </p>
@@ -247,7 +247,7 @@ Or run the interactive setup wizard: `npx @respira/wordpress-mcp-server --setup`
247
247
 
248
248
  ### Tool Limit? Use `enabledTools`
249
249
 
250
- Some MCP clients (Antigravity, etc.) have a hard limit on active tools (often 100). Respira can expose up to 323 tools when the WooCommerce add-on is active. To stay under the limit, add `enabledTools` to your config — only those tools will appear in the listing:
250
+ Some MCP clients (Antigravity, etc.) have a hard limit on active tools (often 100). Respira can expose up to 325 tools when the WooCommerce add-on is active. To stay under the limit, add `enabledTools` to your config — only those tools will appear in the listing:
251
251
 
252
252
  ```json
253
253
  {
@@ -856,6 +856,6 @@ MIT © [Respira](https://respira.press)
856
856
  ---
857
857
 
858
858
  <p align="center">
859
- <strong>218 core tools, 323 with WooCommerce. 17 builders. The AI infrastructure layer for WordPress.</strong><br>
859
+ <strong>220 core tools, 325 with WooCommerce. 17 builders. The AI infrastructure layer for WordPress.</strong><br>
860
860
  <a href="https://respira.press">respira.press</a>
861
861
  </p>
package/SOUL.md CHANGED
@@ -4,9 +4,29 @@ This file is the persona and rules of engagement for any AI agent that touches t
4
4
 
5
5
  ## Identity
6
6
 
7
- Respira for WordPress is built by Mihai Dragomirescu, solo founder in Brașov, Romania. Respira is Romanian for "breathe." The product is an AI-native infrastructure layer that gives coding agents safe, structured access to live WordPress sites across twelve page builders. There is no team. There is no marketing department. There is no support tier. There is one builder who ships in public and treats every customer as a peer who happens to be busy.
7
+ Respira for WordPress is built by Mihai Dragomirescu, solo founder in Brașov, Romania. Respira is Romanian for "breathe." The product is an AI-native infrastructure layer that gives coding agents safe, structured access to live WordPress sites across every major page builder. There is no team. There is no marketing department. There is no support tier. There is one builder who ships in public and treats every customer as a peer who happens to be busy.
8
8
 
9
- The solo-founder fact matters because it sets the expectations. Never say "we" or "our team." When you don't know something, say so. When something is on the roadmap but not built, say "i haven't shipped that yet." When something fails, own it and propose the next probe. Customers paying €59 a year for software built by one person are not buying enterprise polish. They are buying directness, real fixes, and a builder who actually answers.
9
+ The solo-founder fact matters because it sets the expectations. Never say "we" or "our team." When you don't know something, say so. When something is on the roadmap but not built, say "i haven't shipped that yet." When something fails, own it and propose the next probe. Customers paying for software built by one person are not buying enterprise polish. They are buying directness, real fixes, and a builder who actually answers.
10
+
11
+ ## Numbers
12
+
13
+ This file ships inside the npm package and cannot import anything, so it must
14
+ never carry a count or a price. Both go stale silently: it said "twelve page
15
+ builders" long after the answer was seventeen, and carried a yearly price that
16
+ no longer matched the pricing page. A competitor's comparison page was later
17
+ published using numbers in that range.
18
+
19
+ When a number is needed, read it at the time from the source of truth:
20
+
21
+ - tools, abilities, skills: `product-website/src/data/tool-counts.ts`, which is
22
+ generated from `respira-versions.json`
23
+ - page builders: `SUPPORTED_BUILDER_COUNT` in
24
+ `product-website/src/data/supported-builders.ts`
25
+ - prices: the live Polar catalog, never a figure remembered from a page
26
+
27
+ Say "every major page builder" rather than a count you cannot verify as you
28
+ speak. If a customer needs the exact figure, look it up and quote it with the
29
+ date you checked.
10
30
 
11
31
  ## Voice
12
32
 
@@ -48,6 +68,7 @@ What agents always and never do.
48
68
  - **Never edit theme PHP, `wp_postmeta`, or the WordPress database directly.** All edits go through the builder-native tools. If the customer asks for a direct edit, refuse and explain why the safer path produces the same outcome.
49
69
  - **Always pass `site_id` per call in Cowork and multi-site contexts.** Switching context silently is how cross-site mistakes happen.
50
70
  - **Always read `inline_schemas` before injecting WPBakery, Uncode, or Visual Composer shortcodes.** The schemas are the contract. Guessing produces broken output.
71
+ - **Repeat by referencing, never by re-writing.** When the same section belongs on several Divi pages, save it once with `respira_save_divi_library_item` and apply it with `respira_apply_divi_library_item`; edit the item, every page updates. Eight pasted copies means eight edits on day ninety and a design that drifts. Same principle for styling: put shared design decisions in presets (`respira_upsert_divi_presets`), not repeated inline attributes.
51
72
  - **When the customer asks for a preview link to a staged change, quote `preview_url`, never the plain page url.** Every duplicate and staged write returns a signed `preview_url` (and repeats it in the response message): it renders that one draft to anyone, no WordPress login, and dies when the change is rejected. The plain `url` field is login-gated while the post is a draft, so handing it to a client is handing them a 404.
52
73
  - **When stuck: retry once with the structured hint, then run `respira_diagnose_connection`, then ASK the customer if they want to file a bug via `respira_report_issue`.** Never auto-file. The customer decides what to surface.
53
74
  - **Beautiful, accurate, fast.** Every output is judged on three axes in this order. Beautiful means it reads well and the page renders well. Accurate means it does exactly what was asked. Fast means it consumed the minimum tokens necessary.
package/TOOL_CATALOG.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  <!-- Generated by scripts/check-tool-registry-parity.mjs. Do not edit by hand. -->
4
4
 
5
- Generated catalog: **191 core tools**, **105 WooCommerce tools**, **296 total**.
5
+ Generated catalog: **193 core tools**, **105 WooCommerce tools**, **298 total**.
6
6
 
7
7
  The runtime applies site context and per-site governance, so an individual connection may expose a smaller relevant subset.
8
8
 
@@ -23,6 +23,7 @@ The runtime applies site context and per-site governance, so an individual conne
23
23
  - `wordpress_apply_accessibility_fixes` — write; hosted/stdio
24
24
  - `wordpress_apply_builder_patch` — write; native + hosted
25
25
  - `wordpress_apply_design_direction` — write; native + hosted
26
+ - `wordpress_apply_divi_library_item` — write; hosted/stdio
26
27
  - `wordpress_assign_menu_location` — write; native + hosted
27
28
  - `wordpress_batch_update` — write; native + hosted
28
29
  - `wordpress_begin_session` — read; hosted/stdio
@@ -164,6 +165,7 @@ The runtime applies site context and per-site governance, so an individual conne
164
165
  - `wordpress_run_pagespeed_audit` — read; hosted/stdio
165
166
  - `wordpress_run_security_audit` — read; native + hosted
166
167
  - `wordpress_save_design_direction` — write; native + hosted
168
+ - `wordpress_save_divi_library_item` — write; hosted/stdio
167
169
  - `wordpress_scan_page_accessibility` — read; hosted/stdio
168
170
  - `wordpress_search_abilities` — read; native + hosted
169
171
  - `wordpress_search_docs` — read; hosted/stdio
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=1b0eda46-write-redirect-downgrade.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1b0eda46-write-redirect-downgrade.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/1b0eda46-write-redirect-downgrade.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * A 301 on a write must not be followed.
3
+ *
4
+ * Ticket 1b0eda46: a site served on the non-canonical host 301'd every request
5
+ * to the www host. HTTP clients follow 301/302/303 by rewriting the request to
6
+ * GET and dropping the body, so `respira_save_design_direction` (a POST)
7
+ * arrived at WordPress as a GET. WordPress dispatched the route's READABLE
8
+ * callback and returned `respira_direction_none_active`, a 404 that only the
9
+ * READ path can raise, which made the save tool look broken in a way that
10
+ * pointed at an entirely different feature. Two different payloads gave
11
+ * identical errors because neither was ever delivered.
12
+ *
13
+ * 307 and 308 preserve method and body, so they stay followed.
14
+ */
15
+ import { test } from 'node:test';
16
+ import assert from 'node:assert/strict';
17
+ import { guardAgainstMethodDowngrade } from '../wordpress-client.js';
18
+ const makeGuard = (method) => guardAgainstMethodDowngrade(method);
19
+ const redirect = (statusCode, location) => ({
20
+ statusCode,
21
+ headers: { location },
22
+ });
23
+ test('a 301 on a POST is refused, naming the target and the cause', () => {
24
+ const guard = makeGuard('post');
25
+ assert.throws(() => guard({}, redirect(301, 'https://www.example.edu/wp-json/respira/v2/design-direction')), (err) => {
26
+ assert.equal(err.code, 'respira_write_redirect_downgrade');
27
+ assert.match(err.message, /silently become a read/i);
28
+ assert.match(err.message, /www\.example\.edu/);
29
+ assert.match(err.message, /Site Address/i, 'must say how to fix it');
30
+ return true;
31
+ });
32
+ });
33
+ test('302 and 303 on a write are refused too', () => {
34
+ for (const status of [302, 303]) {
35
+ assert.throws(() => makeGuard('put')({}, redirect(status, 'https://www.example.edu/x')), /redirect/i, `${status} should be refused on a write`);
36
+ }
37
+ });
38
+ test('307 and 308 are followed, because they preserve method and body', () => {
39
+ for (const status of [307, 308]) {
40
+ assert.doesNotThrow(() => makeGuard('post')({}, redirect(status, 'https://www.example.edu/x')), `${status} preserves the method and must still be followed`);
41
+ }
42
+ });
43
+ test('reads are never blocked, whatever the status', () => {
44
+ for (const method of ['get', 'head', 'options']) {
45
+ for (const status of [301, 302, 303, 307, 308]) {
46
+ assert.doesNotThrow(() => makeGuard(method)({}, redirect(status, 'https://www.example.edu/x')), `${method.toUpperCase()} ${status} must not be blocked`);
47
+ }
48
+ }
49
+ });
50
+ test('a non-redirect response passes straight through', () => {
51
+ assert.doesNotThrow(() => makeGuard('post')({}, { statusCode: 200, headers: {} }));
52
+ });
53
+ test('both axios instances install the guard', async () => {
54
+ const { readFileSync } = await import('node:fs');
55
+ const { fileURLToPath } = await import('node:url');
56
+ const { dirname, join } = await import('node:path');
57
+ const here = dirname(fileURLToPath(import.meta.url));
58
+ const src = readFileSync(join(here, '..', '..', 'src', 'wordpress-client.ts'), 'utf8');
59
+ const installs = src.match(/beforeRedirect = guardAgainstMethodDowngrade/g) || [];
60
+ assert.equal(installs.length, 2, 'client and rootClient must both be guarded');
61
+ });
62
+ //# sourceMappingURL=1b0eda46-write-redirect-downgrade.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"1b0eda46-write-redirect-downgrade.test.js","sourceRoot":"","sources":["../../src/__tests__/1b0eda46-write-redirect-downgrade.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAErE,MAAM,SAAS,GAAG,CAAC,MAAc,EAAE,EAAE,CAAC,2BAA2B,CAAC,MAAM,CAAC,CAAC;AAE1E,MAAM,QAAQ,GAAG,CAAC,UAAkB,EAAE,QAAgB,EAAE,EAAE,CAAC,CAAC;IAC1D,UAAU;IACV,OAAO,EAAE,EAAE,QAAQ,EAAE;CACtB,CAAC,CAAC;AAEH,IAAI,CAAC,6DAA6D,EAAE,GAAG,EAAE;IACvE,MAAM,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;IAChC,MAAM,CAAC,MAAM,CACX,GAAG,EAAE,CAAC,KAAK,CAAC,EAAE,EAAE,QAAQ,CAAC,GAAG,EAAE,6DAA6D,CAAC,CAAC,EAC7F,CAAC,GAAQ,EAAE,EAAE;QACX,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,kCAAkC,CAAC,CAAC;QAC3D,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,yBAAyB,CAAC,CAAC;QACrD,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,mBAAmB,CAAC,CAAC;QAC/C,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,eAAe,EAAE,wBAAwB,CAAC,CAAC;QACrE,OAAO,IAAI,CAAC;IACd,CAAC,CACF,CAAC;AACJ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C,QAAQ,CAAC,qBAAqB,CAe3C;IAEF;;;;OAIG;IACH,OAAO,CAAC,0BAA0B;YAmCpB,cAAc;IA8H5B,oEAAoE;IACpE,OAAO,CAAC,iBAAiB;IAoBzB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,eAAe;YAuCT,gBAAgB;IAggD9B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAsgBzB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAkWxB,GAAG;CA+CV"}
package/dist/server.js CHANGED
@@ -2258,6 +2258,53 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
2258
2258
  openWorldHint: false,
2259
2259
  },
2260
2260
  },
2261
+ {
2262
+ name: 'wordpress_save_divi_library_item',
2263
+ description: 'Save a page, ONE section of it (section_index), or a supplied node structure as a Divi Library item (et_pb_layout). ' +
2264
+ 'The item gets full Divi identity (layout_type + scope terms, builder metas, VB marker) so the next person can edit it in Divi\'s own library UI. ' +
2265
+ 'Returns layout_id plus the ready-to-paste global reference block. Requires plugin 8.8.1+.',
2266
+ inputSchema: {
2267
+ type: 'object',
2268
+ properties: {
2269
+ name: { type: 'string', description: 'Library item name.' },
2270
+ page_id: { type: 'number', description: 'Source page/post to save from.' },
2271
+ section_index: { type: 'number', description: 'Zero-based top-level block index to save just one section.' },
2272
+ structure: { description: 'Alternative to page_id: node array (or block markup string) to save.' },
2273
+ layout_type: { type: 'string', enum: ['layout', 'section', 'row', 'module'], description: 'Item kind, default section.' },
2274
+ global: { type: 'boolean', description: 'Global scope (live-linked when applied). Default true.' },
2275
+ category: { type: 'string', description: 'Optional layout_category term.' },
2276
+ },
2277
+ required: ['name'],
2278
+ },
2279
+ annotations: {
2280
+ title: 'Save Divi Library Item',
2281
+ readOnlyHint: false,
2282
+ destructiveHint: false,
2283
+ idempotentHint: false,
2284
+ openWorldHint: false,
2285
+ },
2286
+ },
2287
+ {
2288
+ name: 'wordpress_apply_divi_library_item',
2289
+ description: 'Apply a Divi Library item to a page as a LIVE-LINKED global reference: the page stores only `wp:divi/global-layout {"globalModule":"<id>"}` and Divi expands it at render, so editing the library item once updates every page that references it. ' +
2290
+ 'The write rides the normal update path: duplicate-first safety, snapshots, and the share preview link all apply. Requires plugin 8.8.1+.',
2291
+ inputSchema: {
2292
+ type: 'object',
2293
+ properties: {
2294
+ layout_id: { type: 'number', description: 'Library item id (from wordpress_save_divi_library_item).' },
2295
+ id: { type: 'number', description: 'Target page/post id.' },
2296
+ position: { type: 'string', enum: ['append', 'prepend'], description: 'Where the reference lands, default append.' },
2297
+ },
2298
+ required: ['layout_id', 'id'],
2299
+ },
2300
+ annotations: {
2301
+ title: 'Apply Divi Library Item',
2302
+ readOnlyHint: false,
2303
+ destructiveHint: false,
2304
+ idempotentHint: false,
2305
+ openWorldHint: false,
2306
+ },
2307
+ },
2261
2308
  {
2262
2309
  name: 'wordpress_resolve_divi_preset',
2263
2310
  description: 'Preview what a Divi 5 preset would apply: returns the resolved attribute groups for a `_presetId` without writing anything. ' +
@@ -9577,6 +9624,18 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
9577
9624
  return await client.deleteDiviPreset(args.preset_id);
9578
9625
  case 'wordpress_resolve_divi_preset':
9579
9626
  return await client.resolveDiviPreset(args.preset_id, args.module_type);
9627
+ case 'wordpress_save_divi_library_item':
9628
+ return await client.saveDiviLibraryItem({
9629
+ name: args.name,
9630
+ page_id: args.page_id,
9631
+ section_index: args.section_index,
9632
+ structure: args.structure,
9633
+ layout_type: args.layout_type,
9634
+ global: args.global,
9635
+ category: args.category,
9636
+ });
9637
+ case 'wordpress_apply_divi_library_item':
9638
+ return await client.applyDiviLibraryItem(args.layout_id, args.id, args.position);
9580
9639
  case 'wordpress_abilities_gap_report':
9581
9640
  return await client.getAbilitiesGapReport();
9582
9641
  case 'wordpress_search_abilities':