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
package/docs/CACHING.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# Intelligent Caching System
|
|
2
2
|
|
|
3
|
-
The WordPress MCP Server includes a comprehensive intelligent caching system that dramatically improves performance by
|
|
3
|
+
The WordPress MCP Server includes a comprehensive intelligent caching system that dramatically improves performance by
|
|
4
|
+
reducing API calls and providing faster response times.
|
|
4
5
|
|
|
5
6
|
## 🚀 **Performance Benefits**
|
|
6
7
|
|
|
7
8
|
- **50-70% reduction** in taxonomy API calls (categories, tags)
|
|
8
|
-
- **40-60% reduction** in authentication requests
|
|
9
|
+
- **40-60% reduction** in authentication requests
|
|
9
10
|
- **30-50% reduction** in user profile lookups
|
|
10
11
|
- **Significantly improved** response times for static data
|
|
11
12
|
- **Better rate limit utilization** - 60 requests/minute becomes much more effective
|
|
@@ -14,7 +15,7 @@ The WordPress MCP Server includes a comprehensive intelligent caching system tha
|
|
|
14
15
|
|
|
15
16
|
### **Multi-Layer Caching System**
|
|
16
17
|
|
|
17
|
-
```
|
|
18
|
+
```text
|
|
18
19
|
Request → Cache Check → API Call (if miss) → Cache Store → Response
|
|
19
20
|
↑ ↓
|
|
20
21
|
└── ETag Validation ← HTTP Headers ←──────────┘
|
|
@@ -23,7 +24,7 @@ Request → Cache Check → API Call (if miss) → Cache Store → Response
|
|
|
23
24
|
**Layer 1: HTTP Response Cache**
|
|
24
25
|
|
|
25
26
|
- ETags support for efficient revalidation
|
|
26
|
-
- Cache-Control headers based on data volatility
|
|
27
|
+
- Cache-Control headers based on data volatility
|
|
27
28
|
- Conditional requests (If-None-Match)
|
|
28
29
|
|
|
29
30
|
**Layer 2: In-Memory Application Cache**
|
|
@@ -46,7 +47,7 @@ Request → Cache Check → API Call (if miss) → Cache Store → Response
|
|
|
46
47
|
- Cache-Control: `public, max-age=14400`
|
|
47
48
|
- **Why**: Changes very rarely, safe to cache long-term
|
|
48
49
|
|
|
49
|
-
### **Semi-Static Data (2 hour TTL)**
|
|
50
|
+
### **Semi-Static Data (2 hour TTL)**
|
|
50
51
|
|
|
51
52
|
- Categories, tags, user profiles
|
|
52
53
|
- Cache-Control: `public, max-age=7200`
|
|
@@ -55,7 +56,7 @@ Request → Cache Check → API Call (if miss) → Cache Store → Response
|
|
|
55
56
|
### **Dynamic Data (15 minute TTL)**
|
|
56
57
|
|
|
57
58
|
- Posts, pages, comments
|
|
58
|
-
- Cache-Control: `public, max-age=900`
|
|
59
|
+
- Cache-Control: `public, max-age=900`
|
|
59
60
|
- **Why**: Content changes frequently, shorter cache needed
|
|
60
61
|
|
|
61
62
|
### **Session Data (30 minute TTL)**
|
|
@@ -79,7 +80,7 @@ wp_cache_stats --site="site1"
|
|
|
79
80
|
**Returns:**
|
|
80
81
|
|
|
81
82
|
- Hit/miss rates
|
|
82
|
-
- Total cache entries
|
|
83
|
+
- Total cache entries
|
|
83
84
|
- Eviction statistics
|
|
84
85
|
- Invalidation queue status
|
|
85
86
|
|
|
@@ -139,11 +140,11 @@ cache: {
|
|
|
139
140
|
defaultTTL: 15 * 60 * 1000, // 15 minutes default
|
|
140
141
|
enableLRU: true,
|
|
141
142
|
enableStats: true,
|
|
142
|
-
|
|
143
|
+
|
|
143
144
|
// TTL presets by data type
|
|
144
145
|
ttlPresets: {
|
|
145
146
|
static: 4 * 60 * 60 * 1000, // 4 hours
|
|
146
|
-
semiStatic: 2 * 60 * 60 * 1000, // 2 hours
|
|
147
|
+
semiStatic: 2 * 60 * 60 * 1000, // 2 hours
|
|
147
148
|
dynamic: 15 * 60 * 1000, // 15 minutes
|
|
148
149
|
session: 30 * 60 * 1000, // 30 minutes
|
|
149
150
|
realtime: 60 * 1000 // 1 minute
|
|
@@ -160,7 +161,7 @@ The system automatically invalidates related cache entries when content changes:
|
|
|
160
161
|
**Post Operations:**
|
|
161
162
|
|
|
162
163
|
- **Create Post** → Clears posts listings, categories, tags, search
|
|
163
|
-
- **Update Post** → Clears specific post, posts listings, search
|
|
164
|
+
- **Update Post** → Clears specific post, posts listings, search
|
|
164
165
|
- **Delete Post** → Clears posts listings, categories, tags, search
|
|
165
166
|
|
|
166
167
|
**Category/Tag Operations:**
|
|
@@ -227,7 +228,7 @@ done
|
|
|
227
228
|
|
|
228
229
|
**After Caching:**
|
|
229
230
|
|
|
230
|
-
- Categories (cached): ~1-5ms
|
|
231
|
+
- Categories (cached): ~1-5ms
|
|
231
232
|
- User lookups (cached): ~1-3ms
|
|
232
233
|
- Site settings (cached): ~1-2ms
|
|
233
234
|
|
|
@@ -237,15 +238,15 @@ Each WordPress site gets isolated cache:
|
|
|
237
238
|
|
|
238
239
|
**Cache Key Format:**
|
|
239
240
|
|
|
240
|
-
```
|
|
241
|
+
```text
|
|
241
242
|
{siteId}:{endpoint}:{params_hash}
|
|
242
243
|
```
|
|
243
244
|
|
|
244
245
|
**Examples:**
|
|
245
246
|
|
|
246
|
-
```
|
|
247
|
+
```text
|
|
247
248
|
site1:posts:abc123 # Site 1 posts listing
|
|
248
|
-
site2:posts:abc123 # Site 2 posts listing (separate)
|
|
249
|
+
site2:posts:abc123 # Site 2 posts listing (separate)
|
|
249
250
|
site1:categories:def456 # Site 1 categories
|
|
250
251
|
```
|
|
251
252
|
|
|
@@ -323,7 +324,7 @@ wp_cache_clear --site="site2" --pattern="posts" # Clear site2 posts only
|
|
|
323
324
|
1. **Increase cache size:**
|
|
324
325
|
|
|
325
326
|
```typescript
|
|
326
|
-
maxSize: 2000
|
|
327
|
+
maxSize: 2000; // From default 1000
|
|
327
328
|
```
|
|
328
329
|
|
|
329
330
|
2. **Tune TTL values:**
|
|
@@ -364,11 +365,13 @@ wp_cache_clear --site="site2" --pattern="posts" # Clear site2 posts only
|
|
|
364
365
|
Planned improvements:
|
|
365
366
|
|
|
366
367
|
- **Redis backend** for distributed caching
|
|
367
|
-
- **Cache warming strategies** based on access patterns
|
|
368
|
+
- **Cache warming strategies** based on access patterns
|
|
368
369
|
- **Adaptive TTL** based on content change frequency
|
|
369
370
|
- **Cache compression** for larger datasets
|
|
370
371
|
- **Metrics dashboard** for cache performance visualization
|
|
371
372
|
|
|
372
373
|
---
|
|
373
374
|
|
|
374
|
-
The intelligent caching system provides significant performance improvements while maintaining data freshness
|
|
375
|
+
The intelligent caching system provides significant performance improvements while maintaining data freshness
|
|
376
|
+
appropriate for each content type. It's designed to work transparently with existing WordPress operations while
|
|
377
|
+
providing tools for monitoring and management.
|