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.
- package/README.md +332 -61
- package/dist/cache/CacheInvalidation.d.ts.map +1 -1
- package/dist/cache/CacheInvalidation.js +4 -4
- package/dist/cache/CacheInvalidation.js.map +1 -1
- package/dist/client/MockWordPressClient.d.ts +55 -0
- package/dist/client/MockWordPressClient.d.ts.map +1 -0
- package/dist/client/MockWordPressClient.js +369 -0
- package/dist/client/MockWordPressClient.js.map +1 -0
- package/dist/client/api.d.ts +1 -0
- package/dist/client/api.d.ts.map +1 -1
- package/dist/client/api.js +26 -60
- package/dist/client/api.js.map +1 -1
- package/dist/client/managers/AuthenticationManager.d.ts.map +1 -1
- package/dist/client/managers/AuthenticationManager.js +4 -3
- package/dist/client/managers/AuthenticationManager.js.map +1 -1
- package/dist/config/ConfigurationSchema.d.ts +3 -3
- package/dist/config/ConfigurationSchema.d.ts.map +1 -1
- package/dist/config/ConfigurationSchema.js +7 -24
- package/dist/config/ConfigurationSchema.js.map +1 -1
- package/dist/config/ServerConfiguration.d.ts +8 -0
- package/dist/config/ServerConfiguration.d.ts.map +1 -1
- package/dist/config/ServerConfiguration.js +80 -31
- package/dist/config/ServerConfiguration.js.map +1 -1
- package/dist/docs/DocumentationGenerator.d.ts.map +1 -1
- package/dist/docs/DocumentationGenerator.js +5 -7
- package/dist/docs/DocumentationGenerator.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -29
- package/dist/index.js.map +1 -1
- package/dist/security/InputValidator.d.ts.map +1 -1
- package/dist/security/InputValidator.js +3 -11
- package/dist/security/InputValidator.js.map +1 -1
- package/dist/server/ToolRegistry.d.ts +4 -0
- package/dist/server/ToolRegistry.d.ts.map +1 -1
- package/dist/server/ToolRegistry.js +71 -8
- package/dist/server/ToolRegistry.js.map +1 -1
- package/dist/tools/auth.d.ts.map +1 -1
- package/dist/tools/auth.js +8 -3
- package/dist/tools/auth.js.map +1 -1
- package/dist/tools/posts.d.ts.map +1 -1
- package/dist/tools/posts.js +287 -20
- package/dist/tools/posts.js.map +1 -1
- package/dist/tools/site.d.ts.map +1 -1
- package/dist/tools/site.js +47 -9
- package/dist/tools/site.js.map +1 -1
- package/dist/tools/users.d.ts.map +1 -1
- package/dist/tools/users.js +113 -10
- package/dist/tools/users.js.map +1 -1
- package/dist/utils/enhancedError.d.ts +61 -0
- package/dist/utils/enhancedError.d.ts.map +1 -0
- package/dist/utils/enhancedError.js +221 -0
- package/dist/utils/enhancedError.js.map +1 -0
- package/dist/utils/streaming.d.ts +104 -0
- package/dist/utils/streaming.d.ts.map +1 -0
- package/dist/utils/streaming.js +312 -0
- package/dist/utils/streaming.js.map +1 -0
- package/dist/utils/validation.d.ts +19 -3
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +174 -24
- package/dist/utils/validation.js.map +1 -1
- package/docs/ARCHITECTURE.md +850 -0
- package/docs/CACHING.md +20 -17
- package/docs/CONFIGURATION.md +660 -0
- package/docs/DOCKER.md +61 -60
- package/docs/EVALUATION.md +397 -0
- package/docs/INSTALLATION.md +423 -0
- package/docs/PERFORMANCE_MONITORING.md +17 -15
- package/docs/SECURITY.md +621 -0
- package/docs/SECURITY_TESTING.md +22 -26
- package/docs/TEST_SITE_SETUP.md +136 -0
- package/docs/TROUBLESHOOTING.md +578 -0
- package/docs/api/README.md +76 -91
- package/docs/api/categories/auth.md +0 -2
- package/docs/api/categories/cache.md +0 -2
- package/docs/api/categories/comment.md +0 -2
- package/docs/api/categories/media.md +0 -2
- package/docs/api/categories/page.md +0 -2
- package/docs/api/categories/performance.md +0 -2
- package/docs/api/categories/post.md +0 -2
- package/docs/api/categories/site.md +0 -2
- package/docs/api/categories/taxonomy.md +0 -2
- package/docs/api/categories/user.md +0 -2
- package/docs/api/summary.json +1 -1
- package/docs/api/tools/wp_approve_comment.md +11 -3
- package/docs/api/tools/wp_cache_clear.md +14 -5
- package/docs/api/tools/wp_cache_info.md +14 -5
- package/docs/api/tools/wp_cache_stats.md +14 -5
- package/docs/api/tools/wp_cache_warm.md +14 -5
- package/docs/api/tools/wp_create_application_password.md +11 -3
- package/docs/api/tools/wp_create_category.md +11 -3
- package/docs/api/tools/wp_create_comment.md +14 -5
- package/docs/api/tools/wp_create_page.md +13 -5
- package/docs/api/tools/wp_create_post.md +14 -7
- package/docs/api/tools/wp_create_tag.md +11 -3
- package/docs/api/tools/wp_create_user.md +13 -5
- package/docs/api/tools/wp_delete_application_password.md +11 -3
- package/docs/api/tools/wp_delete_category.md +11 -3
- package/docs/api/tools/wp_delete_comment.md +11 -3
- package/docs/api/tools/wp_delete_media.md +10 -3
- package/docs/api/tools/wp_delete_page.md +10 -3
- package/docs/api/tools/wp_delete_post.md +11 -5
- package/docs/api/tools/wp_delete_tag.md +11 -3
- package/docs/api/tools/wp_delete_user.md +10 -3
- package/docs/api/tools/wp_get_application_passwords.md +11 -3
- package/docs/api/tools/wp_get_auth_status.md +11 -3
- package/docs/api/tools/wp_get_category.md +11 -3
- package/docs/api/tools/wp_get_comment.md +11 -3
- package/docs/api/tools/wp_get_current_user.md +11 -3
- package/docs/api/tools/wp_get_media.md +11 -3
- package/docs/api/tools/wp_get_page.md +11 -3
- package/docs/api/tools/wp_get_page_revisions.md +11 -3
- package/docs/api/tools/wp_get_post.md +12 -5
- package/docs/api/tools/wp_get_post_revisions.md +11 -3
- package/docs/api/tools/wp_get_site_settings.md +10 -3
- package/docs/api/tools/wp_get_tag.md +11 -3
- package/docs/api/tools/wp_get_user.md +11 -3
- package/docs/api/tools/wp_list_categories.md +11 -3
- package/docs/api/tools/wp_list_comments.md +11 -3
- package/docs/api/tools/wp_list_media.md +14 -5
- package/docs/api/tools/wp_list_pages.md +14 -5
- package/docs/api/tools/wp_list_posts.md +15 -7
- package/docs/api/tools/wp_list_tags.md +11 -3
- package/docs/api/tools/wp_list_users.md +11 -3
- package/docs/api/tools/wp_performance_alerts.md +17 -7
- package/docs/api/tools/wp_performance_benchmark.md +17 -7
- package/docs/api/tools/wp_performance_export.md +17 -7
- package/docs/api/tools/wp_performance_history.md +17 -7
- package/docs/api/tools/wp_performance_optimize.md +17 -7
- package/docs/api/tools/wp_performance_stats.md +17 -7
- package/docs/api/tools/wp_search_site.md +11 -3
- package/docs/api/tools/wp_spam_comment.md +11 -3
- package/docs/api/tools/wp_switch_auth_method.md +14 -5
- package/docs/api/tools/wp_test_auth.md +11 -3
- package/docs/api/tools/wp_update_category.md +11 -3
- package/docs/api/tools/wp_update_comment.md +14 -5
- package/docs/api/tools/wp_update_media.md +14 -5
- package/docs/api/tools/wp_update_page.md +13 -5
- package/docs/api/tools/wp_update_post.md +14 -7
- package/docs/api/tools/wp_update_site_settings.md +14 -5
- package/docs/api/tools/wp_update_tag.md +11 -3
- package/docs/api/tools/wp_update_user.md +13 -5
- package/docs/api/tools/wp_upload_media.md +13 -5
- package/docs/api/types/WordPressPost.md +2 -0
- package/docs/code-improvements.md +40 -0
- package/docs/contract-testing.md +1 -1
- package/docs/developer/API_REFERENCE.md +19 -59
- package/docs/developer/ARCHITECTURE.md +8 -11
- package/docs/developer/BUILD_SYSTEM.md +2 -2
- package/docs/developer/CONTRIBUTING.md +3 -5
- package/docs/developer/GITHUB_ACTIONS_SETUP.md +2 -2
- package/docs/developer/MIGRATION_GUIDE.md +5 -6
- package/docs/developer/README.md +2 -1
- package/docs/developer/REFACTORING.md +9 -15
- package/docs/developer/RELEASE_PROCESS.md +4 -3
- package/docs/developer/TESTING.md +2 -2
- package/docs/examples/claude-desktop-config.md +8 -0
- package/docs/integrations/claude-desktop.md +426 -0
- package/docs/integrations/cline.md +537 -0
- package/docs/integrations/vs-code.md +515 -0
- package/docs/releases/COMMUNITY_ANNOUNCEMENT_v1.1.2.md +30 -23
- package/docs/releases/RELEASE_NOTES_v1.1.2.md +7 -6
- package/docs/testing-configurations.md +11 -0
- package/docs/user-guides/DOCKER_NPM_DTX_SETUP.md +3 -2
- package/docs/user-guides/DOCKER_SETUP.md +3 -2
- package/docs/user-guides/DTX_SETUP.md +6 -5
- package/docs/user-guides/DXT_INSTALLATION.md +4 -4
- package/docs/user-guides/NPM_SETUP.md +4 -2
- package/docs/user-guides/NPX_SETUP.md +4 -2
- package/docs/user-guides/SMITHERY_SETUP.md +402 -0
- package/docs/wordpress-rest-api-authentication-troubleshooting.md +45 -42
- package/package.json +12 -2
- package/src/cache/CacheInvalidation.ts +7 -18
- package/src/client/MockWordPressClient.ts +398 -0
- package/src/client/api.ts +77 -237
- package/src/client/managers/AuthenticationManager.ts +19 -56
- package/src/config/ConfigurationSchema.ts +14 -45
- package/src/config/ServerConfiguration.ts +98 -71
- package/src/docs/DocumentationGenerator.ts +39 -123
- package/src/dxt-entry.cjs +4 -1
- package/src/index.ts +35 -54
- package/src/security/InputValidator.ts +15 -57
- package/src/server/ToolRegistry.ts +88 -17
- package/src/tools/auth.ts +15 -22
- package/src/tools/posts.ts +347 -64
- package/src/tools/site.ts +69 -46
- package/src/tools/users.ts +142 -44
- package/src/utils/enhancedError.ts +248 -0
- package/src/utils/streaming.ts +428 -0
- package/src/utils/validation.ts +253 -92
- package/dist/mcp-wordpress-1.5.2.tgz +0 -0
|
@@ -0,0 +1,578 @@
|
|
|
1
|
+
# Troubleshooting Guide
|
|
2
|
+
|
|
3
|
+
Comprehensive troubleshooting guide for common issues with MCP WordPress Server.
|
|
4
|
+
|
|
5
|
+
## 🔍 Quick Diagnosis
|
|
6
|
+
|
|
7
|
+
### Health Check Commands
|
|
8
|
+
|
|
9
|
+
Before diving into specific issues, run these diagnostic commands:
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Overall system health
|
|
13
|
+
npm run health
|
|
14
|
+
|
|
15
|
+
# Connection status
|
|
16
|
+
npm run status
|
|
17
|
+
|
|
18
|
+
# Test authentication
|
|
19
|
+
npm run test:auth
|
|
20
|
+
|
|
21
|
+
# Quick tool validation
|
|
22
|
+
npm run test:tools
|
|
23
|
+
|
|
24
|
+
# Performance check
|
|
25
|
+
npm run test:performance
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Common Issue Categories
|
|
29
|
+
|
|
30
|
+
| Issue Type | Symptoms | Quick Fix |
|
|
31
|
+
|------------|----------|-----------|
|
|
32
|
+
| **[Connection](#-connection-issues)** | Can't reach WordPress | Check URL and network |
|
|
33
|
+
| **[Authentication](#-authentication-issues)** | Login failures | Verify credentials |
|
|
34
|
+
| **[Tools](#️-tool-issues)** | Commands not working | Check permissions |
|
|
35
|
+
| **[Performance](#-performance-issues)** | Slow responses | Enable caching |
|
|
36
|
+
| **[Claude Desktop](#️-claude-desktop-issues)** | Not appearing in Claude | Restart and reconfigure |
|
|
37
|
+
|
|
38
|
+
## 🌐 Connection Issues
|
|
39
|
+
|
|
40
|
+
### Issue: "Cannot connect to WordPress"
|
|
41
|
+
|
|
42
|
+
**Symptoms:**
|
|
43
|
+
- Connection timeout errors
|
|
44
|
+
- "Site not reachable" messages
|
|
45
|
+
- Network-related failures
|
|
46
|
+
|
|
47
|
+
**Diagnosis:**
|
|
48
|
+
```bash
|
|
49
|
+
# Test WordPress REST API manually
|
|
50
|
+
curl -i https://your-site.com/wp-json/wp/v2/
|
|
51
|
+
|
|
52
|
+
# Should return HTTP 200 with JSON data
|
|
53
|
+
# If not, WordPress REST API may be disabled
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
**Solutions:**
|
|
57
|
+
|
|
58
|
+
1. **Verify WordPress URL Format**
|
|
59
|
+
```bash
|
|
60
|
+
# ✅ Correct formats
|
|
61
|
+
https://yoursite.com
|
|
62
|
+
https://www.yoursite.com
|
|
63
|
+
https://blog.yoursite.com
|
|
64
|
+
|
|
65
|
+
# ❌ Incorrect formats
|
|
66
|
+
yoursite.com # Missing protocol
|
|
67
|
+
https://yoursite.com/ # Trailing slash
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
2. **Check WordPress REST API**
|
|
71
|
+
- Go to **Settings** → **Permalinks** in WordPress admin
|
|
72
|
+
- Click "Save Changes" to refresh rewrite rules
|
|
73
|
+
- Verify REST API is not disabled by plugins
|
|
74
|
+
|
|
75
|
+
3. **Network and Firewall**
|
|
76
|
+
```bash
|
|
77
|
+
# Test connectivity
|
|
78
|
+
ping yoursite.com
|
|
79
|
+
|
|
80
|
+
# Test HTTPS
|
|
81
|
+
curl -I https://yoursite.com
|
|
82
|
+
|
|
83
|
+
# Test specific port if needed
|
|
84
|
+
telnet yoursite.com 443
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
4. **WordPress Configuration**
|
|
88
|
+
```php
|
|
89
|
+
// In wp-config.php, ensure REST API is enabled
|
|
90
|
+
// Remove or comment out if present:
|
|
91
|
+
// add_filter('rest_enabled', '__return_false');
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Issue: "SSL Certificate Error"
|
|
95
|
+
|
|
96
|
+
**Symptoms:**
|
|
97
|
+
- SSL verification failures
|
|
98
|
+
- Certificate warnings
|
|
99
|
+
|
|
100
|
+
**Solutions:**
|
|
101
|
+
```bash
|
|
102
|
+
# For development only - disable SSL verification
|
|
103
|
+
export NODE_TLS_REJECT_UNAUTHORIZED=0
|
|
104
|
+
|
|
105
|
+
# Better solution: Fix SSL certificate
|
|
106
|
+
# Contact your hosting provider or use Let's Encrypt
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## 🔐 Authentication Issues
|
|
110
|
+
|
|
111
|
+
### Issue: "Authentication failed"
|
|
112
|
+
|
|
113
|
+
**Symptoms:**
|
|
114
|
+
- 401 Unauthorized errors
|
|
115
|
+
- "Invalid credentials" messages
|
|
116
|
+
- Login repeatedly fails
|
|
117
|
+
|
|
118
|
+
**Diagnosis:**
|
|
119
|
+
```bash
|
|
120
|
+
# Test authentication manually
|
|
121
|
+
curl -u "username:app-password" https://your-site.com/wp-json/wp/v2/users/me
|
|
122
|
+
|
|
123
|
+
# Should return user information
|
|
124
|
+
# If 401, credentials are wrong
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
**Solutions:**
|
|
128
|
+
|
|
129
|
+
1. **Application Password Format**
|
|
130
|
+
```bash
|
|
131
|
+
# ✅ Correct format (with spaces)
|
|
132
|
+
WORDPRESS_APP_PASSWORD="AbCd EfGh IjKl MnOp QrSt UvWx"
|
|
133
|
+
|
|
134
|
+
# ❌ Incorrect formats
|
|
135
|
+
WORDPRESS_APP_PASSWORD=AbCdEfGhIjKlMnOpQrStUvWx # No spaces
|
|
136
|
+
WORDPRESS_APP_PASSWORD='AbCd EfGh...' # Single quotes
|
|
137
|
+
WORDPRESS_APP_PASSWORD="AbCd-EfGh-IjKl..." # Hyphens instead of spaces
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
2. **Regenerate Application Password**
|
|
141
|
+
- WordPress Admin → Users → Profile
|
|
142
|
+
- Delete old application password
|
|
143
|
+
- Create new one: "MCP WordPress Server"
|
|
144
|
+
- Copy the exact password shown (with spaces)
|
|
145
|
+
|
|
146
|
+
3. **Check WordPress User Permissions**
|
|
147
|
+
```text
|
|
148
|
+
# Minimum role requirements:
|
|
149
|
+
- Read operations: Subscriber
|
|
150
|
+
- Create/edit posts: Author
|
|
151
|
+
- Manage comments: Editor
|
|
152
|
+
- Site settings: Administrator
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
4. **Verify Application Passwords are Enabled**
|
|
156
|
+
```php
|
|
157
|
+
// In functions.php or plugin
|
|
158
|
+
// Ensure this is NOT present:
|
|
159
|
+
// add_filter('wp_is_application_passwords_available', '__return_false');
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
### Issue: "Permission denied for operation"
|
|
163
|
+
|
|
164
|
+
**Symptoms:**
|
|
165
|
+
- Some tools work, others fail
|
|
166
|
+
- "Insufficient permissions" errors
|
|
167
|
+
|
|
168
|
+
**Solutions:**
|
|
169
|
+
|
|
170
|
+
1. **Check User Role Requirements**
|
|
171
|
+
```bash
|
|
172
|
+
# Test user capabilities
|
|
173
|
+
curl -u "username:app-password" \
|
|
174
|
+
https://your-site.com/wp-json/wp/v2/users/me | \
|
|
175
|
+
jq '.capabilities'
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
2. **Role-Based Access Matrix**
|
|
179
|
+
| Operation | Subscriber | Author | Editor | Admin |
|
|
180
|
+
|-----------|------------|--------|--------|-------|
|
|
181
|
+
| Read posts | ✅ | ✅ | ✅ | ✅ |
|
|
182
|
+
| Create posts | ❌ | ✅ | ✅ | ✅ |
|
|
183
|
+
| Edit others' posts | ❌ | ❌ | ✅ | ✅ |
|
|
184
|
+
| Manage users | ❌ | ❌ | ❌ | ✅ |
|
|
185
|
+
| Site settings | ❌ | ❌ | ❌ | ✅ |
|
|
186
|
+
|
|
187
|
+
## 🛠️ Tool Issues
|
|
188
|
+
|
|
189
|
+
### Issue: "Tool not found" or "Command failed"
|
|
190
|
+
|
|
191
|
+
**Symptoms:**
|
|
192
|
+
- Specific WordPress tools don't work
|
|
193
|
+
- "Unknown tool" errors
|
|
194
|
+
- Tools missing from Claude
|
|
195
|
+
|
|
196
|
+
**Diagnosis:**
|
|
197
|
+
```bash
|
|
198
|
+
# List available tools
|
|
199
|
+
npm run test:tools
|
|
200
|
+
|
|
201
|
+
# Test specific tool
|
|
202
|
+
DEBUG=true npm run dev
|
|
203
|
+
# Then try the failing tool
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
**Solutions:**
|
|
207
|
+
|
|
208
|
+
1. **Verify Tool Registration**
|
|
209
|
+
```bash
|
|
210
|
+
# Check all tools are loaded
|
|
211
|
+
npm run status | grep "tools available"
|
|
212
|
+
# Should show "59 tools available"
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
2. **Test Individual Tool Categories**
|
|
216
|
+
```text
|
|
217
|
+
# In Claude, test each category:
|
|
218
|
+
"List my WordPress posts" # Posts tools
|
|
219
|
+
"Show my WordPress users" # User tools
|
|
220
|
+
"Check WordPress site settings" # Site tools
|
|
221
|
+
"Show cache statistics" # Cache tools
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
3. **Check Multi-Site Configuration**
|
|
225
|
+
```bash
|
|
226
|
+
# If using multi-site, always specify site parameter
|
|
227
|
+
# ✅ Correct
|
|
228
|
+
wp_list_posts --site="main-site"
|
|
229
|
+
|
|
230
|
+
# ❌ Incorrect (will fail with multiple sites)
|
|
231
|
+
wp_list_posts
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### Issue: "Invalid parameters" errors
|
|
235
|
+
|
|
236
|
+
**Symptoms:**
|
|
237
|
+
- Tools reject valid-looking parameters
|
|
238
|
+
- Type validation errors
|
|
239
|
+
|
|
240
|
+
**Solutions:**
|
|
241
|
+
|
|
242
|
+
1. **Check Parameter Types**
|
|
243
|
+
```text
|
|
244
|
+
# ✅ Correct parameter types
|
|
245
|
+
wp_create_post --title="My Post" --content="Content here"
|
|
246
|
+
|
|
247
|
+
# ❌ Incorrect (missing quotes for strings)
|
|
248
|
+
wp_create_post --title=My Post --content=Content here
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
2. **Required vs Optional Parameters**
|
|
252
|
+
```bash
|
|
253
|
+
# Check tool documentation
|
|
254
|
+
# Each tool specifies required parameters
|
|
255
|
+
# See docs/api/tools/[tool-name].md
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
## ⚡ Performance Issues
|
|
259
|
+
|
|
260
|
+
### Issue: Slow response times
|
|
261
|
+
|
|
262
|
+
**Symptoms:**
|
|
263
|
+
- Tools take a long time to respond
|
|
264
|
+
- Timeout errors
|
|
265
|
+
- Claude appears to hang
|
|
266
|
+
|
|
267
|
+
**Diagnosis:**
|
|
268
|
+
```bash
|
|
269
|
+
# Check performance metrics
|
|
270
|
+
npm run test:performance
|
|
271
|
+
|
|
272
|
+
# Test with caching disabled
|
|
273
|
+
DISABLE_CACHE=true npm run dev
|
|
274
|
+
|
|
275
|
+
# Monitor cache statistics
|
|
276
|
+
npm run cache:stats
|
|
277
|
+
```
|
|
278
|
+
|
|
279
|
+
**Solutions:**
|
|
280
|
+
|
|
281
|
+
1. **Enable Caching**
|
|
282
|
+
```bash
|
|
283
|
+
# Ensure caching is enabled (default)
|
|
284
|
+
# Remove this line if present:
|
|
285
|
+
# DISABLE_CACHE=true
|
|
286
|
+
|
|
287
|
+
# Check cache performance
|
|
288
|
+
npm run cache:stats
|
|
289
|
+
```
|
|
290
|
+
|
|
291
|
+
2. **WordPress Optimization**
|
|
292
|
+
- Install caching plugin (W3 Total Cache, WP Rocket)
|
|
293
|
+
- Optimize database and images
|
|
294
|
+
- Use CDN for media files
|
|
295
|
+
- Upgrade hosting if necessary
|
|
296
|
+
|
|
297
|
+
3. **Network Optimization**
|
|
298
|
+
```bash
|
|
299
|
+
# Test network latency
|
|
300
|
+
ping your-site.com
|
|
301
|
+
|
|
302
|
+
# Test WordPress response time
|
|
303
|
+
time curl -s https://your-site.com/wp-json/wp/v2/ > /dev/null
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### Issue: Memory or CPU high usage
|
|
307
|
+
|
|
308
|
+
**Symptoms:**
|
|
309
|
+
- System becomes slow
|
|
310
|
+
- High resource usage
|
|
311
|
+
- Crashes or restarts
|
|
312
|
+
|
|
313
|
+
**Solutions:**
|
|
314
|
+
|
|
315
|
+
1. **Monitor Resource Usage**
|
|
316
|
+
```bash
|
|
317
|
+
# Check memory usage
|
|
318
|
+
npm run test:performance | grep memory
|
|
319
|
+
|
|
320
|
+
# Monitor during operation
|
|
321
|
+
top -p $(pgrep node)
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
2. **Optimize Configuration**
|
|
325
|
+
```bash
|
|
326
|
+
# Reduce cache size if memory is limited
|
|
327
|
+
# Edit configuration:
|
|
328
|
+
CACHE_MAX_SIZE=100 # Reduce from default 1000
|
|
329
|
+
|
|
330
|
+
# Disable performance monitoring in production
|
|
331
|
+
DISABLE_PERFORMANCE_MONITORING=true
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
## 🖥️ Claude Desktop Issues
|
|
335
|
+
|
|
336
|
+
### Issue: "WordPress tools not appearing in Claude"
|
|
337
|
+
|
|
338
|
+
**Symptoms:**
|
|
339
|
+
- Claude doesn't recognize WordPress commands
|
|
340
|
+
- No WordPress functionality available
|
|
341
|
+
- "I don't have access to WordPress" responses
|
|
342
|
+
|
|
343
|
+
**Solutions:**
|
|
344
|
+
|
|
345
|
+
1. **Restart Claude Desktop**
|
|
346
|
+
```bash
|
|
347
|
+
# Always restart Claude Desktop after configuration changes
|
|
348
|
+
# This ensures MCP server connections are refreshed
|
|
349
|
+
```
|
|
350
|
+
|
|
351
|
+
2. **Check Configuration File**
|
|
352
|
+
|
|
353
|
+
**For DXT Extension:**
|
|
354
|
+
- Verify extension is enabled in Claude Desktop
|
|
355
|
+
- Check configuration in Extensions settings
|
|
356
|
+
- Reinstall DXT if necessary
|
|
357
|
+
|
|
358
|
+
**For NPX/NPM Method:**
|
|
359
|
+
```json
|
|
360
|
+
// Verify Claude Desktop config file format
|
|
361
|
+
{
|
|
362
|
+
"mcpServers": {
|
|
363
|
+
"mcp-wordpress": {
|
|
364
|
+
"command": "npx",
|
|
365
|
+
"args": ["-y", "mcp-wordpress"],
|
|
366
|
+
"env": {
|
|
367
|
+
"WORDPRESS_SITE_URL": "https://your-site.com",
|
|
368
|
+
"WORDPRESS_USERNAME": "your-username",
|
|
369
|
+
"WORDPRESS_APP_PASSWORD": "your-app-password"
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
3. **Verify Configuration File Location**
|
|
377
|
+
|
|
378
|
+
**macOS:**
|
|
379
|
+
```bash
|
|
380
|
+
~/Library/Application Support/Claude/claude_desktop_config.json
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
**Windows:**
|
|
384
|
+
```bash
|
|
385
|
+
%APPDATA%\Claude\claude_desktop_config.json
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
**Linux:**
|
|
389
|
+
```bash
|
|
390
|
+
~/.config/claude_desktop_config.json
|
|
391
|
+
```
|
|
392
|
+
|
|
393
|
+
### Issue: "Server connection failed"
|
|
394
|
+
|
|
395
|
+
**Symptoms:**
|
|
396
|
+
- Claude shows "MCP server connection failed"
|
|
397
|
+
- Server appears to start but then disconnects
|
|
398
|
+
|
|
399
|
+
**Solutions:**
|
|
400
|
+
|
|
401
|
+
1. **Check Server Logs**
|
|
402
|
+
```bash
|
|
403
|
+
# Run server manually to see errors
|
|
404
|
+
DEBUG=true npx -y mcp-wordpress
|
|
405
|
+
|
|
406
|
+
# Look for specific error messages
|
|
407
|
+
# Common issues: missing dependencies, port conflicts
|
|
408
|
+
```
|
|
409
|
+
|
|
410
|
+
2. **JSON-RPC Protocol Issues**
|
|
411
|
+
```bash
|
|
412
|
+
# Recent fix for DXT: JSON parsing errors
|
|
413
|
+
# Update to latest version
|
|
414
|
+
curl -L -o mcp-wordpress.dxt \
|
|
415
|
+
https://github.com/docdyhr/mcp-wordpress/raw/main/mcp-wordpress.dxt
|
|
416
|
+
|
|
417
|
+
# Reinstall DXT extension
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
3. **Environment Issues**
|
|
421
|
+
```bash
|
|
422
|
+
# Test Node.js version
|
|
423
|
+
node --version # Should be 16+
|
|
424
|
+
|
|
425
|
+
# Test npm access
|
|
426
|
+
npm --version
|
|
427
|
+
|
|
428
|
+
# Clear npm cache if needed
|
|
429
|
+
npm cache clean --force
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
## 🐳 Docker Issues
|
|
433
|
+
|
|
434
|
+
### Issue: Container won't start
|
|
435
|
+
|
|
436
|
+
**Symptoms:**
|
|
437
|
+
- Docker container exits immediately
|
|
438
|
+
- "Configuration missing" errors
|
|
439
|
+
|
|
440
|
+
**Solutions:**
|
|
441
|
+
|
|
442
|
+
1. **Check Environment Variables**
|
|
443
|
+
```bash
|
|
444
|
+
# Verify all required variables are set
|
|
445
|
+
docker run --rm docdyhr/mcp-wordpress:latest env | grep WORDPRESS
|
|
446
|
+
|
|
447
|
+
# Should show:
|
|
448
|
+
# WORDPRESS_SITE_URL=...
|
|
449
|
+
# WORDPRESS_USERNAME=...
|
|
450
|
+
# WORDPRESS_APP_PASSWORD=...
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
2. **Check Container Logs**
|
|
454
|
+
```bash
|
|
455
|
+
# View container logs
|
|
456
|
+
docker logs mcp-wordpress
|
|
457
|
+
|
|
458
|
+
# Follow logs in real-time
|
|
459
|
+
docker logs -f mcp-wordpress
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
3. **Test Configuration**
|
|
463
|
+
```bash
|
|
464
|
+
# Test with environment file
|
|
465
|
+
docker run --rm --env-file .env docdyhr/mcp-wordpress:latest npm run status
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
## 🔧 Advanced Debugging
|
|
469
|
+
|
|
470
|
+
### Enable Debug Mode
|
|
471
|
+
|
|
472
|
+
1. **Environment Variable**
|
|
473
|
+
```bash
|
|
474
|
+
DEBUG=true npm run dev
|
|
475
|
+
```
|
|
476
|
+
|
|
477
|
+
2. **For Claude Desktop DXT**
|
|
478
|
+
- Enable "Debug Mode" in extension settings
|
|
479
|
+
- Check Claude Desktop console for detailed logs
|
|
480
|
+
|
|
481
|
+
3. **Comprehensive Debugging**
|
|
482
|
+
```bash
|
|
483
|
+
# Maximum debug output
|
|
484
|
+
NODE_ENV=development DEBUG=true LOG_LEVEL=debug npm run dev
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
### Debug Specific Components
|
|
488
|
+
|
|
489
|
+
```bash
|
|
490
|
+
# Test individual components
|
|
491
|
+
npm run test:auth # Authentication only
|
|
492
|
+
npm run test:tools # Tool registration
|
|
493
|
+
npm run test:integration # WordPress API integration
|
|
494
|
+
npm run test:cache # Cache functionality
|
|
495
|
+
npm run test:performance # Performance monitoring
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
### Network Debugging
|
|
499
|
+
|
|
500
|
+
```bash
|
|
501
|
+
# Capture network traffic
|
|
502
|
+
tcpdump -i any -w capture.pcap host your-site.com
|
|
503
|
+
|
|
504
|
+
# Analyze with Wireshark or:
|
|
505
|
+
tcpdump -r capture.pcap -A | grep -i wordpress
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
### WordPress Debug Mode
|
|
509
|
+
|
|
510
|
+
```php
|
|
511
|
+
// Add to wp-config.php for WordPress debugging
|
|
512
|
+
define('WP_DEBUG', true);
|
|
513
|
+
define('WP_DEBUG_LOG', true);
|
|
514
|
+
define('WP_DEBUG_DISPLAY', false);
|
|
515
|
+
|
|
516
|
+
// Check WordPress debug log
|
|
517
|
+
tail -f /path/to/wordpress/wp-content/debug.log
|
|
518
|
+
```
|
|
519
|
+
|
|
520
|
+
## 📋 Issue Reporting Template
|
|
521
|
+
|
|
522
|
+
When reporting issues, include this information:
|
|
523
|
+
|
|
524
|
+
```markdown
|
|
525
|
+
### Environment
|
|
526
|
+
- **Installation Method**: DXT/NPX/NPM/Docker
|
|
527
|
+
- **Version**: [Check with npm list mcp-wordpress]
|
|
528
|
+
- **Node.js Version**: [node --version]
|
|
529
|
+
- **Operating System**: [OS and version]
|
|
530
|
+
- **Claude Desktop Version**: [If applicable]
|
|
531
|
+
|
|
532
|
+
### WordPress Details
|
|
533
|
+
- **WordPress Version**: [Check in WP admin]
|
|
534
|
+
- **User Role**: [Administrator/Editor/etc.]
|
|
535
|
+
- **Authentication Method**: [app-password/jwt/basic]
|
|
536
|
+
- **REST API URL**: [https://site.com/wp-json/wp/v2/]
|
|
537
|
+
|
|
538
|
+
### Issue Description
|
|
539
|
+
- **What you were trying to do**:
|
|
540
|
+
- **What happened instead**:
|
|
541
|
+
- **Error messages** (exact text):
|
|
542
|
+
- **Steps to reproduce**:
|
|
543
|
+
|
|
544
|
+
### Debug Information
|
|
545
|
+
```bash
|
|
546
|
+
# Output of diagnostic commands
|
|
547
|
+
npm run health
|
|
548
|
+
npm run status
|
|
549
|
+
DEBUG=true [command that failed]
|
|
550
|
+
```
|
|
551
|
+
|
|
552
|
+
### Configuration
|
|
553
|
+
[Include relevant configuration, redacting sensitive information]
|
|
554
|
+
```text
|
|
555
|
+
|
|
556
|
+
## 🆘 Getting Help
|
|
557
|
+
|
|
558
|
+
### Self-Help Resources
|
|
559
|
+
|
|
560
|
+
1. **[Documentation Hub](README.md)** - Complete documentation
|
|
561
|
+
2. **[API Reference](api/README.md)** - Tool documentation
|
|
562
|
+
3. **[GitHub Issues](https://github.com/docdyhr/mcp-wordpress/issues)** - Known issues and solutions
|
|
563
|
+
|
|
564
|
+
### Community Support
|
|
565
|
+
|
|
566
|
+
1. **[GitHub Discussions](https://github.com/docdyhr/mcp-wordpress/discussions)** - Community Q&A
|
|
567
|
+
2. **[Issue Tracker](https://github.com/docdyhr/mcp-wordpress/issues/new)** - Bug reports
|
|
568
|
+
|
|
569
|
+
### Professional Support
|
|
570
|
+
|
|
571
|
+
For enterprise users or complex integrations:
|
|
572
|
+
- Priority support available
|
|
573
|
+
- Custom configuration assistance
|
|
574
|
+
- Integration consulting
|
|
575
|
+
|
|
576
|
+
---
|
|
577
|
+
|
|
578
|
+
**Still having issues?** [Open a GitHub issue](https://github.com/docdyhr/mcp-wordpress/issues/new) with the debugging information above, and we'll help you resolve it!
|