@respira/wordpress-mcp-server 2.0.3 → 2.0.4

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
@@ -1,68 +1,93 @@
1
- # Respira WordPress MCP Server
1
+ <p align="center">
2
+ <a href="https://respira.press">
3
+ <img src="https://respira.press/hero/respira-press-cover.jpg" alt="Respira for WordPress" width="100%">
4
+ </a>
5
+ </p>
2
6
 
3
- MCP (Model Context Protocol) server for connecting AI coding assistants to WordPress sites.
7
+ <h1 align="center">🚀 Respira WordPress MCP Server</h1>
4
8
 
5
- **Important:** This MCP server requires a Respira API key. Get your API key by:
6
- 1. Installing the [Respira WordPress plugin](https://respira.press) on your WordPress site
7
- 2. Going to **Respira API Keys** in WordPress admin
8
- 3. Generating a new API key
9
+ <p align="center">
10
+ <strong>Vibe code your WordPress site with AI.</strong><br>
11
+ Connect Cursor, Claude Code, Windsurf, and other AI coding assistants directly to WordPress.
12
+ </p>
9
13
 
10
- ## Installation
14
+ <p align="center">
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
+ <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>
19
+ </p>
11
20
 
12
- Install the MCP server from npm:
21
+ <p align="center">
22
+ <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>
26
+ </p>
13
27
 
14
- ```bash
15
- npm install -g @respira/wordpress-mcp-server
16
- ```
28
+ ---
17
29
 
18
- Or use it directly with npx (no installation needed):
30
+ ## What is Respira?
19
31
 
20
- ```bash
21
- npx -y @respira/wordpress-mcp-server
22
- ```
32
+ Respira lets you **edit WordPress sites using AI coding assistants** like Cursor, Claude Code, and Windsurf. No SSH access needed. Works with any hosting provider.
33
+
34
+ **Supported Page Builders:**
35
+ - Divi • Elementor • Gutenberg • Beaver Builder • Bricks
36
+ - Oxygen • WPBakery • Visual Composer • Brizy • Thrive
37
+
38
+ ---
23
39
 
24
- **Note:** When using npx, you don't need to install the package globally. It will automatically download and run the latest version.
40
+ ## 🎬 Quick Start (2 Minutes)
25
41
 
26
- ## Configuration
42
+ ### Step 1: Install the WordPress Plugin
27
43
 
28
- ### Option 1: Configuration File (Recommended)
44
+ 1. Download from [respira.press](https://respira.press)
45
+ 2. Upload to WordPress: **Plugins → Add New → Upload Plugin**
46
+ 3. Activate and go to **Respira → API Keys**
47
+ 4. Generate your API key (starts with `respira_`)
29
48
 
30
- Create a configuration file at `~/.respira/config.json`:
49
+ ### Step 2: Configure Your AI Assistant
50
+
51
+ <details>
52
+ <summary><b>📱 Cursor</b></summary>
53
+
54
+ Create or edit `.cursor/mcp.json` in your project:
31
55
 
32
56
  ```json
33
57
  {
34
- "sites": [
35
- {
36
- "id": "my-site",
37
- "name": "My WordPress Site",
38
- "url": "https://mysite.com",
39
- "apiKey": "respira_your-api-key-here",
40
- "default": true
58
+ "mcpServers": {
59
+ "respira-wordpress": {
60
+ "command": "npx",
61
+ "args": ["-y", "@respira/wordpress-mcp-server"]
41
62
  }
42
- ],
43
- "preferences": {
44
- "autoDuplicate": true,
45
- "securityChecks": true
46
63
  }
47
64
  }
48
65
  ```
49
66
 
50
- ### Option 2: Environment Variables
67
+ </details>
51
68
 
52
- Create a `.env` file:
69
+ <details>
70
+ <summary><b>🤖 Claude Code</b></summary>
53
71
 
54
- ```bash
55
- WP_SITE_URL=https://your-wordpress-site.com
56
- WP_API_KEY=respira_your-api-key-here
57
- ```
72
+ Add to your Claude Code config (`~/.claude.json` or project settings):
58
73
 
59
- ## Usage
74
+ ```json
75
+ {
76
+ "mcpServers": {
77
+ "respira-wordpress": {
78
+ "command": "npx",
79
+ "args": ["-y", "@respira/wordpress-mcp-server"]
80
+ }
81
+ }
82
+ }
83
+ ```
60
84
 
61
- ### With Cursor
85
+ </details>
62
86
 
63
- **Option 1: Using npm (Recommended)**
87
+ <details>
88
+ <summary><b>🌊 Windsurf</b></summary>
64
89
 
65
- Add to your Cursor settings (`.cursor/mcp.json`):
90
+ Add to your Windsurf MCP configuration:
66
91
 
67
92
  ```json
68
93
  {
@@ -75,144 +100,256 @@ Add to your Cursor settings (`.cursor/mcp.json`):
75
100
  }
76
101
  ```
77
102
 
78
- **Option 2: Using global installation**
103
+ </details>
79
104
 
80
- If you installed globally with `npm install -g`, use:
105
+ <details>
106
+ <summary><b>🖥️ Claude Desktop</b></summary>
107
+
108
+ Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
81
109
 
82
110
  ```json
83
111
  {
84
112
  "mcpServers": {
85
113
  "respira-wordpress": {
86
- "command": "respira-wordpress-mcp"
114
+ "command": "npx",
115
+ "args": ["-y", "@respira/wordpress-mcp-server"]
87
116
  }
88
117
  }
89
118
  }
90
119
  ```
91
120
 
121
+ </details>
92
122
 
93
- ### With Claude Desktop
123
+ ### Step 3: Create Config File
94
124
 
95
- Add to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
125
+ Create `~/.respira/config.json`:
96
126
 
97
- **Using npm (Recommended):**
127
+ ```json
128
+ {
129
+ "sites": [
130
+ {
131
+ "id": "my-site",
132
+ "name": "My WordPress Site",
133
+ "url": "https://yoursite.com",
134
+ "apiKey": "respira_your-api-key-here",
135
+ "default": true
136
+ }
137
+ ]
138
+ }
139
+ ```
140
+
141
+ **That's it!** Restart your AI assistant and start vibe coding! 🎉
142
+
143
+ ---
144
+
145
+ ## 🪟 Windows Users: Troubleshooting
146
+
147
+ If you see `'npx' is not recognized as an internal or external command`:
148
+
149
+ ### Option 1: Use Full Path (Recommended)
150
+
151
+ Find your Node.js installation path and use the full path in your config:
98
152
 
99
153
  ```json
100
154
  {
101
155
  "mcpServers": {
102
156
  "respira-wordpress": {
103
- "command": "npx",
157
+ "command": "C:\\Program Files\\nodejs\\npx.cmd",
104
158
  "args": ["-y", "@respira/wordpress-mcp-server"]
105
159
  }
106
160
  }
107
161
  }
108
162
  ```
109
163
 
164
+ ### Option 2: Add Node.js to PATH
165
+
166
+ 1. Press `Win + R`, type `sysdm.cpl`, press Enter
167
+ 2. Click **Advanced** tab → **Environment Variables**
168
+ 3. Under **System variables**, find **Path** and click **Edit**
169
+ 4. Click **New** and add: `C:\Program Files\nodejs\`
170
+ 5. Click **OK** on all dialogs
171
+ 6. **Restart your AI assistant completely**
110
172
 
111
- ## Available Tools
173
+ ### Option 3: Install Globally First
174
+
175
+ ```bash
176
+ npm install -g @respira/wordpress-mcp-server
177
+ ```
178
+
179
+ Then use this config:
180
+
181
+ ```json
182
+ {
183
+ "mcpServers": {
184
+ "respira-wordpress": {
185
+ "command": "respira-wordpress-mcp"
186
+ }
187
+ }
188
+ }
189
+ ```
190
+
191
+ ---
192
+
193
+ ## 🛠️ Available Tools (60+)
112
194
 
113
195
  ### Content Management
114
- - `wordpress_get_site_context` - Get comprehensive site information
115
- - `wordpress_get_theme_docs` - Get theme documentation
116
- - `wordpress_get_builder_info` - Get page builder information
117
- - `wordpress_list_pages` - List all pages
118
- - `wordpress_read_page` - Get page content
119
- - `wordpress_create_page_duplicate` - Duplicate a page for safe editing
120
- - `wordpress_update_page` - Update page content
121
- - `wordpress_delete_page` - Delete a page
122
- - `wordpress_list_posts` - List all posts
123
- - `wordpress_read_post` - Get post content
124
- - `wordpress_create_post_duplicate` - Duplicate a post
125
- - `wordpress_list_media` - List media files
126
- - `wordpress_upload_media` - Upload media files (images, documents, videos) - supports base64, URLs, or file paths
127
- - `wordpress_get_media` - Get single media item details
128
- - `wordpress_update_media` - Update media metadata (title, alt text, caption)
129
- - `wordpress_delete_media` - Delete a media file
130
- - `wordpress_extract_builder_content` - Extract page builder content
131
- - `wordpress_inject_builder_content` - Inject page builder content
132
- - `wordpress_validate_security` - Validate content for security issues
133
- - `wordpress_switch_site` - Switch between multiple WordPress sites
134
-
135
- ### User Management
136
- - `wordpress_list_users` - List all users with optional filtering
137
- - `wordpress_get_user` - Get user details by ID
138
- - `wordpress_create_user` - Create a new user
139
- - `wordpress_update_user` - Update user information
140
- - `wordpress_delete_user` - Delete a user
141
-
142
- ### Comments
143
- - `wordpress_list_comments` - List all comments with optional filtering
144
- - `wordpress_get_comment` - Get comment details by ID
145
- - `wordpress_create_comment` - Create a new comment
146
- - `wordpress_update_comment` - Update a comment
147
- - `wordpress_delete_comment` - Delete a comment
148
-
149
- ### Taxonomies
150
- - `wordpress_list_taxonomies` - List all registered taxonomies
151
- - `wordpress_get_taxonomy` - Get taxonomy details
152
- - `wordpress_list_terms` - List terms in a taxonomy
153
- - `wordpress_get_term` - Get term details
154
- - `wordpress_create_term` - Create a new term
155
- - `wordpress_update_term` - Update a term
156
- - `wordpress_delete_term` - Delete a term
196
+ | Tool | Description |
197
+ |------|-------------|
198
+ | `wordpress_list_pages` | List all pages |
199
+ | `wordpress_read_page` | Get page content with builder data |
200
+ | `wordpress_update_page` | Update page content |
201
+ | `wordpress_create_page_duplicate` | Safely duplicate before editing |
202
+ | `wordpress_list_posts` | List all posts |
203
+ | `wordpress_read_post` | Get post content |
204
+ | `wordpress_update_post` | Update post content |
205
+
206
+ ### Media Management
207
+ | Tool | Description |
208
+ |------|-------------|
209
+ | `wordpress_list_media` | List all media files |
210
+ | `wordpress_upload_media` | Upload images, videos, documents |
211
+ | `wordpress_update_media` | Update alt text, title, caption |
212
+ | `wordpress_delete_media` | Delete media files |
213
+
214
+ ### Menu Management
215
+ | Tool | Description |
216
+ |------|-------------|
217
+ | `wordpress_list_menus` | List all navigation menus |
218
+ | `wordpress_get_menu` | Get menu with all items |
219
+ | `wordpress_create_menu` | Create new menu |
220
+ | `wordpress_update_menu` | Update menu |
221
+ | `wordpress_list_menu_locations` | List theme menu locations |
222
+ | `wordpress_assign_menu_location` | Assign menu to location |
223
+ | `wordpress_create_menu_item` | Add menu item |
224
+ | `wordpress_update_menu_item` | Update menu item |
225
+
226
+ ### Page Builders
227
+ | Tool | Description |
228
+ |------|-------------|
229
+ | `wordpress_get_builder_info` | Get available modules/widgets |
230
+ | `wordpress_extract_builder_content` | Extract structured content |
231
+ | `wordpress_inject_builder_content` | Inject builder content |
232
+ | `wordpress_update_module` | Update specific module |
233
+
234
+ ### SEO & Performance
235
+ | Tool | Description |
236
+ |------|-------------|
237
+ | `wordpress_analyze_seo` | Comprehensive SEO analysis |
238
+ | `wordpress_analyze_performance` | Performance metrics |
239
+ | `wordpress_get_core_web_vitals` | LCP, FID, CLS scores |
240
+ | `wordpress_analyze_aeo` | AI search engine optimization |
241
+
242
+ ### Users, Comments, Taxonomies
243
+ | Tool | Description |
244
+ |------|-------------|
245
+ | `wordpress_list_users` | List all users |
246
+ | `wordpress_create_user` | Create new user |
247
+ | `wordpress_list_comments` | List comments |
248
+ | `wordpress_list_taxonomies` | List taxonomies |
249
+ | `wordpress_list_terms` | List category/tag terms |
157
250
 
158
251
  ### Custom Post Types
159
- - `wordpress_list_post_types` - List all registered post types
160
- - `wordpress_get_post_type` - Get post type details
161
- - `wordpress_list_custom_posts` - List posts of a custom post type
162
- - `wordpress_get_custom_post` - Get custom post details
163
- - `wordpress_create_custom_post` - Create a new custom post
164
- - `wordpress_update_custom_post` - Update a custom post
165
- - `wordpress_delete_custom_post` - Delete a custom post
166
-
167
- ### WordPress Options
168
- - `wordpress_list_options` - List WordPress options (with optional search filter)
169
- - `wordpress_get_option` - Get option value by name
170
- - `wordpress_update_option` - Update an option value
171
- - `wordpress_delete_option` - Delete an option
172
-
173
- ### Page Speed Analysis
174
- - `wordpress_analyze_performance` - Analyze page performance metrics (load time, optimization opportunities)
175
- - `wordpress_get_core_web_vitals` - Get Core Web Vitals scores (LCP, FID, CLS)
176
- - `wordpress_analyze_images` - Analyze image optimization opportunities
177
-
178
- ### SEO Analysis
179
- - `wordpress_analyze_seo` - Comprehensive SEO analysis (meta tags, headings, alt text, linking)
180
- - `wordpress_check_seo_issues` - Check for common SEO issues and get recommendations
181
- - `wordpress_analyze_readability` - Analyze content readability (Flesch Reading Ease, sentence structure)
182
-
183
- ### AI Engine Optimization (AEO)
184
- - `wordpress_analyze_aeo` - Analyze content for AI search engines (Perplexity, ChatGPT)
185
- - `wordpress_check_structured_data` - Check schema markup and structured data (JSON-LD, microdata)
186
-
187
- ### Plugin Management (EXPERIMENTAL)
188
- - `wordpress_list_plugins` - List all installed plugins with status and version
189
- - `wordpress_install_plugin` - Install a plugin from WordPress.org or ZIP URL
190
- - `wordpress_activate_plugin` - Activate a plugin
191
- - `wordpress_deactivate_plugin` - Deactivate a plugin
192
- - `wordpress_update_plugin` - Update a plugin to the latest version
193
- - `wordpress_delete_plugin` - Permanently delete a plugin
194
-
195
- **Note**: Plugin management tools are EXPERIMENTAL and require the feature to be enabled in Respira settings (disabled by default for security). Use with caution and always have backups.
196
-
197
- ## Development
252
+ | Tool | Description |
253
+ |------|-------------|
254
+ | `wordpress_list_post_types` | List registered CPTs |
255
+ | `wordpress_list_custom_posts` | List CPT entries |
256
+ | `wordpress_create_custom_post` | Create CPT entry |
198
257
 
199
- ```bash
200
- # Watch mode
201
- npm run watch
258
+ ### Plugin Management (Experimental)
259
+ | Tool | Description |
260
+ |------|-------------|
261
+ | `wordpress_list_plugins` | List installed plugins |
262
+ | `wordpress_install_plugin` | Install from WordPress.org |
263
+ | `wordpress_activate_plugin` | Activate plugin |
264
+ | `wordpress_update_plugin` | Update to latest version |
265
+
266
+ ---
267
+
268
+ ## 🔒 Safe Editing with Duplicates
269
+
270
+ Respira automatically creates duplicates before editing live pages. This means:
271
+
272
+ 1. **Your live site stays untouched** until you approve changes
273
+ 2. **Preview changes** before they go live
274
+ 3. **Easy rollback** if something goes wrong
275
+
276
+ Approve changes in WordPress admin: **Respira → Approve Edits**
277
+
278
+ ---
279
+
280
+ ## 🌍 Multi-Site Support
281
+
282
+ Manage multiple WordPress sites from one config:
283
+
284
+ ```json
285
+ {
286
+ "sites": [
287
+ {
288
+ "id": "production",
289
+ "name": "Production Site",
290
+ "url": "https://mysite.com",
291
+ "apiKey": "respira_prod_key",
292
+ "default": true
293
+ },
294
+ {
295
+ "id": "staging",
296
+ "name": "Staging Site",
297
+ "url": "https://staging.mysite.com",
298
+ "apiKey": "respira_staging_key"
299
+ }
300
+ ]
301
+ }
302
+ ```
303
+
304
+ Switch sites with: `wordpress_switch_site`
305
+
306
+ ---
307
+
308
+ ## 🌐 WPML Multilingual Support
309
+
310
+ Full support for WPML multilingual sites:
311
+ - Menu translations
312
+ - Page/post language detection
313
+ - Translation links
314
+ - Language-aware content queries
202
315
 
203
- # Build
204
- npm run build
316
+ ---
205
317
 
206
- # Run
207
- npm run start
318
+ ## 📦 Alternative Installation
208
319
 
209
- # Lint
210
- npm run lint
320
+ ### Global Installation
211
321
 
212
- # Format
213
- npm run format
322
+ ```bash
323
+ npm install -g @respira/wordpress-mcp-server
324
+ ```
325
+
326
+ ### Environment Variables
327
+
328
+ Instead of config file, use `.env`:
329
+
330
+ ```bash
331
+ WP_SITE_URL=https://your-site.com
332
+ WP_API_KEY=respira_your-api-key
214
333
  ```
215
334
 
216
- ## License
335
+ ---
336
+
337
+ ## 🆘 Need Help?
338
+
339
+ - 📖 [Documentation](https://respira.press/docs)
340
+ - 💬 [Support](https://respira.press/support)
341
+ - 🐛 [Report Issues](https://github.com/webmyc/respira-wordpress/issues)
342
+ - 📧 [Contact](mailto:support@respira.press)
343
+
344
+ ---
345
+
346
+ ## 📄 License
347
+
348
+ MIT © [Respira](https://respira.press)
349
+
350
+ ---
217
351
 
218
- MIT
352
+ <p align="center">
353
+ <strong>Built with ❤️ for the WordPress community</strong><br>
354
+ <a href="https://respira.press">respira.press</a>
355
+ </p>
@@ -1 +1 @@
1
- {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,qBAAa,sBAAsB;IACjC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,WAAW,CAAgC;IACnD,OAAO,CAAC,KAAK,CAA2C;gBAE5C,WAAW,EAAE,mBAAmB,EAAE;IA2B9C,OAAO,CAAC,aAAa;IA8ErB,OAAO,CAAC,QAAQ;YAwyCF,cAAc;IA2QtB,GAAG;CAKV"}
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,qBAAa,sBAAsB;IACjC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,WAAW,CAAgC;IACnD,OAAO,CAAC,KAAK,CAA2C;gBAE5C,WAAW,EAAE,mBAAmB,EAAE;IA2B9C,OAAO,CAAC,aAAa;IAsGrB,OAAO,CAAC,QAAQ;YAyiDF,cAAc;IAkTtB,GAAG;CAKV"}