@respira/wordpress-mcp-server 8.0.6 → 8.1.1
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 +1232 -0
- package/README.md +12 -3
- package/dist/__tests__/tools-list-protocol-smoke.test.js +21 -6
- package/dist/__tests__/tools-list-protocol-smoke.test.js.map +1 -1
- package/dist/acf-tools.d.ts +1 -1
- package/dist/acf-tools.d.ts.map +1 -1
- package/dist/bricks-tools.d.ts +1 -1
- package/dist/bricks-tools.d.ts.map +1 -1
- package/dist/elementor-tools.d.ts +1 -1
- package/dist/elementor-tools.d.ts.map +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +12 -7
- package/dist/server.js.map +1 -1
- package/dist/wordpress-client.js +1 -1
- package/dist/wordpress-client.js.map +1 -1
- package/package.json +8 -6
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>
|
|
10
|
+
<strong>197 MCP tools, 302 with the WooCommerce add-on. 16 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-
|
|
17
|
+
<img src="https://img.shields.io/badge/tools-302-10b981?style=flat-square" alt="302 Tools with WooCommerce">
|
|
18
18
|
<img src="https://img.shields.io/badge/builders-16-10b981?style=flat-square" alt="16 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>
|
|
@@ -35,7 +35,16 @@ Other WordPress MCP servers wrap the REST API. They can create posts and pages,
|
|
|
35
35
|
|
|
36
36
|
Respira includes a WordPress plugin that gives AI **native access** to 16 page builders, plus element-level precision, full page creation from structure, HTML-to-builder conversion, storefront design intelligence, stock image search, and bulk operations across hundreds of pages.
|
|
37
37
|
|
|
38
|
-
###
|
|
38
|
+
### New in 8.1: MCP 2026-07-28, without breaking existing clients
|
|
39
|
+
|
|
40
|
+
- **Modern protocol negotiation.** Compatible clients can use `server/discover` and negotiate MCP `2026-07-28`, including stateless per-request metadata and typed result contracts.
|
|
41
|
+
- **Legacy clients keep working.** Existing clients continue through the established `initialize` handshake and receive the same Respira tool catalog. Connection commands, site keys, and configuration files do not change.
|
|
42
|
+
- **Verified compatibility.** The release suite starts the packaged stdio server twice: once pinned to `2026-07-28`, and once as a legacy client. Both must initialize and enumerate the complete release catalog.
|
|
43
|
+
- **Patched runtime dependencies.** Axios, FormData, Sentry, and OpenTelemetry dependencies were updated; the production dependency audit reports zero known vulnerabilities.
|
|
44
|
+
|
|
45
|
+
Read the complete [changelog](./CHANGELOG.md).
|
|
46
|
+
|
|
47
|
+
### Shipped in 8.0: verified FSE and WooCommerce operations
|
|
39
48
|
|
|
40
49
|
- **First-class Site Editor tools.** Agents can list, inspect, create, target-update, and reset block templates and template parts; create and safely edit synced/unsynced patterns; and traverse native block navigation as exact nested paths. Every editable surface uses stale-write fingerprints, structural proposals, snapshots, compact diffs, cache invalidation, and truthful stored/rendered verification.
|
|
41
50
|
- **Native design-token tools.** Gutenberg `theme.json` colors, typography, and spacing variables are exposed through the existing WordPress storage model rather than a parallel token database.
|
|
@@ -2,9 +2,9 @@ import assert from 'node:assert/strict';
|
|
|
2
2
|
import { test } from 'node:test';
|
|
3
3
|
import { resolve } from 'node:path';
|
|
4
4
|
import { createServer } from 'node:http';
|
|
5
|
-
import { Client } from '@modelcontextprotocol/
|
|
6
|
-
import { StdioClientTransport } from '@modelcontextprotocol/
|
|
7
|
-
test('packaged stdio server
|
|
5
|
+
import { Client } from '@modelcontextprotocol/client';
|
|
6
|
+
import { StdioClientTransport } from '@modelcontextprotocol/client/stdio';
|
|
7
|
+
test('packaged stdio server negotiates MCP 2026-07-28 and enumerates the release tool catalog', { timeout: 20_000 }, async () => {
|
|
8
8
|
const wordpress = createServer((_request, response) => {
|
|
9
9
|
response.writeHead(200, { 'content-type': 'application/json' });
|
|
10
10
|
response.end(JSON.stringify({
|
|
@@ -35,7 +35,7 @@ test('packaged stdio server initializes and enumerates the release tool catalog'
|
|
|
35
35
|
}],
|
|
36
36
|
preferences: { autoDuplicate: true, securityChecks: true },
|
|
37
37
|
})).toString('base64');
|
|
38
|
-
const
|
|
38
|
+
const transportOptions = {
|
|
39
39
|
command: process.execPath,
|
|
40
40
|
args: [resolve(process.cwd(), 'dist/index.js')],
|
|
41
41
|
cwd: process.cwd(),
|
|
@@ -46,10 +46,14 @@ test('packaged stdio server initializes and enumerates the release tool catalog'
|
|
|
46
46
|
RESPIRA_USAGE_OPT_OUT: '1',
|
|
47
47
|
NODE_ENV: 'test',
|
|
48
48
|
},
|
|
49
|
-
}
|
|
50
|
-
const
|
|
49
|
+
};
|
|
50
|
+
const transport = new StdioClientTransport(transportOptions);
|
|
51
|
+
const client = new Client({ name: 'respira-release-smoke', version: '1.0.0' }, { versionNegotiation: { mode: { pin: '2026-07-28' } } });
|
|
51
52
|
try {
|
|
52
53
|
await client.connect(transport);
|
|
54
|
+
assert.equal(client.getProtocolEra(), 'modern');
|
|
55
|
+
assert.equal(client.getNegotiatedProtocolVersion(), '2026-07-28');
|
|
56
|
+
assert.ok(client.getDiscoverResult(), 'server/discover must return a modern discovery result');
|
|
53
57
|
const response = await client.listTools();
|
|
54
58
|
const names = new Set(response.tools.map((tool) => tool.name));
|
|
55
59
|
assert.ok(response.tools.length >= 250, `expected the full fail-open catalog, got ${response.tools.length}`);
|
|
@@ -69,6 +73,17 @@ test('packaged stdio server initializes and enumerates the release tool catalog'
|
|
|
69
73
|
]) {
|
|
70
74
|
assert.ok(names.has(required), `${required} must be advertised by the live MCP protocol`);
|
|
71
75
|
}
|
|
76
|
+
await client.close();
|
|
77
|
+
const legacyClient = new Client({ name: 'respira-legacy-release-smoke', version: '1.0.0' });
|
|
78
|
+
try {
|
|
79
|
+
await legacyClient.connect(new StdioClientTransport(transportOptions));
|
|
80
|
+
assert.equal(legacyClient.getProtocolEra(), 'legacy');
|
|
81
|
+
const legacyResponse = await legacyClient.listTools();
|
|
82
|
+
assert.equal(legacyResponse.tools.length, response.tools.length, 'legacy and modern clients must receive the same release tool catalog');
|
|
83
|
+
}
|
|
84
|
+
finally {
|
|
85
|
+
await legacyClient.close();
|
|
86
|
+
}
|
|
72
87
|
}
|
|
73
88
|
finally {
|
|
74
89
|
await client.close();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools-list-protocol-smoke.test.js","sourceRoot":"","sources":["../../src/__tests__/tools-list-protocol-smoke.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"tools-list-protocol-smoke.test.js","sourceRoot":"","sources":["../../src/__tests__/tools-list-protocol-smoke.test.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,E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,CAAC,KAAK,CAAC,YAAY,CAAC,cAAc,EAAE,EAAE,QAAQ,CAAC,CAAC;YACtD,MAAM,cAAc,GAAG,MAAM,YAAY,CAAC,SAAS,EAAE,CAAC;YACtD,MAAM,CAAC,KAAK,CACV,cAAc,CAAC,KAAK,CAAC,MAAM,EAC3B,QAAQ,CAAC,KAAK,CAAC,MAAM,EACrB,sEAAsE,CACvE,CAAC;QACJ,CAAC;gBAAS,CAAC;YACT,MAAM,YAAY,CAAC,KAAK,EAAE,CAAC;QAC7B,CAAC;IACH,CAAC;YAAS,CAAC;QACT,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;QACrB,MAAM,IAAI,OAAO,CAAO,CAAC,YAAY,EAAE,WAAW,EAAE,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC;IAClI,CAAC;AACH,CAAC,CAAC,CAAC"}
|
package/dist/acf-tools.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* @since 6.6.0
|
|
10
10
|
*/
|
|
11
|
-
import type { Tool } from '@modelcontextprotocol/
|
|
11
|
+
import type { Tool } from '@modelcontextprotocol/server';
|
|
12
12
|
/**
|
|
13
13
|
* Full ACF tool catalog. Imported by server.ts and pushed into getTools()
|
|
14
14
|
* when isAcfAvailable() is true.
|
package/dist/acf-tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acf-tools.d.ts","sourceRoot":"","sources":["../src/acf-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"acf-tools.d.ts","sourceRoot":"","sources":["../src/acf-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAEzD;;;GAGG;AACH,wBAAgB,WAAW,IAAI,IAAI,EAAE,CA8qBpC;AAED;;;GAGG;AACH,eAAO,MAAM,cAAc,aAuDzB,CAAC;AAEH;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAK9D"}
|
package/dist/bricks-tools.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bricks-tools.d.ts","sourceRoot":"","sources":["../src/bricks-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"bricks-tools.d.ts","sourceRoot":"","sources":["../src/bricks-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAEzD;;GAEG;AACH,wBAAgB,cAAc,IAAI,IAAI,EAAE,CAievC;AAED;;;;GAIG;AACH,wBAAsB,kBAAkB,CACtC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzB,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,GACrE,OAAO,CAAC,GAAG,CAAC,CAyHd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elementor-tools.d.ts","sourceRoot":"","sources":["../src/elementor-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"elementor-tools.d.ts","sourceRoot":"","sources":["../src/elementor-tools.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,8BAA8B,CAAC;AAEzD;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,IAAI,EAAE,CA4P1C;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACzB,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,OAAO,CAAC,GAAG,CAAC,GACrE,OAAO,CAAC,GAAG,CAAC,CA+Cd"}
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAgBH,OAAO,KAAK,EAAE,mBAAmB,EAAe,MAAM,kBAAkB,CAAC;AAsQzE,qBAAa,sBAAsB;IACjC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,WAAW,CAAgC;IACnD,OAAO,CAAC,KAAK,CAA2C;IACxD,OAAO,CAAC,aAAa,CAAuB;IAC5C,OAAO,CAAC,cAAc,CAAwB;IAC9C,OAAO,CAAC,YAAY,CAA4B;IAChD,8EAA8E;IAC9E,OAAO,CAAC,YAAY,CAA4B;IAChD,8EAA8E;IAC9E,OAAO,CAAC,mBAAmB,CAAS;IACpC,iFAAiF;IACjF,OAAO,CAAC,iBAAiB,CAAK;IAC9B,iFAAiF;IACjF,OAAO,CAAC,mBAAmB,CAAgC;IAE3D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAsB;IAEhE;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAWzB;;;OAGG;IACH,OAAO,CAAC,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C;IAEF;;;;OAIG;IACH,OAAO,CAAC,0BAA0B;YAmCpB,cAAc;IA4G5B,oEAAoE;IACpE,OAAO,CAAC,iBAAiB;IAoBzB;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,eAAe;YAuCT,gBAAgB;IA+0C9B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAkZzB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IA6UxB,GAAG;CA+CV"}
|
package/dist/server.js
CHANGED
|
@@ -3,9 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Provides tools for AI coding assistants to interact with WordPress sites
|
|
5
5
|
*/
|
|
6
|
-
import { Server } from '@modelcontextprotocol/
|
|
7
|
-
import {
|
|
8
|
-
import { CallToolRequestSchema, ListToolsRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
|
|
6
|
+
import { Server } from '@modelcontextprotocol/server';
|
|
7
|
+
import { serveStdio } from '@modelcontextprotocol/server/stdio';
|
|
9
8
|
import { execSync } from 'child_process';
|
|
10
9
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'fs';
|
|
11
10
|
import { homedir } from 'os';
|
|
@@ -1345,13 +1344,13 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
|
|
|
1345
1344
|
}
|
|
1346
1345
|
setupHandlers() {
|
|
1347
1346
|
// List available tools
|
|
1348
|
-
this.server.setRequestHandler(
|
|
1347
|
+
this.server.setRequestHandler('tools/list', async () => {
|
|
1349
1348
|
return {
|
|
1350
1349
|
tools: await this.getTools(),
|
|
1351
1350
|
};
|
|
1352
1351
|
});
|
|
1353
1352
|
// Handle tool calls
|
|
1354
|
-
this.server.setRequestHandler(
|
|
1353
|
+
this.server.setRequestHandler('tools/call', async (request) => {
|
|
1355
1354
|
const { name, arguments: args } = request.params;
|
|
1356
1355
|
// respira_redeem_token must work even before any site is configured —
|
|
1357
1356
|
// it's the bootstrap path that puts the first sites into the config.
|
|
@@ -8546,8 +8545,14 @@ Allowlist: css, scss, less, json. PHP / JS theme writes are intentionally out of
|
|
|
8546
8545
|
}));
|
|
8547
8546
|
}
|
|
8548
8547
|
async run() {
|
|
8549
|
-
|
|
8550
|
-
|
|
8548
|
+
// SDK 2's stdio serving entry owns the opening exchange. It selects
|
|
8549
|
+
// server/discover for MCP 2026-07-28 clients and the legacy initialize
|
|
8550
|
+
// handshake for older clients, then pins this configured server instance
|
|
8551
|
+
// to the connection.
|
|
8552
|
+
serveStdio(() => this.server, {
|
|
8553
|
+
legacy: 'serve',
|
|
8554
|
+
onerror: (error) => console.error('[respira-mcp] protocol error:', error.message),
|
|
8555
|
+
});
|
|
8551
8556
|
// v6.17: one-line bootstrap log so the customer can see whether this MCP
|
|
8552
8557
|
// came back after a Claude restart. Pre-v6.17 the only stderr line was
|
|
8553
8558
|
// "Respira WordPress MCP Server running on stdio" which didn't tell you
|