@respira/wordpress-mcp-server 5.4.2 → 5.5.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/README.md CHANGED
@@ -14,7 +14,7 @@
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-125-10b981?style=flat-square" alt="125 Tools">
17
+ <img src="https://img.shields.io/badge/tools-172-10b981?style=flat-square" alt="172 Tools">
18
18
  <img src="https://img.shields.io/badge/builders-11-10b981?style=flat-square" alt="11 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>
@@ -461,6 +461,39 @@ Respira works with the official WordPress AI stack:
461
461
 
462
462
  ---
463
463
 
464
+ ## Quick Install
465
+
466
+ Three paths — pick the one that matches how you work.
467
+
468
+ ### One-command install (recommended)
469
+
470
+ ```bash
471
+ npx add-mcp "npx -y @respira/wordpress-mcp-server"
472
+ ```
473
+
474
+ Auto-detects your AI tool (Claude Code, Cursor, Windsurf, Codex, and 9+ more) and writes the correct config file. Powered by [add-mcp](https://github.com/neondatabase/add-mcp).
475
+
476
+ After running, set your environment variables:
477
+ ```bash
478
+ # In your shell profile or .env
479
+ export WORDPRESS_URL="https://yoursite.com"
480
+ export WORDPRESS_API_KEY="respira_your_key"
481
+ ```
482
+
483
+ ### Interactive setup wizard
484
+
485
+ ```bash
486
+ npx @respira/wordpress-mcp-server --setup
487
+ ```
488
+
489
+ Walks you through site URL, API key, HTTP auth (for staging sites), and connection testing. Saves config to `~/.respira/config.json`.
490
+
491
+ ### Manual configuration
492
+
493
+ See the [Quick Start](#quick-start-3-minutes) section above for per-tool JSON config examples (Cursor, Claude Code, Claude Desktop, Windsurf).
494
+
495
+ ---
496
+
464
497
  ## Installation Options
465
498
 
466
499
  ### NPX (Recommended)
@@ -480,13 +513,16 @@ respira-wordpress-mcp
480
513
  ```
481
514
 
482
515
  ### CLI Options
483
- ```bash
484
- npx @respira/wordpress-mcp-server --setup # Setup wizard
485
- npx @respira/wordpress-mcp-server --list # List configured sites
486
- npx @respira/wordpress-mcp-server --test # Test connection
487
- npx @respira/wordpress-mcp-server --stdio # STDIO transport (MCP Adapter)
488
- npx @respira/wordpress-mcp-server --help # Help
489
- ```
516
+
517
+ | Flag | Alias | Description |
518
+ |---|---|---|
519
+ | `--setup` | | Interactive setup wizard |
520
+ | `--list` | | List configured sites |
521
+ | `--test` | | Test connection |
522
+ | `--stdio` | | STDIO transport (MCP Adapter) |
523
+ | `--doctor` | `-d` | Run health diagnostics |
524
+ | `--doctor --json` | | Health diagnostics as JSON |
525
+ | `--help` | | Help |
490
526
 
491
527
  ### Environment Variables
492
528
  ```bash
@@ -496,6 +532,24 @@ export WP_API_KEY=respira_your-api-key
496
532
 
497
533
  ---
498
534
 
535
+ ## Health Check
536
+
537
+ Verify your setup is working end-to-end:
538
+
539
+ ```bash
540
+ npx @respira/wordpress-mcp-server --doctor
541
+ ```
542
+
543
+ Checks Node.js version, config file, site connectivity, plugin version, API compatibility, and available updates. Reports pass/fail for each check with actionable messages.
544
+
545
+ ```bash
546
+ npx @respira/wordpress-mcp-server --doctor --json
547
+ ```
548
+
549
+ Machine-readable output for CI/CD pipelines or AI tool diagnostics.
550
+
551
+ ---
552
+
499
553
  ## Troubleshooting
500
554
 
501
555
  <details>
@@ -550,6 +604,19 @@ Report vulnerabilities to security@respira.press.
550
604
 
551
605
  ---
552
606
 
607
+ ## Where to Find Respira
608
+
609
+ | Directory | Listing |
610
+ |---|---|
611
+ | **npm** | [`@respira/wordpress-mcp-server`](https://www.npmjs.com/package/@respira/wordpress-mcp-server) |
612
+ | **Official MCP Registry** | `io.github.webmyc/respira-wordpress` |
613
+ | **Smithery** | [smithery.ai](https://smithery.ai) |
614
+ | **Glama** | [glama.ai/mcp/servers](https://glama.ai/mcp/servers) |
615
+ | **mcp.so** | [mcp.so](https://mcp.so) |
616
+ | **cursor.directory** | [cursor.directory](https://cursor.directory) |
617
+
618
+ ---
619
+
553
620
  ## License
554
621
 
555
622
  MIT © [Respira](https://respira.press)
@@ -557,6 +624,6 @@ MIT © [Respira](https://respira.press)
557
624
  ---
558
625
 
559
626
  <p align="center">
560
- <strong>147 tools. 11 builders. The AI infrastructure layer for WordPress.</strong><br>
627
+ <strong>172 tools. 11 builders. The AI infrastructure layer for WordPress.</strong><br>
561
628
  <a href="https://respira.press">respira.press</a>
562
629
  </p>
package/dist/index.js CHANGED
@@ -75,28 +75,33 @@ async function startStdioMode() {
75
75
  }
76
76
  async function startMcpServer() {
77
77
  // Import dependencies only when starting MCP server
78
- const Sentry = await import('@sentry/node');
78
+ let Sentry = null;
79
+ try {
80
+ Sentry = await import('@sentry/node');
81
+ Sentry.init({
82
+ dsn: 'https://7932b5b04df142fcec3b11a590c86541@o4510381871333376.ingest.de.sentry.io/4510386268209232',
83
+ environment: process.env.NODE_ENV || 'production',
84
+ tracesSampleRate: 0.2,
85
+ // Disable profiling — native module often missing on user machines
86
+ profilesSampleRate: 0,
87
+ beforeSend(event) {
88
+ if (process.env.NODE_ENV === 'development')
89
+ return null;
90
+ const msg = event.exception?.values?.[0]?.value || '';
91
+ if (msg.includes('EPIPE') || msg.includes('broken pipe'))
92
+ return null;
93
+ // Don't report Sentry's own module loading errors
94
+ if (msg.includes('sentry_cpu_profiler') || msg.includes('Cannot find module'))
95
+ return null;
96
+ return event;
97
+ },
98
+ });
99
+ }
100
+ catch {
101
+ // Sentry init failed (missing native modules, etc.) — continue without telemetry
102
+ }
79
103
  const { RespiraWordPressServer } = await import('./server.js');
80
104
  const { loadConfig } = await import('./config.js');
81
- // Initialize Sentry with hardcoded DSN
82
- // All MCP server installations report to this Sentry project
83
- Sentry.init({
84
- dsn: 'https://7932b5b04df142fcec3b11a590c86541@o4510381871333376.ingest.de.sentry.io/4510386268209232',
85
- environment: process.env.NODE_ENV || 'production',
86
- tracesSampleRate: 0.2,
87
- beforeSend(event) {
88
- // Don't send from local development
89
- if (process.env.NODE_ENV === 'development') {
90
- return null;
91
- }
92
- // EPIPE when client disconnects is expected - don't report
93
- const msg = event.exception?.values?.[0]?.value || '';
94
- if (msg.includes('EPIPE') || msg.includes('broken pipe')) {
95
- return null;
96
- }
97
- return event;
98
- },
99
- });
100
105
  setupEpipeHandler();
101
106
  try {
102
107
  // Load configuration
@@ -112,8 +117,7 @@ async function startMcpServer() {
112
117
  if (errorStack) {
113
118
  console.error(errorStack);
114
119
  }
115
- // Capture exception in Sentry
116
- Sentry.captureException(error);
120
+ Sentry?.captureException(error);
117
121
  process.exit(1);
118
122
  }
119
123
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;GAGG;AAEH;;;GAGG;AACH,SAAS,iBAAiB;IACxB,OAAO,CAAC,EAAE,CAAC,mBAAmB,EAAE,CAAC,GAA0B,EAAE,EAAE;QAC7D,IAAI,GAAG,CAAC,IAAI,KAAK,OAAO,IAAI,CAAC,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,CAAC;YAC3E,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,OAAO,CAAC,KAAK,CAAC,qBAAqB,EAAE,GAAG,CAAC,CAAC;QAC1C,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC;AAED,8CAA8C;AAC9C,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAA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,CAAC,aAAa,CAAC,CAAC;IAC/D,MAAM,EAAE,UAAU,EAAE,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,CAAC;IAEnD,iBAAiB,EAAE,CAAC;IAEpB,IAAI,CAAC;QACH,qBAAqB;QACrB,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;QAE5B,wBAAwB;QACxB,MAAM,MAAM,GAAG,IAAI,sBAAsB,CAAC,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;QAC1F,MAAM,MAAM,CAAC,GAAG,EAAE,CAAC;IACrB,CAAC;IAAC,OAAO,KAAU,EAAE,CAAC;QACpB,MAAM,YAAY,GAAG,KAAK,EAAE,OAAO,IAAI,KAAK,EAAE,QAAQ,EAAE,IAAI,MAAM,CAAC,KAAK,CAAC,IAAI,eAAe,CAAC;QAC7F,MAAM,UAAU,GAAG,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,YAAY,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACjE,OAAO,CAAC,KAAK,CAAC,cAAc,EAAE,YAAY,CAAC,CAAC;QAC5C,IAAI,UAAU,EAAE,CAAC;YACf,OAAO,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC;QAC5B,CAAC;QAED,MAAM,EAAE,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAEhC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
package/dist/server.d.ts CHANGED
@@ -13,6 +13,8 @@ export declare class RespiraWordPressServer {
13
13
  private enabledTools;
14
14
  /** RESPIRA_SITES env var: restrict visible sites to a subset of hostnames. */
15
15
  private allowedSites;
16
+ /** Whether the plugin version warning has already been shown this session. */
17
+ private versionWarningShown;
16
18
  private static readonly MCP_SERVER_VERSION;
17
19
  /**
18
20
  * Normalize a tool name: respira_* → wordpress_* for switch dispatch.
@@ -33,6 +35,11 @@ export declare class RespiraWordPressServer {
33
35
  private setupHandlers;
34
36
  private attachUpdateNotice;
35
37
  private appendUpdateNoticeToError;
38
+ /**
39
+ * Append the plugin version compatibility warning to the first successful tool
40
+ * response per session. Subsequent calls are no-ops (warning shown once only).
41
+ */
42
+ private attachVersionWarning;
36
43
  private getTools;
37
44
  private isWooCommerceAddonAvailable;
38
45
  private getWooCommerceTools;
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAYH,OAAO,KAAK,EAAE,mBAAmB,EAAe,MAAM,kBAAkB,CAAC;AAEzE,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;IAEhD,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAW;IAErD;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAWzB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;gBA4Bb,WAAW,EAAE,mBAAmB,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE;IAyOvE,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,oBAAoB;IAQ5B,gEAAgE;IAChE,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,eAAe;IAmBvB,OAAO,CAAC,aAAa;YAoHP,kBAAkB;YA6BlB,yBAAyB;YASzB,QAAQ;YAy4DR,2BAA2B;IAazC,OAAO,CAAC,mBAAmB;YAwTb,cAAc;YAoBd,gBAAgB;IAqiB9B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAoQzB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IA6UxB,GAAG;CAKV"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAYH,OAAO,KAAK,EAAE,mBAAmB,EAAe,MAAM,kBAAkB,CAAC;AAEzE,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;IAEpC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,kBAAkB,CAAW;IAErD;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAWzB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;gBA4Bb,WAAW,EAAE,mBAAmB,EAAE,EAAE,YAAY,CAAC,EAAE,MAAM,EAAE;IAyOvE,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,oBAAoB;IAQ5B,gEAAgE;IAChE,OAAO,CAAC,aAAa;IAUrB,OAAO,CAAC,eAAe;IAmBvB,OAAO,CAAC,aAAa;YAqHP,kBAAkB;YA6BlB,yBAAyB;IASvC;;;OAGG;IACH,OAAO,CAAC,oBAAoB;YAyBd,QAAQ;YAy4DR,2BAA2B;IAazC,OAAO,CAAC,mBAAmB;YAwTb,cAAc;YAoBd,gBAAgB;IAqiB9B;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAoQzB;;OAEG;IACH,OAAO,CAAC,sBAAsB;IA6UxB,GAAG;CAKV"}
package/dist/server.js CHANGED
@@ -18,7 +18,9 @@ export class RespiraWordPressServer {
18
18
  enabledTools = null;
19
19
  /** RESPIRA_SITES env var: restrict visible sites to a subset of hostnames. */
20
20
  allowedSites = null;
21
- static MCP_SERVER_VERSION = '5.4.0';
21
+ /** Whether the plugin version warning has already been shown this session. */
22
+ versionWarningShown = false;
23
+ static MCP_SERVER_VERSION = '5.5.1';
22
24
  /**
23
25
  * Normalize a tool name: respira_* → wordpress_* for switch dispatch.
24
26
  * Tracks whether the deprecated wordpress_* name was used.
@@ -339,11 +341,12 @@ Use respira_get_builder_info first to detect which builder is active. Then use t
339
341
  this.currentSite.setCurrentToolName(null);
340
342
  const resultWithSite = this.withSiteContext(result);
341
343
  const resultWithNotice = await this.attachUpdateNotice(resultWithSite);
344
+ const resultWithVersionWarning = this.attachVersionWarning(resultWithNotice);
342
345
  return {
343
346
  content: [
344
347
  {
345
348
  type: 'text',
346
- text: JSON.stringify(resultWithNotice, null, 2),
349
+ text: JSON.stringify(resultWithVersionWarning, null, 2),
347
350
  },
348
351
  ],
349
352
  };
@@ -468,6 +471,30 @@ Use respira_get_builder_info first to detect which builder is active. Then use t
468
471
  }
469
472
  return `${errorMessage}\n\nUpdate available: ${update.currentVersion} -> ${update.latestVersion}. Run: npm i -g @respira/wordpress-mcp-server@latest`;
470
473
  }
474
+ /**
475
+ * Append the plugin version compatibility warning to the first successful tool
476
+ * response per session. Subsequent calls are no-ops (warning shown once only).
477
+ */
478
+ attachVersionWarning(result) {
479
+ if (this.versionWarningShown) {
480
+ return result;
481
+ }
482
+ const warning = this.currentSite?.getVersionWarning() ?? null;
483
+ if (!warning) {
484
+ return result;
485
+ }
486
+ this.versionWarningShown = true;
487
+ if (result && typeof result === 'object' && !Array.isArray(result)) {
488
+ return {
489
+ ...result,
490
+ respira_version_notice: warning,
491
+ };
492
+ }
493
+ return {
494
+ result,
495
+ respira_version_notice: warning,
496
+ };
497
+ }
471
498
  async getTools() {
472
499
  // Type assertion needed because SDK 1.24+ may have different hint property names
473
500
  // These hints are optional metadata and don't affect functionality