@respira/wordpress-mcp-server 2.0.6 → 2.0.8

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
@@ -8,81 +8,90 @@
8
8
 
9
9
  <p align="center">
10
10
  <strong>The only WordPress MCP with page builder support.</strong><br>
11
- Edit Divi, Elementor, Bricks + 7 more builders with AI. Duplicate-before-edit safety. SEO analysis. 60+ tools.
11
+ Edit Divi, Elementor, Bricks & 7 more builders with Cursor, Claude Code & Windsurf.
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=blue" 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
- <a href="https://github.com/webmyc/respira-wordpress"><img src="https://img.shields.io/github/stars/webmyc/respira-wordpress?style=flat-square" alt="GitHub stars"></a>
18
- <a href="https://respira.press"><img src="https://img.shields.io/badge/website-respira.press-purple?style=flat-square" alt="Website"></a>
17
+ <img src="https://img.shields.io/badge/page%20builders-10-green?style=flat-square" alt="10 Page Builders">
18
+ <img src="https://img.shields.io/badge/tools-60%2B-purple?style=flat-square" alt="60+ Tools">
19
+ <img src="https://img.shields.io/badge/TypeScript-100%25-blue?style=flat-square&logo=typescript&logoColor=white" alt="TypeScript">
20
+ <a href="https://respira.press"><img src="https://img.shields.io/badge/website-respira.press-orange?style=flat-square" alt="Website"></a>
19
21
  </p>
20
22
 
21
23
  <p align="center">
22
24
  <a href="https://respira.press">Website</a> •
23
- <a href="https://respira.press/docs">Documentation</a> •
24
- <a href="https://respira.press/support">Support</a> •
25
- <a href="https://github.com/webmyc/respira-wordpress">GitHub</a>
25
+ <a href="https://respira.press/documentation">Documentation</a> •
26
+ <a href="https://respira.press/releases">Download Plugin</a> •
27
+ <a href="https://respira.press/support">Support</a>
26
28
  </p>
27
29
 
28
30
  ---
29
31
 
30
32
  ## Why Respira?
31
33
 
32
- Most WordPress MCP servers only work with Gutenberg. **Respira is the only MCP that supports real page builders** the tools that power 50%+ of WordPress sites.
34
+ **Other WordPress MCP servers** use basic REST API calls. They can create posts and pages, but **they can't touch your page builder content**.
35
+
36
+ **Respira** includes a WordPress plugin that gives AI **deep access** to your page builders:
37
+
38
+ | Feature | Respira | Other MCP Servers |
39
+ |---------|---------|-------------------|
40
+ | **Page Builder Support** | 10 builders | None |
41
+ | Edit Divi modules | 200+ module types | - |
42
+ | Edit Elementor widgets | Full support | - |
43
+ | Edit Bricks elements | Full support | - |
44
+ | Module-level updates | By path or label | - |
45
+ | **Safety Features** | | |
46
+ | Duplicate-before-edit | Yes | No |
47
+ | Live page protection | Yes | No |
48
+ | Approval workflow | Yes | No |
49
+ | **Analysis Tools** | | |
50
+ | SEO Analysis | Yes | No |
51
+ | Core Web Vitals | Yes | No |
52
+ | AEO (AI Search Optimization) | Yes | No |
53
+ | Readability scoring | Yes | No |
54
+ | **Multilingual** | | |
55
+ | WPML support | Yes | No |
56
+ | Menu translations | Yes | No |
57
+
58
+ ### Supported Page Builders
33
59
 
34
- ### Feature Comparison
35
-
36
- | Feature | Respira | mcp-wordpress | wordpress-mcp |
37
- |---------|---------|---------------|---------------|
38
- | **Divi Builder** (200+ modules) | ✅ | ❌ | ❌ |
39
- | **Elementor** (widgets, templates) | ✅ | ❌ | ❌ |
40
- | **Bricks Builder** | ✅ | ❌ | ❌ |
41
- | **Oxygen Builder** | ✅ | ❌ | ❌ |
42
- | **WPBakery / Visual Composer** | ✅ | ❌ | ❌ |
43
- | **Beaver Builder** | ✅ | ❌ | ❌ |
44
- | **Thrive Architect** | ✅ | ❌ | ❌ |
45
- | **Brizy** | ✅ | ❌ | ❌ |
46
- | Gutenberg (Block Editor) | ✅ | ✅ | ✅ |
47
- | Duplicate-before-edit safety | ✅ | ❌ | ❌ |
48
- | SEO analysis tools | ✅ | ❌ | ❌ |
49
- | Performance / Core Web Vitals | ✅ | ❌ | ❌ |
50
- | AI Engine Optimization (AEO) | ✅ | ❌ | ❌ |
51
- | Menu management (full CRUD) | ✅ | ❌ | Limited |
52
- | Media upload & management | ✅ | ✅ | ✅ |
53
- | WPML multilingual support | ✅ | ❌ | ❌ |
54
- | Multi-site switching | ✅ | ❌ | ❌ |
55
- | Plugin management | ✅ | ❌ | ❌ |
56
- | **Total tools** | **60+** | ~15 | ~20 |
57
-
58
- ### What Makes Respira Different
59
-
60
- 1. **Page Builder Intelligence** — AI understands Divi sections, Elementor widgets, Bricks elements. Not just raw HTML.
61
-
62
- 2. **Duplicate-Before-Edit Safety** — Respira creates a duplicate before editing any live page. Review changes in WordPress admin before they go live. Your production site is never touched until you approve.
63
-
64
- 3. **SEO & Performance Analysis** — Built-in tools for comprehensive SEO audits, Core Web Vitals, and AI Engine Optimization (AEO) for ChatGPT/Perplexity visibility.
60
+ <p align="center">
61
+ <img src="https://img.shields.io/badge/Divi-200%2B%20modules-purple?style=for-the-badge" alt="Divi">
62
+ <img src="https://img.shields.io/badge/Elementor-Full%20Support-92003B?style=for-the-badge" alt="Elementor">
63
+ <img src="https://img.shields.io/badge/Bricks-Full%20Support-orange?style=for-the-badge" alt="Bricks">
64
+ <img src="https://img.shields.io/badge/Oxygen-Full%20Support-00D084?style=for-the-badge" alt="Oxygen">
65
+ </p>
65
66
 
66
- 4. **Module-Level Precision** — Update a specific Divi module or Elementor widget by its admin label or path, without touching the rest of the page.
67
+ - **Divi** - All 200+ modules with nested content
68
+ - **Elementor** - Widgets, sections, containers
69
+ - **Bricks** - Elements and nestable layouts
70
+ - **Oxygen** - Components and dynamic data
71
+ - **Gutenberg** - Core blocks
72
+ - **Beaver Builder** - Modules and rows
73
+ - **WPBakery** - Elements and templates
74
+ - **Visual Composer** - Elements and layouts
75
+ - **Brizy** - Blocks and elements
76
+ - **Thrive Architect** - Elements and templates
67
77
 
68
78
  ---
69
79
 
70
- ## Quick Start (2 Minutes)
80
+ ## Quick Start (3 Minutes)
71
81
 
72
- ### Step 1: Install the WordPress Plugin
82
+ ### Step 1: Install WordPress Plugin
73
83
 
74
- 1. Download from [respira.press](https://respira.press)
75
- 2. Upload to WordPress: **Plugins Add New Upload Plugin**
76
- 3. Activate and go to **Respira API Keys**
84
+ 1. Download from [respira.press/releases](https://respira.press/releases)
85
+ 2. Upload to WordPress: **Plugins > Add New > Upload Plugin**
86
+ 3. Activate and go to **Respira > API Keys**
77
87
  4. Generate your API key (starts with `respira_`)
78
88
 
79
- ### Step 2: Configure Your AI Assistant
89
+ ### Step 2: Configure Your AI Tool
80
90
 
81
91
  <details>
82
92
  <summary><b>Cursor</b></summary>
83
93
 
84
- Create or edit `.cursor/mcp.json` in your project:
85
-
94
+ Create `.cursor/mcp.json` in your project:
86
95
  ```json
87
96
  {
88
97
  "mcpServers": {
@@ -99,8 +108,7 @@ Create or edit `.cursor/mcp.json` in your project:
99
108
  <details>
100
109
  <summary><b>Claude Code</b></summary>
101
110
 
102
- Add to your Claude Code config (`~/.claude.json` or project settings):
103
-
111
+ Add to `~/.claude.json`:
104
112
  ```json
105
113
  {
106
114
  "mcpServers": {
@@ -118,7 +126,6 @@ Add to your Claude Code config (`~/.claude.json` or project settings):
118
126
  <summary><b>Windsurf</b></summary>
119
127
 
120
128
  Add to your Windsurf MCP configuration:
121
-
122
129
  ```json
123
130
  {
124
131
  "mcpServers": {
@@ -136,7 +143,6 @@ Add to your Windsurf MCP configuration:
136
143
  <summary><b>Claude Desktop</b></summary>
137
144
 
138
145
  Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
139
-
140
146
  ```json
141
147
  {
142
148
  "mcpServers": {
@@ -150,10 +156,9 @@ Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS)
150
156
 
151
157
  </details>
152
158
 
153
- ### Step 3: Create Config File
159
+ ### Step 3: Add Your Site
154
160
 
155
161
  Create `~/.respira/config.json`:
156
-
157
162
  ```json
158
163
  {
159
164
  "sites": [
@@ -161,157 +166,77 @@ Create `~/.respira/config.json`:
161
166
  "id": "my-site",
162
167
  "name": "My WordPress Site",
163
168
  "url": "https://yoursite.com",
164
- "apiKey": "respira_your-api-key-here",
169
+ "apiKey": "respira_your-api-key",
165
170
  "default": true
166
171
  }
167
172
  ]
168
173
  }
169
174
  ```
170
175
 
171
- **That's it!** Restart your AI assistant and start editing.
172
-
173
- ---
174
-
175
- ## Page Builder Support
176
-
177
- ### Divi Builder
178
- - 200+ module types supported
179
- - Section, row, and module-level editing
180
- - Update by admin label: `"Find the module labeled 'Hero CTA' and change the button text"`
181
- - Preserves all Divi styling and settings
182
-
183
- ### Elementor
184
- - Widget-level precision editing
185
- - Template and section support
186
- - CSS cache regeneration after updates
187
- - Compatible with Elementor Pro
188
-
189
- ### Other Builders
190
- - **Bricks** — Elements and containers
191
- - **Oxygen** — Components and templates
192
- - **WPBakery** — Shortcode-based editing
193
- - **Beaver Builder** — Modules and rows
194
- - **Thrive Architect** — Elements and templates
195
- - **Brizy** — Blocks and elements
196
- - **Visual Composer** — Elements and grids
176
+ **Done!** Restart your AI tool and start editing.
197
177
 
198
178
  ---
199
179
 
200
- ## Safe Editing Workflow
180
+ ## Safe Editing (Unique to Respira)
201
181
 
202
- Respira never edits your live pages directly:
182
+ Unlike other MCP servers that edit live pages directly, Respira:
203
183
 
204
- 1. AI requests a page update
205
- 2. Respira **creates a duplicate** of the page
206
- 3. AI edits the duplicate
207
- 4. You **review changes** in WordPress admin
208
- 5. One-click to approve and replace the original
184
+ 1. **Creates a duplicate** before any edit
185
+ 2. **Preserves the original** untouched
186
+ 3. **Lets you preview** changes before going live
187
+ 4. **Approve in WordPress** when ready
209
188
 
210
- Go to **Respira Approve Edits** to review pending changes.
189
+ Your live site is never at risk.
211
190
 
212
191
  ---
213
192
 
214
- ## Available Tools (60+)
193
+ ## 60+ Tools
215
194
 
216
- ### Content Management
217
- | Tool | Description |
218
- |------|-------------|
219
- | `wordpress_list_pages` | List all pages |
220
- | `wordpress_read_page` | Get page content with builder data |
221
- | `wordpress_update_page` | Update page (auto-creates duplicate) |
222
- | `wordpress_create_page_duplicate` | Manually create safe duplicate |
223
- | `wordpress_list_posts` | List all posts |
224
- | `wordpress_read_post` | Get post content |
225
- | `wordpress_update_post` | Update post content |
226
-
227
- ### Page Builders
228
- | Tool | Description |
195
+ ### Page Builder Tools
196
+ | Tool | What it does |
229
197
  |------|-------------|
230
- | `wordpress_get_builder_info` | Get available modules/widgets for detected builder |
231
- | `wordpress_extract_builder_content` | Extract structured content (sections, rows, modules) |
232
- | `wordpress_inject_builder_content` | Inject structured builder content |
233
- | `wordpress_update_module` | Update specific module by admin_label or path |
198
+ | `wordpress_get_builder_info` | Get all available modules/widgets for the active builder |
199
+ | `wordpress_extract_builder_content` | Extract structured builder content from any page |
200
+ | `wordpress_inject_builder_content` | Replace entire page content with new builder data |
201
+ | `wordpress_update_module` | Update ONE specific module by path or label |
234
202
 
235
- ### Media Management
236
- | Tool | Description |
203
+ ### Content Management
204
+ | Tool | What it does |
237
205
  |------|-------------|
238
- | `wordpress_list_media` | List all media files |
239
- | `wordpress_upload_media` | Upload images, videos, documents |
240
- | `wordpress_update_media` | Update alt text, title, caption |
241
- | `wordpress_delete_media` | Delete media files |
206
+ | `wordpress_list_pages` | List all pages with builder detection |
207
+ | `wordpress_read_page` | Get page with full structured content |
208
+ | `wordpress_update_page` | Update page (creates safe duplicate first) |
209
+ | `wordpress_create_page_duplicate` | Manually create working copy |
242
210
 
243
211
  ### Menu Management
244
- | Tool | Description |
212
+ | Tool | What it does |
245
213
  |------|-------------|
246
214
  | `wordpress_list_menus` | List all navigation menus |
247
- | `wordpress_get_menu` | Get menu with all items |
248
- | `wordpress_create_menu` | Create new menu |
249
- | `wordpress_update_menu` | Update menu structure |
250
- | `wordpress_list_menu_locations` | List theme menu locations |
251
- | `wordpress_assign_menu_location` | Assign menu to location |
252
- | `wordpress_create_menu_item` | Add menu item |
253
- | `wordpress_update_menu_item` | Update menu item |
254
-
255
- ### SEO & Performance
256
- | Tool | Description |
215
+ | `wordpress_get_menu` | Get menu with all items & hierarchy |
216
+ | `wordpress_create_menu` | Create new navigation menu |
217
+ | `wordpress_create_menu_item` | Add item to any menu |
218
+ | `wordpress_assign_menu_location` | Assign menu to theme location |
219
+
220
+ ### Analysis Tools
221
+ | Tool | What it does |
257
222
  |------|-------------|
258
- | `wordpress_analyze_seo` | Comprehensive SEO analysis with recommendations |
259
- | `wordpress_check_seo_issues` | Quick SEO issue checker |
260
- | `wordpress_analyze_performance` | Performance metrics and bottlenecks |
223
+ | `wordpress_analyze_seo` | Full SEO audit with actionable recommendations |
224
+ | `wordpress_analyze_performance` | Page speed & optimization suggestions |
261
225
  | `wordpress_get_core_web_vitals` | LCP, FID, CLS scores |
262
- | `wordpress_analyze_aeo` | AI search engine optimization (ChatGPT, Perplexity) |
263
- | `wordpress_check_structured_data` | Schema markup validation |
264
- | `wordpress_analyze_images` | Image optimization opportunities |
265
- | `wordpress_analyze_readability` | Content readability scores |
226
+ | `wordpress_analyze_aeo` | AI search engine optimization check |
227
+ | `wordpress_analyze_readability` | Flesch score, sentence analysis |
266
228
 
267
- ### Users & Comments
268
- | Tool | Description |
269
- |------|-------------|
270
- | `wordpress_list_users` | List all users |
271
- | `wordpress_create_user` | Create new user |
272
- | `wordpress_update_user` | Update user details |
273
- | `wordpress_list_comments` | List comments |
274
- | `wordpress_create_comment` | Create comment |
275
- | `wordpress_update_comment` | Update/moderate comment |
276
-
277
- ### Taxonomies & Terms
278
- | Tool | Description |
279
- |------|-------------|
280
- | `wordpress_list_taxonomies` | List all taxonomies |
281
- | `wordpress_list_terms` | List terms in taxonomy |
282
- | `wordpress_create_term` | Create category/tag/term |
283
- | `wordpress_update_term` | Update term |
229
+ ### Media, Users, Taxonomies, Plugins
284
230
 
285
- ### Custom Post Types
286
- | Tool | Description |
287
- |------|-------------|
288
- | `wordpress_list_post_types` | List registered CPTs |
289
- | `wordpress_list_custom_posts` | List CPT entries |
290
- | `wordpress_create_custom_post` | Create CPT entry |
291
- | `wordpress_update_custom_post` | Update CPT entry |
231
+ Full CRUD operations for all WordPress content types.
292
232
 
293
- ### Plugin Management (Experimental)
294
- | Tool | Description |
295
- |------|-------------|
296
- | `wordpress_list_plugins` | List installed plugins |
297
- | `wordpress_install_plugin` | Install from WordPress.org |
298
- | `wordpress_activate_plugin` | Activate plugin |
299
- | `wordpress_deactivate_plugin` | Deactivate plugin |
300
- | `wordpress_update_plugin` | Update to latest version |
301
-
302
- ### Site Context
303
- | Tool | Description |
304
- |------|-------------|
305
- | `wordpress_get_site_context` | Get site info, theme, plugins, builders |
306
- | `wordpress_get_theme_docs` | Get theme documentation |
307
- | `wordpress_switch_site` | Switch to different site (multi-site) |
233
+ [Full Tool Reference](https://respira.press/documentation/tools)
308
234
 
309
235
  ---
310
236
 
311
237
  ## Multi-Site Support
312
238
 
313
239
  Manage multiple WordPress sites from one config:
314
-
315
240
  ```json
316
241
  {
317
242
  "sites": [
@@ -332,74 +257,118 @@ Manage multiple WordPress sites from one config:
332
257
  }
333
258
  ```
334
259
 
335
- Switch sites with: `wordpress_switch_site`
260
+ Switch sites with `wordpress_switch_site`.
336
261
 
337
262
  ---
338
263
 
339
264
  ## WPML Multilingual Support
340
265
 
341
- Full support for WPML multilingual sites:
342
- - Menu translations
343
- - Page/post language detection
344
- - Translation links
266
+ Full support for multilingual WordPress sites:
267
+ - Detect content language automatically
268
+ - Access all translations
269
+ - Menu translations with language codes
345
270
  - Language-aware content queries
346
271
 
347
272
  ---
348
273
 
349
- ## Windows Troubleshooting
274
+ ## Troubleshooting
350
275
 
351
- If you see `'npx' is not recognized`:
352
-
353
- ### Option 1: Use Full Path (Recommended)
276
+ ### Windows: 'npx' not recognized
354
277
 
278
+ **Option 1:** Use full path to npx:
355
279
  ```json
356
280
  {
357
- "mcpServers": {
358
- "respira-wordpress": {
359
- "command": "C:\\Program Files\\nodejs\\npx.cmd",
360
- "args": ["-y", "@respira/wordpress-mcp-server"]
361
- }
362
- }
281
+ "command": "C:\\Program Files\\nodejs\\npx.cmd",
282
+ "args": ["-y", "@respira/wordpress-mcp-server"]
363
283
  }
364
284
  ```
365
285
 
366
- ### Option 2: Install Globally
367
-
286
+ **Option 2:** Install globally first:
368
287
  ```bash
369
288
  npm install -g @respira/wordpress-mcp-server
370
289
  ```
371
290
 
372
291
  Then use:
373
-
374
292
  ```json
375
293
  {
376
- "mcpServers": {
377
- "respira-wordpress": {
378
- "command": "respira-wordpress-mcp"
379
- }
380
- }
294
+ "command": "respira-wordpress-mcp"
381
295
  }
382
296
  ```
383
297
 
298
+ ### Connection Failed
299
+
300
+ 1. Check your API key in WordPress > Respira > API Keys
301
+ 2. Verify your site URL includes `https://`
302
+ 3. Make sure the Respira plugin is activated
303
+ 4. Check if your hosting blocks REST API requests
304
+
305
+ ### Tools Not Showing in AI Tool
306
+
307
+ 1. Restart your AI tool completely (quit and reopen)
308
+ 2. Verify config file JSON syntax (use a JSON validator)
309
+ 3. Check the config file is in the correct location
310
+ 4. Make sure you saved the file after editing
311
+
312
+ ### "Page not found" Errors
313
+
314
+ 1. The page ID might be wrong - use `wordpress_list_pages` first
315
+ 2. Check if the page is in trash
316
+ 3. Verify your API key has access to that page
317
+
384
318
  ---
385
319
 
386
- ## Environment Variables
320
+ ## Installation Options
321
+
322
+ ### NPX (Recommended)
323
+ ```bash
324
+ npx -y @respira/wordpress-mcp-server
325
+ ```
326
+
327
+ ### Smithery (MCP Package Manager)
328
+ ```bash
329
+ npx -y @smithery/cli install @respira/wordpress-mcp-server --client claude
330
+ ```
331
+
332
+ ### Interactive Setup Wizard
333
+ ```bash
334
+ npx @respira/wordpress-mcp-server --setup
335
+ ```
387
336
 
388
- Instead of config file, use `.env`:
337
+ This wizard will:
338
+ - Guide you through configuration step by step
339
+ - Validate your WordPress URL and API key
340
+ - Test your connection before saving
341
+ - Generate the config file automatically
342
+ - Show you what to add to your AI tool
389
343
 
344
+ ### Global Install
390
345
  ```bash
391
- WP_SITE_URL=https://your-site.com
392
- WP_API_KEY=respira_your-api-key
346
+ npm install -g @respira/wordpress-mcp-server
347
+ respira-wordpress-mcp
348
+ ```
349
+
350
+ ### CLI Options
351
+ ```bash
352
+ npx @respira/wordpress-mcp-server --setup # Run setup wizard
353
+ npx @respira/wordpress-mcp-server --list # List configured sites
354
+ npx @respira/wordpress-mcp-server --test # Test default site connection
355
+ npx @respira/wordpress-mcp-server --help # Show help
356
+ ```
357
+
358
+ ### Environment Variables (Alternative to config file)
359
+ ```bash
360
+ export WP_SITE_URL=https://your-site.com
361
+ export WP_API_KEY=respira_your-api-key
393
362
  ```
394
363
 
395
364
  ---
396
365
 
397
- ## Need Help?
366
+ ## Links
398
367
 
399
- - [Documentation](https://respira.press/docs)
368
+ - [Website](https://respira.press)
369
+ - [Documentation](https://respira.press/documentation)
370
+ - [Download Plugin](https://respira.press/releases)
400
371
  - [Support](https://respira.press/support)
401
- - [Report Issues](https://github.com/webmyc/respira-wordpress/issues)
402
- - [Contact](mailto:support@respira.press)
403
372
 
404
373
  ---
405
374
 
@@ -410,6 +379,6 @@ MIT © [Respira](https://respira.press)
410
379
  ---
411
380
 
412
381
  <p align="center">
413
- <strong>Built for the WordPress community</strong><br>
414
- <a href="https://respira.press">respira.press</a>
382
+ <strong>The only WordPress MCP with page builder support.</strong><br>
383
+ Built for WordPress developers who use AI.
415
384
  </p>
package/dist/index.d.ts CHANGED
@@ -3,5 +3,7 @@
3
3
  * Respira WordPress MCP Server
4
4
  * Entry point
5
5
  */
6
- export {};
6
+ declare const args: string[];
7
+ declare const isSetupCommand: boolean;
8
+ declare function startMcpServer(): Promise<void>;
7
9
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;GAGG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;GAGG;AAGH,QAAA,MAAM,IAAI,UAAwB,CAAC;AACnC,QAAA,MAAM,cAAc,SAQC,CAAC;AAetB,iBAAe,cAAc,kBA4C5B"}
package/dist/index.js CHANGED
@@ -1,31 +1,54 @@
1
1
  #!/usr/bin/env node
2
+ "use strict";
2
3
  /**
3
4
  * Respira WordPress MCP Server
4
5
  * Entry point
5
6
  */
6
- import * as Sentry from '@sentry/node';
7
- import { nodeProfilingIntegration } from '@sentry/profiling-node';
8
- import { RespiraWordPressServer } from './server.js';
9
- import { loadConfig } from './config.js';
10
- // Initialize Sentry with hardcoded DSN
11
- // All MCP server installations report to this Sentry project
12
- Sentry.init({
13
- dsn: 'https://7932b5b04df142fcec3b11a590c86541@o4510381871333376.ingest.de.sentry.io/4510386268209232',
14
- environment: process.env.NODE_ENV || 'production',
15
- tracesSampleRate: 0.2,
16
- profilesSampleRate: 0.2,
17
- integrations: [
18
- nodeProfilingIntegration(),
19
- ],
20
- beforeSend(event) {
21
- // Don't send from local development
22
- if (process.env.NODE_ENV === 'development') {
23
- return null;
24
- }
25
- return event;
26
- },
27
- });
28
- async function main() {
7
+ // Handle CLI flags before starting MCP server
8
+ const args = process.argv.slice(2);
9
+ const isSetupCommand = args.includes('--setup') ||
10
+ args.includes('-s') ||
11
+ args.includes('--list') ||
12
+ args.includes('-l') ||
13
+ args.includes('--test') ||
14
+ args.includes('-t') ||
15
+ args.includes('--help') ||
16
+ args.includes('-h');
17
+ if (isSetupCommand) {
18
+ // Dynamically import and run setup module
19
+ import('./setup.js').then(({ handleSetupCli }) => {
20
+ handleSetupCli().catch((err) => {
21
+ console.error('Setup error:', err);
22
+ process.exit(1);
23
+ });
24
+ });
25
+ }
26
+ else {
27
+ // Normal MCP server startup
28
+ startMcpServer();
29
+ }
30
+ async function startMcpServer() {
31
+ // Import dependencies only when starting MCP server
32
+ const Sentry = await import('@sentry/node');
33
+ const { nodeProfilingIntegration } = await import('@sentry/profiling-node');
34
+ const { RespiraWordPressServer } = await import('./server.js');
35
+ const { loadConfig } = await import('./config.js');
36
+ // Initialize Sentry with hardcoded DSN
37
+ // All MCP server installations report to this Sentry project
38
+ Sentry.init({
39
+ dsn: 'https://7932b5b04df142fcec3b11a590c86541@o4510381871333376.ingest.de.sentry.io/4510386268209232',
40
+ environment: process.env.NODE_ENV || 'production',
41
+ tracesSampleRate: 0.2,
42
+ profilesSampleRate: 0.2,
43
+ integrations: [nodeProfilingIntegration()],
44
+ beforeSend(event) {
45
+ // Don't send from local development
46
+ if (process.env.NODE_ENV === 'development') {
47
+ return null;
48
+ }
49
+ return event;
50
+ },
51
+ });
29
52
  try {
30
53
  // Load configuration
31
54
  const config = loadConfig();
@@ -45,5 +68,4 @@ async function main() {
45
68
  process.exit(1);
46
69
  }
47
70
  }
48
- main();
49
71
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;GAGG;AAEH,OAAO,KAAK,MAAM,MAAM,cAAc,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,uCAAuC;AACvC,6DAA6D;AAC7D,MAAM,CAAC,IAAI,CAAC;IACV,GAAG,EAAE,iGAAiG;IACtG,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,QAAQ,IAAI,YAAY;IACjD,gBAAgB,EAAE,GAAG;IACrB,kBAAkB,EAAE,GAAG;IACvB,YAAY,EAAE;QACZ,wBAAwB,EAAE;KAC3B;IACD,UAAU,CAAC,KAAwB;QACjC,oCAAoC;QACpC,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE,CAAC;YAC3C,OAAO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AK;YACd,oCAAoC;YACpC,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE,CAAC;gBAC3C,OAAO,IAAI,CAAC;YACd,CAAC;YACD,OAAO,KAAK,CAAC;QACf,CAAC;KACF,CAAC,CAAC;IAEH,IAAI,CAAC;QACH,qBAAqB;QACrB,MAAM,MAAM,GAAG,UAAU,EAAE,CAAC;QAE5B,wBAAwB;QACxB,MAAM,MAAM,GAAG,IAAI,sBAAsB,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACxD,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,8BAA8B;QAC9B,MAAM,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC;QAE/B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
package/dist/server.js CHANGED
@@ -14,7 +14,7 @@ export class RespiraWordPressServer {
14
14
  constructor(siteConfigs) {
15
15
  this.server = new Server({
16
16
  name: 'respira-wordpress',
17
- version: '2.0.6',
17
+ version: '2.0.8',
18
18
  }, {
19
19
  capabilities: {
20
20
  tools: {},
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Respira WordPress MCP Server - Interactive Setup Wizard
4
+ *
5
+ * Run with: npm run setup
6
+ * Or: npx @respira/wordpress-mcp-server --setup
7
+ */
8
+ export declare function handleSetupCli(): Promise<boolean>;
9
+ //# sourceMappingURL=setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":";AAEA;;;;;GAKG;AA+VH,wBAAsB,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC,CAwBvD"}
package/dist/setup.js ADDED
@@ -0,0 +1,338 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * Respira WordPress MCP Server - Interactive Setup Wizard
4
+ *
5
+ * Run with: npm run setup
6
+ * Or: npx @respira/wordpress-mcp-server --setup
7
+ */
8
+ import * as fs from 'fs';
9
+ import * as path from 'path';
10
+ import * as readline from 'readline';
11
+ import * as os from 'os';
12
+ const CONFIG_DIR = path.join(os.homedir(), '.respira');
13
+ const CONFIG_FILE = path.join(CONFIG_DIR, 'config.json');
14
+ // ANSI colors
15
+ const c = {
16
+ reset: '\x1b[0m',
17
+ bold: '\x1b[1m',
18
+ dim: '\x1b[2m',
19
+ green: '\x1b[32m',
20
+ yellow: '\x1b[33m',
21
+ blue: '\x1b[34m',
22
+ cyan: '\x1b[36m',
23
+ red: '\x1b[31m',
24
+ magenta: '\x1b[35m',
25
+ };
26
+ function print(msg, color = '') {
27
+ console.log(`${color}${msg}${c.reset}`);
28
+ }
29
+ function printBanner() {
30
+ console.log('');
31
+ print('╔════════════════════════════════════════════════════════════╗', c.cyan);
32
+ print('║ ║', c.cyan);
33
+ print('║ Respira WordPress MCP Server ║', c.cyan);
34
+ print('║ Setup Wizard ║', c.cyan);
35
+ print('║ ║', c.cyan);
36
+ print('║ The only WordPress MCP with page builder support ║', c.cyan);
37
+ print('║ ║', c.cyan);
38
+ print('╚════════════════════════════════════════════════════════════╝', c.cyan);
39
+ console.log('');
40
+ }
41
+ async function prompt(rl, question, defaultVal) {
42
+ const hint = defaultVal ? ` ${c.dim}(${defaultVal})${c.reset}` : '';
43
+ return new Promise((resolve) => {
44
+ rl.question(`${c.green}?${c.reset} ${question}${hint}: `, (answer) => {
45
+ resolve(answer.trim() || defaultVal || '');
46
+ });
47
+ });
48
+ }
49
+ async function confirm(rl, question, defaultYes = true) {
50
+ const hint = defaultYes ? '[Y/n]' : '[y/N]';
51
+ return new Promise((resolve) => {
52
+ rl.question(`${c.green}?${c.reset} ${question} ${c.dim}${hint}${c.reset}: `, (answer) => {
53
+ if (!answer.trim())
54
+ resolve(defaultYes);
55
+ else
56
+ resolve(answer.toLowerCase().startsWith('y'));
57
+ });
58
+ });
59
+ }
60
+ function validateUrl(url) {
61
+ try {
62
+ const parsed = new URL(url);
63
+ return parsed.protocol === 'http:' || parsed.protocol === 'https:';
64
+ }
65
+ catch {
66
+ return false;
67
+ }
68
+ }
69
+ function validateApiKey(key) {
70
+ return key.startsWith('respira_') && key.length > 20;
71
+ }
72
+ function slugify(name) {
73
+ return name.toLowerCase().replace(/[^a-z0-9]+/g, '-').replace(/^-|-$/g, '').substring(0, 30);
74
+ }
75
+ function loadConfig() {
76
+ try {
77
+ if (fs.existsSync(CONFIG_FILE)) {
78
+ return JSON.parse(fs.readFileSync(CONFIG_FILE, 'utf-8'));
79
+ }
80
+ }
81
+ catch { }
82
+ return null;
83
+ }
84
+ function saveConfig(config) {
85
+ if (!fs.existsSync(CONFIG_DIR)) {
86
+ fs.mkdirSync(CONFIG_DIR, { recursive: true });
87
+ }
88
+ fs.writeFileSync(CONFIG_FILE, JSON.stringify(config, null, 2));
89
+ }
90
+ async function testConnection(url, apiKey) {
91
+ print(' Testing connection...', c.dim);
92
+ try {
93
+ const endpoint = `${url.replace(/\/$/, '')}/wp-json/respira/v1/context/site-info`;
94
+ const response = await fetch(endpoint, {
95
+ headers: {
96
+ 'X-Respira-API-Key': apiKey,
97
+ 'Content-Type': 'application/json',
98
+ },
99
+ signal: AbortSignal.timeout(10000),
100
+ });
101
+ if (response.ok) {
102
+ const data = await response.json();
103
+ return { ok: true, siteName: data.data?.site_name };
104
+ }
105
+ return { ok: false, error: `${response.status} ${response.statusText}` };
106
+ }
107
+ catch (err) {
108
+ return { ok: false, error: err instanceof Error ? err.message : 'Unknown error' };
109
+ }
110
+ }
111
+ async function addSite(rl, existingSites) {
112
+ console.log('');
113
+ // Name
114
+ const name = await prompt(rl, 'Site name (e.g., "My Blog")', 'My WordPress Site');
115
+ if (!name) {
116
+ print(' Site name is required', c.red);
117
+ return null;
118
+ }
119
+ // Generate unique ID
120
+ let id = slugify(name);
121
+ if (existingSites.some(s => s.id === id)) {
122
+ id = `${id}-${Date.now().toString(36).slice(-4)}`;
123
+ }
124
+ // URL
125
+ let url = '';
126
+ while (!validateUrl(url)) {
127
+ url = await prompt(rl, 'WordPress site URL');
128
+ if (!validateUrl(url)) {
129
+ print(' Enter a valid URL starting with http:// or https://', c.red);
130
+ }
131
+ }
132
+ url = url.replace(/\/$/, '');
133
+ // API Key
134
+ console.log('');
135
+ print(' Get your API key from: WordPress > Respira > API Keys', c.dim);
136
+ print(' Need the plugin? Download from: respira.press/releases', c.dim);
137
+ console.log('');
138
+ let apiKey = '';
139
+ while (!validateApiKey(apiKey)) {
140
+ apiKey = await prompt(rl, 'Respira API key');
141
+ if (!validateApiKey(apiKey)) {
142
+ print(' API key should start with "respira_"', c.red);
143
+ }
144
+ }
145
+ // Test connection
146
+ const shouldTest = await confirm(rl, 'Test connection now?', true);
147
+ if (shouldTest) {
148
+ const result = await testConnection(url, apiKey);
149
+ if (result.ok) {
150
+ print(` Connected to: ${result.siteName || url}`, c.green);
151
+ }
152
+ else {
153
+ print(` Connection failed: ${result.error}`, c.red);
154
+ const proceed = await confirm(rl, 'Save anyway?', false);
155
+ if (!proceed)
156
+ return null;
157
+ }
158
+ }
159
+ // Default site?
160
+ const isDefault = existingSites.length === 0 || await confirm(rl, 'Set as default site?', existingSites.length === 0);
161
+ return { id, name, url, apiKey, default: isDefault };
162
+ }
163
+ function printNextSteps(config) {
164
+ const defaultSite = config.sites.find(s => s.default) || config.sites[0];
165
+ console.log('');
166
+ print('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━', c.cyan);
167
+ print(' Next: Add this to your AI tool config', c.cyan);
168
+ print('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━', c.cyan);
169
+ const mcpConfig = JSON.stringify({
170
+ mcpServers: {
171
+ "respira-wordpress": {
172
+ command: "npx",
173
+ args: ["-y", "@respira/wordpress-mcp-server"]
174
+ }
175
+ }
176
+ }, null, 2);
177
+ console.log('');
178
+ print('Cursor (.cursor/mcp.json):', c.bold);
179
+ print(mcpConfig, c.dim);
180
+ console.log('');
181
+ print('Claude Code (~/.claude.json):', c.bold);
182
+ print(mcpConfig, c.dim);
183
+ console.log('');
184
+ print('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━', c.cyan);
185
+ print(` Config saved: ${CONFIG_FILE}`, c.green);
186
+ print(` Default site: ${defaultSite?.name}`, c.dim);
187
+ print('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━', c.cyan);
188
+ console.log('');
189
+ print('Restart your AI tool and start vibe coding!', c.green);
190
+ print(' Docs: https://respira.press/documentation', c.dim);
191
+ console.log('');
192
+ }
193
+ function printHelp() {
194
+ console.log(`
195
+ ${c.bold}Respira WordPress MCP Server${c.reset}
196
+
197
+ ${c.cyan}Usage:${c.reset}
198
+ npx @respira/wordpress-mcp-server Start MCP server
199
+ npx @respira/wordpress-mcp-server --setup Run setup wizard
200
+ npx @respira/wordpress-mcp-server --list List configured sites
201
+ npx @respira/wordpress-mcp-server --test Test default site connection
202
+ npx @respira/wordpress-mcp-server --help Show this help
203
+
204
+ ${c.cyan}Config file:${c.reset}
205
+ ~/.respira/config.json
206
+
207
+ ${c.cyan}Links:${c.reset}
208
+ Website: https://respira.press
209
+ Documentation: https://respira.press/documentation
210
+ Plugin: https://respira.press/releases
211
+ Support: https://respira.press/support
212
+ `);
213
+ }
214
+ function listSites() {
215
+ const config = loadConfig();
216
+ if (!config || config.sites.length === 0) {
217
+ print('\nNo sites configured. Run: npx @respira/wordpress-mcp-server --setup\n', c.yellow);
218
+ return;
219
+ }
220
+ console.log('');
221
+ print('Configured WordPress Sites:', c.cyan);
222
+ print('─'.repeat(50), c.dim);
223
+ config.sites.forEach(site => {
224
+ const def = site.default ? ` ${c.green}(default)${c.reset}` : '';
225
+ print(` ${c.bold}${site.name}${c.reset}${def}`);
226
+ print(` ${c.dim}URL: ${site.url}${c.reset}`);
227
+ print(` ${c.dim}ID: ${site.id}${c.reset}`);
228
+ console.log('');
229
+ });
230
+ }
231
+ async function testDefaultSite() {
232
+ const config = loadConfig();
233
+ if (!config || config.sites.length === 0) {
234
+ print('\nNo sites configured. Run: npx @respira/wordpress-mcp-server --setup\n', c.yellow);
235
+ return;
236
+ }
237
+ const site = config.sites.find(s => s.default) || config.sites[0];
238
+ print(`\nTesting: ${site.name} (${site.url})`, c.cyan);
239
+ const result = await testConnection(site.url, site.apiKey);
240
+ if (result.ok) {
241
+ print(`Connected successfully to: ${result.siteName || site.url}\n`, c.green);
242
+ }
243
+ else {
244
+ print(`Connection failed: ${result.error}\n`, c.red);
245
+ }
246
+ }
247
+ async function runSetupWizard() {
248
+ printBanner();
249
+ const rl = readline.createInterface({
250
+ input: process.stdin,
251
+ output: process.stdout,
252
+ });
253
+ try {
254
+ const existingConfig = loadConfig();
255
+ let config = { sites: [] };
256
+ // Check for existing config
257
+ if (existingConfig && existingConfig.sites.length > 0) {
258
+ print(`Found ${existingConfig.sites.length} existing site(s):`, c.dim);
259
+ existingConfig.sites.forEach(s => print(` - ${s.name} (${s.url})`, c.dim));
260
+ console.log('');
261
+ const addNew = await confirm(rl, 'Add another site?', true);
262
+ if (addNew) {
263
+ config = existingConfig;
264
+ }
265
+ else {
266
+ const replace = await confirm(rl, 'Replace existing config?', false);
267
+ if (!replace) {
268
+ print('\nSetup cancelled. Config unchanged.\n', c.yellow);
269
+ return;
270
+ }
271
+ }
272
+ }
273
+ // Prerequisites
274
+ console.log('');
275
+ print('Before you start, make sure you have:', c.yellow);
276
+ print(' 1. Respira plugin installed (respira.press/releases)', c.dim);
277
+ print(' 2. Generated an API key in WordPress > Respira > API Keys', c.dim);
278
+ console.log('');
279
+ const ready = await confirm(rl, 'Ready to continue?', true);
280
+ if (!ready) {
281
+ print('\nVisit https://respira.press/releases to get started.\n', c.cyan);
282
+ return;
283
+ }
284
+ // Add sites
285
+ let addMore = true;
286
+ while (addMore) {
287
+ const site = await addSite(rl, config.sites);
288
+ if (site) {
289
+ if (site.default) {
290
+ config.sites.forEach(s => s.default = false);
291
+ }
292
+ config.sites.push(site);
293
+ print(`\n Added: ${site.name}`, c.green);
294
+ }
295
+ addMore = await confirm(rl, '\nAdd another site?', false);
296
+ }
297
+ // Save
298
+ if (config.sites.length > 0) {
299
+ saveConfig(config);
300
+ printNextSteps(config);
301
+ }
302
+ else {
303
+ print('\nNo sites added. Run setup again when ready.\n', c.yellow);
304
+ }
305
+ }
306
+ finally {
307
+ rl.close();
308
+ }
309
+ }
310
+ export async function handleSetupCli() {
311
+ const args = process.argv.slice(2);
312
+ if (args.includes('--help') || args.includes('-h')) {
313
+ printHelp();
314
+ return true;
315
+ }
316
+ if (args.includes('--list') || args.includes('-l')) {
317
+ listSites();
318
+ return true;
319
+ }
320
+ if (args.includes('--test') || args.includes('-t')) {
321
+ await testDefaultSite();
322
+ return true;
323
+ }
324
+ if (args.includes('--setup') || args.includes('-s')) {
325
+ await runSetupWizard();
326
+ return true;
327
+ }
328
+ return false;
329
+ }
330
+ // If run directly (not imported)
331
+ const isDirectRun = process.argv[1]?.includes('setup');
332
+ if (isDirectRun) {
333
+ handleSetupCli().catch(err => {
334
+ console.error('Setup error:', err);
335
+ process.exit(1);
336
+ });
337
+ }
338
+ //# sour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AAC,CAAC,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC"}
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@respira/wordpress-mcp-server",
3
- "version": "2.0.6",
3
+ "version": "2.0.8",
4
4
  "description": "The only WordPress MCP with page builder support. Edit Divi, Elementor, Bricks + 7 more builders with AI. Duplicate-before-edit safety. SEO analysis. 60+ tools.",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
7
- "respira-wordpress-mcp": "./dist/index.js"
7
+ "respira-wordpress-mcp": "./dist/index.js",
8
+ "respira-setup": "./dist/setup.js"
8
9
  },
9
10
  "files": [
10
11
  "dist/**/*",
@@ -18,6 +19,7 @@
18
19
  "build": "tsc",
19
20
  "watch": "tsc --watch",
20
21
  "start": "node dist/index.js",
22
+ "setup": "node dist/setup.js --setup",
21
23
  "dev": "tsc && node dist/index.js",
22
24
  "lint": "eslint src --ext .ts",
23
25
  "format": "prettier --write \"src/**/*.ts\"",
@@ -85,11 +87,11 @@
85
87
  "license": "MIT",
86
88
  "repository": {
87
89
  "type": "git",
88
- "url": "https://github.com/webmyc/respira-wordpress"
90
+ "url": "https://respira.press"
89
91
  },
90
92
  "homepage": "https://respira.press",
91
93
  "bugs": {
92
- "url": "https://github.com/webmyc/respira-wordpress/issues"
94
+ "url": "https://respira.press/support"
93
95
  },
94
96
  "dependencies": {
95
97
  "@modelcontextprotocol/sdk": "^1.24.0",