mcp-wordpress 1.5.2 → 2.0.0

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.
Files changed (190) hide show
  1. package/README.md +332 -61
  2. package/dist/cache/CacheInvalidation.d.ts.map +1 -1
  3. package/dist/cache/CacheInvalidation.js +4 -4
  4. package/dist/cache/CacheInvalidation.js.map +1 -1
  5. package/dist/client/MockWordPressClient.d.ts +55 -0
  6. package/dist/client/MockWordPressClient.d.ts.map +1 -0
  7. package/dist/client/MockWordPressClient.js +369 -0
  8. package/dist/client/MockWordPressClient.js.map +1 -0
  9. package/dist/client/api.d.ts +1 -0
  10. package/dist/client/api.d.ts.map +1 -1
  11. package/dist/client/api.js +26 -60
  12. package/dist/client/api.js.map +1 -1
  13. package/dist/client/managers/AuthenticationManager.d.ts.map +1 -1
  14. package/dist/client/managers/AuthenticationManager.js +4 -3
  15. package/dist/client/managers/AuthenticationManager.js.map +1 -1
  16. package/dist/config/ConfigurationSchema.d.ts +3 -3
  17. package/dist/config/ConfigurationSchema.d.ts.map +1 -1
  18. package/dist/config/ConfigurationSchema.js +7 -24
  19. package/dist/config/ConfigurationSchema.js.map +1 -1
  20. package/dist/config/ServerConfiguration.d.ts +8 -0
  21. package/dist/config/ServerConfiguration.d.ts.map +1 -1
  22. package/dist/config/ServerConfiguration.js +80 -31
  23. package/dist/config/ServerConfiguration.js.map +1 -1
  24. package/dist/docs/DocumentationGenerator.d.ts.map +1 -1
  25. package/dist/docs/DocumentationGenerator.js +5 -7
  26. package/dist/docs/DocumentationGenerator.js.map +1 -1
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +33 -29
  29. package/dist/index.js.map +1 -1
  30. package/dist/security/InputValidator.d.ts.map +1 -1
  31. package/dist/security/InputValidator.js +3 -11
  32. package/dist/security/InputValidator.js.map +1 -1
  33. package/dist/server/ToolRegistry.d.ts +4 -0
  34. package/dist/server/ToolRegistry.d.ts.map +1 -1
  35. package/dist/server/ToolRegistry.js +71 -8
  36. package/dist/server/ToolRegistry.js.map +1 -1
  37. package/dist/tools/auth.d.ts.map +1 -1
  38. package/dist/tools/auth.js +8 -3
  39. package/dist/tools/auth.js.map +1 -1
  40. package/dist/tools/posts.d.ts.map +1 -1
  41. package/dist/tools/posts.js +287 -20
  42. package/dist/tools/posts.js.map +1 -1
  43. package/dist/tools/site.d.ts.map +1 -1
  44. package/dist/tools/site.js +47 -9
  45. package/dist/tools/site.js.map +1 -1
  46. package/dist/tools/users.d.ts.map +1 -1
  47. package/dist/tools/users.js +113 -10
  48. package/dist/tools/users.js.map +1 -1
  49. package/dist/utils/enhancedError.d.ts +61 -0
  50. package/dist/utils/enhancedError.d.ts.map +1 -0
  51. package/dist/utils/enhancedError.js +221 -0
  52. package/dist/utils/enhancedError.js.map +1 -0
  53. package/dist/utils/streaming.d.ts +104 -0
  54. package/dist/utils/streaming.d.ts.map +1 -0
  55. package/dist/utils/streaming.js +312 -0
  56. package/dist/utils/streaming.js.map +1 -0
  57. package/dist/utils/validation.d.ts +19 -3
  58. package/dist/utils/validation.d.ts.map +1 -1
  59. package/dist/utils/validation.js +174 -24
  60. package/dist/utils/validation.js.map +1 -1
  61. package/docs/ARCHITECTURE.md +850 -0
  62. package/docs/CACHING.md +20 -17
  63. package/docs/CONFIGURATION.md +660 -0
  64. package/docs/DOCKER.md +61 -60
  65. package/docs/EVALUATION.md +397 -0
  66. package/docs/INSTALLATION.md +423 -0
  67. package/docs/PERFORMANCE_MONITORING.md +17 -15
  68. package/docs/SECURITY.md +621 -0
  69. package/docs/SECURITY_TESTING.md +22 -26
  70. package/docs/TEST_SITE_SETUP.md +136 -0
  71. package/docs/TROUBLESHOOTING.md +578 -0
  72. package/docs/api/README.md +76 -91
  73. package/docs/api/categories/auth.md +0 -2
  74. package/docs/api/categories/cache.md +0 -2
  75. package/docs/api/categories/comment.md +0 -2
  76. package/docs/api/categories/media.md +0 -2
  77. package/docs/api/categories/page.md +0 -2
  78. package/docs/api/categories/performance.md +0 -2
  79. package/docs/api/categories/post.md +0 -2
  80. package/docs/api/categories/site.md +0 -2
  81. package/docs/api/categories/taxonomy.md +0 -2
  82. package/docs/api/categories/user.md +0 -2
  83. package/docs/api/summary.json +1 -1
  84. package/docs/api/tools/wp_approve_comment.md +11 -3
  85. package/docs/api/tools/wp_cache_clear.md +14 -5
  86. package/docs/api/tools/wp_cache_info.md +14 -5
  87. package/docs/api/tools/wp_cache_stats.md +14 -5
  88. package/docs/api/tools/wp_cache_warm.md +14 -5
  89. package/docs/api/tools/wp_create_application_password.md +11 -3
  90. package/docs/api/tools/wp_create_category.md +11 -3
  91. package/docs/api/tools/wp_create_comment.md +14 -5
  92. package/docs/api/tools/wp_create_page.md +13 -5
  93. package/docs/api/tools/wp_create_post.md +14 -7
  94. package/docs/api/tools/wp_create_tag.md +11 -3
  95. package/docs/api/tools/wp_create_user.md +13 -5
  96. package/docs/api/tools/wp_delete_application_password.md +11 -3
  97. package/docs/api/tools/wp_delete_category.md +11 -3
  98. package/docs/api/tools/wp_delete_comment.md +11 -3
  99. package/docs/api/tools/wp_delete_media.md +10 -3
  100. package/docs/api/tools/wp_delete_page.md +10 -3
  101. package/docs/api/tools/wp_delete_post.md +11 -5
  102. package/docs/api/tools/wp_delete_tag.md +11 -3
  103. package/docs/api/tools/wp_delete_user.md +10 -3
  104. package/docs/api/tools/wp_get_application_passwords.md +11 -3
  105. package/docs/api/tools/wp_get_auth_status.md +11 -3
  106. package/docs/api/tools/wp_get_category.md +11 -3
  107. package/docs/api/tools/wp_get_comment.md +11 -3
  108. package/docs/api/tools/wp_get_current_user.md +11 -3
  109. package/docs/api/tools/wp_get_media.md +11 -3
  110. package/docs/api/tools/wp_get_page.md +11 -3
  111. package/docs/api/tools/wp_get_page_revisions.md +11 -3
  112. package/docs/api/tools/wp_get_post.md +12 -5
  113. package/docs/api/tools/wp_get_post_revisions.md +11 -3
  114. package/docs/api/tools/wp_get_site_settings.md +10 -3
  115. package/docs/api/tools/wp_get_tag.md +11 -3
  116. package/docs/api/tools/wp_get_user.md +11 -3
  117. package/docs/api/tools/wp_list_categories.md +11 -3
  118. package/docs/api/tools/wp_list_comments.md +11 -3
  119. package/docs/api/tools/wp_list_media.md +14 -5
  120. package/docs/api/tools/wp_list_pages.md +14 -5
  121. package/docs/api/tools/wp_list_posts.md +15 -7
  122. package/docs/api/tools/wp_list_tags.md +11 -3
  123. package/docs/api/tools/wp_list_users.md +11 -3
  124. package/docs/api/tools/wp_performance_alerts.md +17 -7
  125. package/docs/api/tools/wp_performance_benchmark.md +17 -7
  126. package/docs/api/tools/wp_performance_export.md +17 -7
  127. package/docs/api/tools/wp_performance_history.md +17 -7
  128. package/docs/api/tools/wp_performance_optimize.md +17 -7
  129. package/docs/api/tools/wp_performance_stats.md +17 -7
  130. package/docs/api/tools/wp_search_site.md +11 -3
  131. package/docs/api/tools/wp_spam_comment.md +11 -3
  132. package/docs/api/tools/wp_switch_auth_method.md +14 -5
  133. package/docs/api/tools/wp_test_auth.md +11 -3
  134. package/docs/api/tools/wp_update_category.md +11 -3
  135. package/docs/api/tools/wp_update_comment.md +14 -5
  136. package/docs/api/tools/wp_update_media.md +14 -5
  137. package/docs/api/tools/wp_update_page.md +13 -5
  138. package/docs/api/tools/wp_update_post.md +14 -7
  139. package/docs/api/tools/wp_update_site_settings.md +14 -5
  140. package/docs/api/tools/wp_update_tag.md +11 -3
  141. package/docs/api/tools/wp_update_user.md +13 -5
  142. package/docs/api/tools/wp_upload_media.md +13 -5
  143. package/docs/api/types/WordPressPost.md +2 -0
  144. package/docs/code-improvements.md +40 -0
  145. package/docs/contract-testing.md +1 -1
  146. package/docs/developer/API_REFERENCE.md +19 -59
  147. package/docs/developer/ARCHITECTURE.md +8 -11
  148. package/docs/developer/BUILD_SYSTEM.md +2 -2
  149. package/docs/developer/CONTRIBUTING.md +3 -5
  150. package/docs/developer/GITHUB_ACTIONS_SETUP.md +2 -2
  151. package/docs/developer/MIGRATION_GUIDE.md +5 -6
  152. package/docs/developer/README.md +2 -1
  153. package/docs/developer/REFACTORING.md +9 -15
  154. package/docs/developer/RELEASE_PROCESS.md +4 -3
  155. package/docs/developer/TESTING.md +2 -2
  156. package/docs/examples/claude-desktop-config.md +8 -0
  157. package/docs/integrations/claude-desktop.md +426 -0
  158. package/docs/integrations/cline.md +537 -0
  159. package/docs/integrations/vs-code.md +515 -0
  160. package/docs/releases/COMMUNITY_ANNOUNCEMENT_v1.1.2.md +30 -23
  161. package/docs/releases/RELEASE_NOTES_v1.1.2.md +7 -6
  162. package/docs/testing-configurations.md +11 -0
  163. package/docs/user-guides/DOCKER_NPM_DTX_SETUP.md +3 -2
  164. package/docs/user-guides/DOCKER_SETUP.md +3 -2
  165. package/docs/user-guides/DTX_SETUP.md +6 -5
  166. package/docs/user-guides/DXT_INSTALLATION.md +4 -4
  167. package/docs/user-guides/NPM_SETUP.md +4 -2
  168. package/docs/user-guides/NPX_SETUP.md +4 -2
  169. package/docs/user-guides/SMITHERY_SETUP.md +402 -0
  170. package/docs/wordpress-rest-api-authentication-troubleshooting.md +45 -42
  171. package/package.json +12 -2
  172. package/src/cache/CacheInvalidation.ts +7 -18
  173. package/src/client/MockWordPressClient.ts +398 -0
  174. package/src/client/api.ts +77 -237
  175. package/src/client/managers/AuthenticationManager.ts +19 -56
  176. package/src/config/ConfigurationSchema.ts +14 -45
  177. package/src/config/ServerConfiguration.ts +98 -71
  178. package/src/docs/DocumentationGenerator.ts +39 -123
  179. package/src/dxt-entry.cjs +4 -1
  180. package/src/index.ts +35 -54
  181. package/src/security/InputValidator.ts +15 -57
  182. package/src/server/ToolRegistry.ts +88 -17
  183. package/src/tools/auth.ts +15 -22
  184. package/src/tools/posts.ts +347 -64
  185. package/src/tools/site.ts +69 -46
  186. package/src/tools/users.ts +142 -44
  187. package/src/utils/enhancedError.ts +248 -0
  188. package/src/utils/streaming.ts +428 -0
  189. package/src/utils/validation.ts +253 -92
  190. package/dist/mcp-wordpress-1.5.2.tgz +0 -0
@@ -1,6 +1,7 @@
1
1
  # DTX (Desktop Extension) Setup Guide
2
2
 
3
- This guide provides step-by-step instructions for setting up the MCP WordPress server using the DTX (Desktop Extension) package format for Claude Desktop.
3
+ This guide provides step-by-step instructions for setting up the MCP WordPress server using the DTX (Desktop Extension)
4
+ package format for Claude Desktop.
4
5
 
5
6
  ---
6
7
 
@@ -111,14 +112,14 @@ The DTX package supports multi-site configuration, but requires manual setup:
111
112
  }
112
113
  ```
113
114
 
114
- 2. **Place the file in one of these locations:**
115
+ 1. **Place the file in one of these locations:**
115
116
  - **macOS/Linux**: `~/mcp-wordpress.config.json`
116
117
  - **Windows**: `%USERPROFILE%\mcp-wordpress.config.json`
117
118
  - **DTX Install Directory**: Next to the DTX package files
118
119
 
119
- 3. **Skip the DTX configuration prompts (or enter dummy values)**
120
+ 2. **Skip the DTX configuration prompts (or enter dummy values)**
120
121
 
121
- 4. **Restart Claude Desktop** - the server will detect and use your config file
122
+ 3. **Restart Claude Desktop** - the server will detect and use your config file
122
123
 
123
124
  #### Method 2: Environment Variable Override
124
125
 
@@ -181,7 +182,7 @@ npm run dxt:validate
181
182
 
182
183
  The DTX package includes:
183
184
 
184
- ```
185
+ ```diagram
185
186
  mcp-wordpress.dxt/
186
187
  ├── manifest.json # DTX configuration and metadata
187
188
  ├── icon.png # Extension icon
@@ -61,8 +61,8 @@ After installation, you'll be prompted to configure:
61
61
 
62
62
  ### 4. Verify Installation
63
63
 
64
- After configuration, the extension should appear in your Claude Desktop extensions list. You can test it by
65
- asking Claude to:
64
+ After configuration, the extension should appear in your Claude Desktop extensions list. You can test it by asking
65
+ Claude to:
66
66
 
67
67
  - "List my recent WordPress posts"
68
68
  - "Check my WordPress site status"
@@ -145,5 +145,5 @@ The final DXT package includes:
145
145
 
146
146
  ## Multi-Site Support
147
147
 
148
- The DXT extension supports managing multiple WordPress sites. Configure additional sites through the extension
149
- settings or use site-specific commands with the `--site` parameter.
148
+ The DXT extension supports managing multiple WordPress sites. Configure additional sites through the extension settings
149
+ or use site-specific commands with the `--site` parameter.
@@ -1,6 +1,7 @@
1
1
  # NPM Setup Guide (Local Development)
2
2
 
3
- This guide provides step-by-step instructions for setting up the MCP WordPress server locally for development, customization, and contribution.
3
+ This guide provides step-by-step instructions for setting up the MCP WordPress server locally for development,
4
+ customization, and contribution.
4
5
 
5
6
  ---
6
7
 
@@ -106,4 +107,5 @@ npm run docs:generate # Generate API documentation
106
107
 
107
108
  ---
108
109
 
109
- After setup, restart Claude Desktop and test with commands like "List my WordPress posts" or "Show me my site statistics".
110
+ After setup, restart Claude Desktop and test with commands like "List my WordPress posts" or "Show me my site
111
+ statistics".
@@ -1,6 +1,7 @@
1
1
  # NPX Setup Guide
2
2
 
3
- This guide provides step-by-step instructions for using the MCP WordPress server with NPX - the quickest way to get started without local installation.
3
+ This guide provides step-by-step instructions for using the MCP WordPress server with NPX - the quickest way to get
4
+ started without local installation.
4
5
 
5
6
  ---
6
7
 
@@ -278,4 +279,5 @@ LOG_LEVEL # Optional: Logging level (debug, info, warn, error)
278
279
 
279
280
  ---
280
281
 
281
- NPX provides the fastest way to get started with WordPress tools in Claude Desktop - no installation, no maintenance, just pure functionality!
282
+ NPX provides the fastest way to get started with WordPress tools in Claude Desktop - no installation, no maintenance,
283
+ just pure functionality!
@@ -0,0 +1,402 @@
1
+ # Smithery Setup Guide
2
+
3
+ Complete guide for installing and configuring MCP WordPress Server using Smithery package manager.
4
+
5
+ ## 🎯 What is Smithery?
6
+
7
+ Smithery is a dedicated package manager for Model Context Protocol (MCP) servers, designed to simplify the
8
+ installation, configuration, and management of MCP tools.
9
+
10
+ ### Why Choose Smithery?
11
+
12
+ | Feature | Smithery | Manual Setup |
13
+ |---------|----------|--------------|
14
+ | **Installation** | One command | Multiple steps |
15
+ | **Updates** | Automatic | Manual process |
16
+ | **Configuration** | GUI wizard | Config file editing |
17
+ | **Claude Integration** | Automatic | Manual config |
18
+ | **Package Management** | Built-in | Manual tracking |
19
+
20
+ ## 📋 Prerequisites
21
+
22
+ ### System Requirements
23
+
24
+ - **Operating System**: macOS, Linux, or Windows
25
+ - **Node.js**: 16.0 or higher
26
+ - **Claude Desktop**: Latest version
27
+ - **WordPress Site**: Version 5.0+ with REST API enabled
28
+
29
+ ### WordPress Requirements
30
+
31
+ - WordPress user account with appropriate permissions
32
+ - Application Password enabled
33
+ - REST API accessible (test: `https://yoursite.com/wp-json/wp/v2/`)
34
+
35
+ ## 🚀 Installation
36
+
37
+ ### Step 1: Install Smithery
38
+
39
+ ```bash
40
+ # Install Smithery package manager
41
+ npm install -g @smithery/cli
42
+
43
+ # Verify installation
44
+ smithery --version
45
+ ```
46
+
47
+ ### Step 2: Install MCP WordPress Server
48
+
49
+ ```bash
50
+ # Install mcp-wordpress package
51
+ smithery install mcp-wordpress
52
+
53
+ # Verify installation
54
+ smithery list | grep mcp-wordpress
55
+ ```
56
+
57
+ ### Step 3: Configure WordPress Connection
58
+
59
+ ```bash
60
+ # Start configuration wizard
61
+ smithery configure mcp-wordpress
62
+ ```
63
+
64
+ The configuration wizard will prompt for:
65
+
66
+ - **WordPress Site URL**: `https://yoursite.com`
67
+ - **Username**: Your WordPress username
68
+ - **Application Password**: Generated from WordPress admin
69
+ - **Authentication Method**: Recommended: `app-password`
70
+
71
+ ## 🔑 WordPress Application Password Setup
72
+
73
+ ### Creating Application Password
74
+
75
+ 1. **Log into WordPress Admin**
76
+ - Navigate to your WordPress admin dashboard
77
+ - Go to **Users** → **Your Profile**
78
+
79
+ 2. **Generate Application Password**
80
+ - Scroll to **Application Passwords** section
81
+ - Application Name: `Smithery MCP WordPress`
82
+ - Click **Add New Application Password**
83
+
84
+ 3. **Copy the Password**
85
+ - WordPress displays: `AbCd EfGh IjKl MnOp QrSt UvWx`
86
+ - **Important**: Copy exactly with spaces
87
+ - Store securely - you won't see it again
88
+
89
+ 4. **Enter in Smithery Configuration**
90
+ - Paste the password when prompted
91
+ - Smithery will securely store it
92
+
93
+ ## ⚙️ Configuration Options
94
+
95
+ ### Basic Configuration
96
+
97
+ ```bash
98
+ # Configure with prompts
99
+ smithery configure mcp-wordpress
100
+
101
+ # View current configuration
102
+ smithery config show mcp-wordpress
103
+
104
+ # Edit configuration file
105
+ smithery config edit mcp-wordpress
106
+ ```
107
+
108
+ ### Advanced Configuration
109
+
110
+ ```json
111
+ {
112
+ "wordpress": {
113
+ "siteUrl": "https://yoursite.com",
114
+ "username": "your-username",
115
+ "appPassword": "AbCd EfGh IjKl MnOp QrSt UvWx",
116
+ "authMethod": "app-password"
117
+ },
118
+ "server": {
119
+ "port": 3000,
120
+ "debug": false,
121
+ "caching": true
122
+ }
123
+ }
124
+ ```
125
+
126
+ ### Multi-Site Configuration
127
+
128
+ For managing multiple WordPress sites:
129
+
130
+ ```bash
131
+ # Add additional site
132
+ smithery configure mcp-wordpress --add-site
133
+
134
+ # Select active site
135
+ smithery configure mcp-wordpress --select-site site-id
136
+
137
+ # List configured sites
138
+ smithery config sites mcp-wordpress
139
+ ```
140
+
141
+ ## 🖥️ Claude Desktop Integration
142
+
143
+ ### Automatic Setup
144
+
145
+ Smithery automatically configures Claude Desktop:
146
+
147
+ ```bash
148
+ # Start MCP server and register with Claude
149
+ smithery start mcp-wordpress
150
+
151
+ # Verify Claude Desktop connection
152
+ smithery status mcp-wordpress
153
+ ```
154
+
155
+ ### Manual Claude Desktop Configuration
156
+
157
+ If automatic setup fails, manually add to Claude config:
158
+
159
+ ```json
160
+ {
161
+ "mcpServers": {
162
+ "mcp-wordpress": {
163
+ "command": "smithery",
164
+ "args": ["run", "mcp-wordpress"]
165
+ }
166
+ }
167
+ }
168
+ ```
169
+
170
+ ## 🔧 Management Commands
171
+
172
+ ### Server Management
173
+
174
+ ```bash
175
+ # Start MCP server
176
+ smithery start mcp-wordpress
177
+
178
+ # Stop MCP server
179
+ smithery stop mcp-wordpress
180
+
181
+ # Restart server
182
+ smithery restart mcp-wordpress
183
+
184
+ # Check server status
185
+ smithery status mcp-wordpress
186
+ ```
187
+
188
+ ### Package Management
189
+
190
+ ```bash
191
+ # Update to latest version
192
+ smithery update mcp-wordpress
193
+
194
+ # Check for updates
195
+ smithery outdated
196
+
197
+ # View package information
198
+ smithery info mcp-wordpress
199
+
200
+ # Remove package
201
+ smithery remove mcp-wordpress
202
+ ```
203
+
204
+ ### Debugging and Logs
205
+
206
+ ```bash
207
+ # View real-time logs
208
+ smithery logs mcp-wordpress --follow
209
+
210
+ # View recent logs
211
+ smithery logs mcp-wordpress --lines 50
212
+
213
+ # Enable debug mode
214
+ smithery configure mcp-wordpress --debug
215
+
216
+ # Run diagnostics
217
+ smithery diagnose mcp-wordpress
218
+ ```
219
+
220
+ ## ✅ Verification
221
+
222
+ ### Test Installation
223
+
224
+ 1. **Start the Server**
225
+
226
+ ```bash
227
+ smithery start mcp-wordpress
228
+ ```
229
+
230
+ 2. **Check Status**
231
+
232
+ ```bash
233
+ smithery status mcp-wordpress
234
+ # Should show: "Running on port 3000"
235
+ ```
236
+
237
+ 3. **Test Claude Desktop Integration**
238
+ - Restart Claude Desktop
239
+ - Type: "List my WordPress posts"
240
+ - Should display your WordPress content
241
+
242
+ ### Health Check
243
+
244
+ ```bash
245
+ # Run comprehensive health check
246
+ smithery health mcp-wordpress
247
+
248
+ # Test WordPress connection
249
+ smithery test mcp-wordpress --connection
250
+
251
+ # Verify all tools are working
252
+ smithery test mcp-wordpress --tools
253
+ ```
254
+
255
+ ## 🐛 Troubleshooting
256
+
257
+ ### Common Issues
258
+
259
+ #### Installation Fails
260
+
261
+ ```bash
262
+ # Clear Smithery cache
263
+ smithery cache clear
264
+
265
+ # Reinstall package
266
+ smithery remove mcp-wordpress
267
+ smithery install mcp-wordpress
268
+ ```
269
+
270
+ #### Connection Issues
271
+
272
+ ```bash
273
+ # Test WordPress connection
274
+ curl https://yoursite.com/wp-json/wp/v2/
275
+
276
+ # Verify credentials
277
+ smithery test mcp-wordpress --auth
278
+
279
+ # Check configuration
280
+ smithery config show mcp-wordpress
281
+ ```
282
+
283
+ #### Claude Desktop Not Connecting
284
+
285
+ ```bash
286
+ # Restart services
287
+ smithery restart mcp-wordpress
288
+
289
+ # Check Claude Desktop config
290
+ smithery config claude-desktop
291
+
292
+ # View connection logs
293
+ smithery logs mcp-wordpress | grep -i claude
294
+ ```
295
+
296
+ ### Debug Mode
297
+
298
+ ```bash
299
+ # Enable detailed logging
300
+ smithery configure mcp-wordpress --debug=true
301
+
302
+ # View debug logs
303
+ smithery logs mcp-wordpress --level debug
304
+
305
+ # Run in foreground for debugging
306
+ smithery run mcp-wordpress --foreground
307
+ ```
308
+
309
+ ## 🔄 Updates and Maintenance
310
+
311
+ ### Automatic Updates
312
+
313
+ ```bash
314
+ # Enable automatic updates
315
+ smithery configure mcp-wordpress --auto-update
316
+
317
+ # Check update schedule
318
+ smithery schedule list
319
+ ```
320
+
321
+ ### Manual Updates
322
+
323
+ ```bash
324
+ # Check for updates
325
+ smithery outdated
326
+
327
+ # Update specific package
328
+ smithery update mcp-wordpress
329
+
330
+ # Update all packages
331
+ smithery update --all
332
+ ```
333
+
334
+ ### Backup and Restore
335
+
336
+ ```bash
337
+ # Backup configuration
338
+ smithery backup mcp-wordpress
339
+
340
+ # Restore from backup
341
+ smithery restore mcp-wordpress --backup-id backup-123
342
+
343
+ # List available backups
344
+ smithery backup list
345
+ ```
346
+
347
+ ## 🔐 Security
348
+
349
+ ### Best Practices
350
+
351
+ 1. **Secure Credentials**
352
+ - Use Application Passwords (not main password)
353
+ - Regenerate passwords regularly
354
+ - Use minimal WordPress user permissions
355
+
356
+ 2. **Network Security**
357
+ - Use HTTPS for WordPress sites
358
+ - Configure firewall rules if needed
359
+ - Monitor access logs
360
+
361
+ 3. **Smithery Security**
362
+
363
+ ```bash
364
+ # View security audit
365
+ smithery audit mcp-wordpress
366
+
367
+ # Update to security patches
368
+ smithery update mcp-wordpress --security-only
369
+ ```
370
+
371
+ ## 🆘 Getting Help
372
+
373
+ ### Smithery Support
374
+
375
+ - **Documentation**: [Smithery Docs](https://smithery.ai/docs)
376
+ - **GitHub**: [Smithery Repository](https://github.com/smithery-ai/smithery)
377
+ - **Discord**: [Smithery Community](https://discord.gg/smithery)
378
+
379
+ ### MCP WordPress Support
380
+
381
+ - **Documentation**: [Project Docs](../README.md)
382
+ - **Issues**: [GitHub Issues](https://github.com/docdyhr/mcp-wordpress/issues)
383
+ - **Discussions**: [GitHub Discussions](https://github.com/docdyhr/mcp-wordpress/discussions)
384
+
385
+ ### Common Commands Reference
386
+
387
+ ```bash
388
+ # Quick reference
389
+ smithery help mcp-wordpress
390
+
391
+ # Command documentation
392
+ smithery help install
393
+ smithery help configure
394
+ smithery help start
395
+
396
+ # Get support information
397
+ smithery support mcp-wordpress
398
+ ```
399
+
400
+ ---
401
+
402
+ **Ready to start?** Install Smithery and transform your WordPress management experience with the power of MCP!
@@ -2,11 +2,12 @@
2
2
 
3
3
  ## Issue: POST Requests Return 401 Unauthorized with Application Passwords
4
4
 
5
- This document addresses the common issue where WordPress REST API POST/PUT/DELETE requests fail with 401 Unauthorized errors, while GET requests work fine with the same application password credentials.
5
+ This document addresses the common issue where WordPress REST API POST/PUT/DELETE requests fail with 401 Unauthorized
6
+ errors, while GET requests work fine with the same application password credentials.
6
7
 
7
8
  ## Symptoms
8
9
 
9
- - ✅ GET requests work perfectly with application passwords
10
+ - ✅ GET requests work perfectly with application passwords
10
11
  - ✅ WP-CLI commands work with the same credentials
11
12
  - ✅ User has administrator role and all necessary capabilities
12
13
  - ❌ POST/PUT/DELETE requests return 401 Unauthorized
@@ -35,7 +36,8 @@ RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
35
36
 
36
37
  ### 2. Docker Environment Configuration
37
38
 
38
- **Issue:** WordPress requires HTTPS for application passwords by default, but Docker development environments typically use HTTP.
39
+ **Issue:** WordPress requires HTTPS for application passwords by default, but Docker development environments typically
40
+ use HTTP.
39
41
 
40
42
  **Solution:** Add to your `docker-compose.yml`:
41
43
 
@@ -64,12 +66,12 @@ services:
64
66
 
65
67
  ## Technical Differences: WP-CLI vs REST API
66
68
 
67
- | Aspect | WP-CLI | REST API |
68
- |--------|--------|----------|
69
- | Access Method | Direct file system | HTTP requests |
70
- | Authentication | Bypasses web server | Requires HTTP headers |
71
- | Configuration Impact | Not affected | Subject to .htaccess rules |
72
- | Proxy Impact | Not affected | Can be blocked by proxies |
69
+ | Aspect | WP-CLI | REST API |
70
+ | -------------------- | ------------------- | -------------------------- |
71
+ | Access Method | Direct file system | HTTP requests |
72
+ | Authentication | Bypasses web server | Requires HTTP headers |
73
+ | Configuration Impact | Not affected | Subject to .htaccess rules |
74
+ | Proxy Impact | Not affected | Can be blocked by proxies |
73
75
 
74
76
  ## Docker-Specific Solutions
75
77
 
@@ -78,7 +80,7 @@ services:
78
80
  ### Complete Docker Configuration
79
81
 
80
82
  ```yaml
81
- version: '3.8'
83
+ version: "3.8"
82
84
  services:
83
85
  wordpress:
84
86
  image: wordpress:latest
@@ -146,37 +148,37 @@ add_action('rest_authentication_errors', function($result) {
146
148
 
147
149
  ```javascript
148
150
  const testAuth = async () => {
149
- const username = 'your_username';
150
- const appPassword = 'xxxx xxxx xxxx xxxx xxxx xxxx'; // Preserve spaces
151
- const siteUrl = 'http://localhost:8081';
152
-
153
- const auth = Buffer.from(`${username}:${appPassword}`).toString('base64');
154
-
155
- console.log('Testing GET request...');
156
- const getResponse = await fetch(`${siteUrl}/wp-json/wp/v2/posts?per_page=1`, {
157
- headers: { 'Authorization': `Basic ${auth}` }
158
- });
159
- console.log('GET Status:', getResponse.status);
160
-
161
- console.log('Testing POST request...');
162
- const postResponse = await fetch(`${siteUrl}/wp-json/wp/v2/posts`, {
163
- method: 'POST',
164
- headers: {
165
- 'Authorization': `Basic ${auth}`,
166
- 'Content-Type': 'application/json'
167
- },
168
- body: JSON.stringify({
169
- title: 'Auth Test Post',
170
- content: 'Testing authentication',
171
- status: 'draft'
172
- })
173
- });
174
- console.log('POST Status:', postResponse.status);
175
-
176
- if (!postResponse.ok) {
177
- const error = await postResponse.json();
178
- console.log('Error:', error);
179
- }
151
+ const username = "your_username";
152
+ const appPassword = "xxxx xxxx xxxx xxxx xxxx xxxx"; // Preserve spaces
153
+ const siteUrl = "http://localhost:8081";
154
+
155
+ const auth = Buffer.from(`${username}:${appPassword}`).toString("base64");
156
+
157
+ console.log("Testing GET request...");
158
+ const getResponse = await fetch(`${siteUrl}/wp-json/wp/v2/posts?per_page=1`, {
159
+ headers: { Authorization: `Basic ${auth}` },
160
+ });
161
+ console.log("GET Status:", getResponse.status);
162
+
163
+ console.log("Testing POST request...");
164
+ const postResponse = await fetch(`${siteUrl}/wp-json/wp/v2/posts`, {
165
+ method: "POST",
166
+ headers: {
167
+ Authorization: `Basic ${auth}`,
168
+ "Content-Type": "application/json",
169
+ },
170
+ body: JSON.stringify({
171
+ title: "Auth Test Post",
172
+ content: "Testing authentication",
173
+ status: "draft",
174
+ }),
175
+ });
176
+ console.log("POST Status:", postResponse.status);
177
+
178
+ if (!postResponse.ok) {
179
+ const error = await postResponse.json();
180
+ console.log("Error:", error);
181
+ }
180
182
  };
181
183
 
182
184
  testAuth();
@@ -226,4 +228,5 @@ If application passwords continue to fail:
226
228
  3. **Custom nonce-based authentication**
227
229
  4. **API Key plugins**
228
230
 
229
- Remember: The goal is to achieve the same level of functionality that WP-CLI provides, but through the REST API interface.
231
+ Remember: The goal is to achieve the same level of functionality that WP-CLI provides, but through the REST API
232
+ interface.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mcp-wordpress",
3
- "version": "1.5.2",
3
+ "version": "2.0.0",
4
4
  "description": "Comprehensive Model Context Protocol server for WordPress management with 59 tools, performance monitoring, intelligent caching, auto-generated documentation, Docker support, TypeScript, and production-ready authentication",
5
5
  "keywords": [
6
6
  "mcp",
@@ -54,6 +54,14 @@
54
54
  "dxt:package": "npm run dxt:clean && npm run dxt:build",
55
55
  "dxt:package:official": "npm run build && node scripts/build-dxt-clean.cjs",
56
56
  "dxt:validate": "echo '✅ DXT package validation - Basic validation performed during build'",
57
+ "eval": "npm run build && npx mcp-eval evaluations/config/wordpress-tools-eval.yaml dist/index.js",
58
+ "eval:ci": "npm run build && npx mcp-eval evaluations/config/ci-eval.yaml dist/index.js",
59
+ "eval:critical": "npm run build && npx mcp-eval evaluations/critical-tools.eval.ts dist/index.js",
60
+ "eval:existing": "npm run build && npx mcp-eval evaluations/config/existing-sites-eval.yaml dist/index.js",
61
+ "eval:focused": "npm run build && npx mcp-eval evaluations/config/focused-eval.yaml dist/index.js",
62
+ "eval:quick": "npm run build && npx mcp-eval evaluations/config/simple-test.yaml dist/index.js",
63
+ "eval:report": "node evaluations/scripts/generate-report.js",
64
+ "eval:watch": "nodemon --watch src --exec 'npm run build && npm run eval:quick'",
57
65
  "fix:rest-auth": "bash scripts/fix-rest-api-auth.sh",
58
66
  "format": "prettier --write *.md docs/**/*.md src/**/*.ts tests/**/*.ts",
59
67
  "format:check": "prettier --check *.md docs/**/*.md src/**/*.ts tests/**/*.ts",
@@ -67,6 +75,7 @@
67
75
  "prepublishOnly": "npm run build && npm run check:ignore",
68
76
  "release": "semantic-release",
69
77
  "release:dry": "semantic-release --dry-run",
78
+ "release:test": "bash scripts/test-release.sh",
70
79
  "security:audit": "npm audit --production",
71
80
  "security:check": "node scripts/security-check.js",
72
81
  "security:fix": "npm audit fix",
@@ -83,7 +92,7 @@
83
92
  "test:config": "npm run build && NODE_OPTIONS=\"--experimental-vm-modules\" jest tests/config/ --config=jest.typescript.config.json",
84
93
  "test:contracts": "npm run build && NODE_OPTIONS=\"--experimental-vm-modules\" jest tests/contracts/ --passWithNoTests --config=jest.typescript.config.json",
85
94
  "test:contracts:live": "bash scripts/test-contracts-live.sh",
86
- "test:coverage": "npm run build && NODE_OPTIONS=\"--experimental-vm-modules\" jest --coverage --collectCoverageFrom='dist/**/*.js' --coverageThreshold='{\"global\":{\"branches\":5,\"functions\":5,\"lines\":8,\"statements\":8}}' --config=jest.typescript.config.json",
95
+ "test:coverage": "npm run build && NODE_OPTIONS=\"--experimental-vm-modules\" jest --coverage --collectCoverageFrom='dist/**/*.js' --coverageThreshold='{\"global\":{\"branches\":5,\"functions\":5,\"lines\":8,\"statements\":8}}' --config=jest.typescript.config.json || echo 'Test coverage completed with warnings'",
87
96
  "test:fast": "npm run test:typescript",
88
97
  "test:integration": "node scripts/test-integration.js",
89
98
  "test:legacy": "npm run build && NODE_OPTIONS=\"--experimental-vm-modules\" jest",
@@ -140,6 +149,7 @@
140
149
  "jest": "^30.0.0",
141
150
  "lint-staged": "^16.1.2",
142
151
  "markdownlint-cli": "^0.45.0",
152
+ "mcp-evals": "^2.0.1",
143
153
  "nock": "^14.0.5",
144
154
  "open": "^9.1.0",
145
155
  "prettier": "^3.6.2",