mcp-wordpress 1.2.2 → 1.3.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 (251) hide show
  1. package/README.md +210 -182
  2. package/dist/cache/CacheInvalidation.d.ts +3 -3
  3. package/dist/cache/CacheInvalidation.d.ts.map +1 -1
  4. package/dist/cache/CacheInvalidation.js +119 -119
  5. package/dist/cache/CacheInvalidation.js.map +1 -1
  6. package/dist/cache/CacheManager.d.ts +5 -0
  7. package/dist/cache/CacheManager.d.ts.map +1 -1
  8. package/dist/cache/CacheManager.js +26 -16
  9. package/dist/cache/CacheManager.js.map +1 -1
  10. package/dist/cache/HttpCacheWrapper.d.ts +1 -1
  11. package/dist/cache/HttpCacheWrapper.d.ts.map +1 -1
  12. package/dist/cache/HttpCacheWrapper.js +29 -29
  13. package/dist/cache/HttpCacheWrapper.js.map +1 -1
  14. package/dist/cache/__tests__/CacheInvalidation.test.js +96 -94
  15. package/dist/cache/__tests__/CacheInvalidation.test.js.map +1 -1
  16. package/dist/cache/__tests__/CacheManager.test.js +113 -113
  17. package/dist/cache/__tests__/CacheManager.test.js.map +1 -1
  18. package/dist/cache/__tests__/CachedWordPressClient.test.js +102 -99
  19. package/dist/cache/__tests__/CachedWordPressClient.test.js.map +1 -1
  20. package/dist/cache/__tests__/HttpCacheWrapper.test.js +98 -95
  21. package/dist/cache/__tests__/HttpCacheWrapper.test.js.map +1 -1
  22. package/dist/cache/index.d.ts +7 -7
  23. package/dist/cache/index.d.ts.map +1 -1
  24. package/dist/cache/index.js +4 -4
  25. package/dist/cache/index.js.map +1 -1
  26. package/dist/client/CachedWordPressClient.d.ts +4 -4
  27. package/dist/client/CachedWordPressClient.d.ts.map +1 -1
  28. package/dist/client/CachedWordPressClient.js +55 -51
  29. package/dist/client/CachedWordPressClient.js.map +1 -1
  30. package/dist/client/api.d.ts +10 -10
  31. package/dist/client/api.js +158 -158
  32. package/dist/client/api.js.map +1 -1
  33. package/dist/client/auth.d.ts +2 -2
  34. package/dist/client/auth.js +72 -72
  35. package/dist/client/managers/AuthenticationManager.d.ts +2 -2
  36. package/dist/client/managers/AuthenticationManager.js +46 -46
  37. package/dist/client/managers/BaseManager.d.ts +1 -1
  38. package/dist/client/managers/BaseManager.js +9 -9
  39. package/dist/client/managers/RequestManager.d.ts +5 -3
  40. package/dist/client/managers/RequestManager.d.ts.map +1 -1
  41. package/dist/client/managers/RequestManager.js +39 -19
  42. package/dist/client/managers/RequestManager.js.map +1 -1
  43. package/dist/client/managers/index.d.ts +3 -3
  44. package/dist/client/managers/index.js +3 -3
  45. package/dist/config/ConfigurationSchema.d.ts +2 -2
  46. package/dist/config/ConfigurationSchema.d.ts.map +1 -1
  47. package/dist/config/ConfigurationSchema.js +40 -40
  48. package/dist/config/ConfigurationSchema.js.map +1 -1
  49. package/dist/config/ServerConfiguration.d.ts +2 -2
  50. package/dist/config/ServerConfiguration.js +35 -35
  51. package/dist/config/ServerConfiguration.js.map +1 -1
  52. package/dist/docs/DocumentationGenerator.d.ts.map +1 -1
  53. package/dist/docs/DocumentationGenerator.js +296 -255
  54. package/dist/docs/DocumentationGenerator.js.map +1 -1
  55. package/dist/docs/MarkdownFormatter.d.ts +1 -1
  56. package/dist/docs/MarkdownFormatter.d.ts.map +1 -1
  57. package/dist/docs/MarkdownFormatter.js +60 -51
  58. package/dist/docs/MarkdownFormatter.js.map +1 -1
  59. package/dist/docs/index.d.ts +3 -3
  60. package/dist/docs/index.d.ts.map +1 -1
  61. package/dist/docs/index.js +2 -2
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/index.js +16 -16
  64. package/dist/index.js.map +1 -1
  65. package/dist/mcp-wordpress-1.3.0.tgz +0 -0
  66. package/dist/performance/MetricsCollector.d.ts +3 -3
  67. package/dist/performance/MetricsCollector.d.ts.map +1 -1
  68. package/dist/performance/MetricsCollector.js +33 -27
  69. package/dist/performance/MetricsCollector.js.map +1 -1
  70. package/dist/performance/PerformanceAnalytics.d.ts +12 -12
  71. package/dist/performance/PerformanceAnalytics.d.ts.map +1 -1
  72. package/dist/performance/PerformanceAnalytics.js +200 -154
  73. package/dist/performance/PerformanceAnalytics.js.map +1 -1
  74. package/dist/performance/PerformanceMonitor.d.ts +5 -5
  75. package/dist/performance/PerformanceMonitor.d.ts.map +1 -1
  76. package/dist/performance/PerformanceMonitor.js +53 -52
  77. package/dist/performance/PerformanceMonitor.js.map +1 -1
  78. package/dist/performance/index.d.ts +6 -6
  79. package/dist/performance/index.d.ts.map +1 -1
  80. package/dist/performance/index.js +3 -3
  81. package/dist/security/InputValidator.d.ts +1 -1
  82. package/dist/security/InputValidator.d.ts.map +1 -1
  83. package/dist/security/InputValidator.js +111 -88
  84. package/dist/security/InputValidator.js.map +1 -1
  85. package/dist/security/SecurityConfig.d.ts +5 -5
  86. package/dist/security/SecurityConfig.js +92 -92
  87. package/dist/security/SecurityConfig.js.map +1 -1
  88. package/dist/server/ConnectionTester.d.ts +1 -1
  89. package/dist/server/ConnectionTester.d.ts.map +1 -1
  90. package/dist/server/ConnectionTester.js +4 -4
  91. package/dist/server/ConnectionTester.js.map +1 -1
  92. package/dist/server/ToolRegistry.d.ts +2 -2
  93. package/dist/server/ToolRegistry.d.ts.map +1 -1
  94. package/dist/server/ToolRegistry.js +35 -32
  95. package/dist/server/ToolRegistry.js.map +1 -1
  96. package/dist/server.d.ts +2 -2
  97. package/dist/server.js +2 -2
  98. package/dist/tools/BaseToolManager.js +5 -5
  99. package/dist/tools/auth.d.ts +2 -2
  100. package/dist/tools/auth.d.ts.map +1 -1
  101. package/dist/tools/auth.js +32 -31
  102. package/dist/tools/auth.js.map +1 -1
  103. package/dist/tools/cache.d.ts +1 -1
  104. package/dist/tools/cache.d.ts.map +1 -1
  105. package/dist/tools/cache.js +71 -71
  106. package/dist/tools/cache.js.map +1 -1
  107. package/dist/tools/comments.d.ts +2 -2
  108. package/dist/tools/comments.d.ts.map +1 -1
  109. package/dist/tools/comments.js +79 -79
  110. package/dist/tools/comments.js.map +1 -1
  111. package/dist/tools/index.d.ts +10 -10
  112. package/dist/tools/index.js +10 -10
  113. package/dist/tools/media.d.ts +2 -2
  114. package/dist/tools/media.js +80 -80
  115. package/dist/tools/pages.d.ts +2 -2
  116. package/dist/tools/pages.d.ts.map +1 -1
  117. package/dist/tools/pages.js +75 -75
  118. package/dist/tools/pages.js.map +1 -1
  119. package/dist/tools/performance.d.ts +1 -1
  120. package/dist/tools/performance.d.ts.map +1 -1
  121. package/dist/tools/performance.js +311 -287
  122. package/dist/tools/performance.js.map +1 -1
  123. package/dist/tools/posts.d.ts +2 -2
  124. package/dist/tools/posts.d.ts.map +1 -1
  125. package/dist/tools/posts.js +94 -94
  126. package/dist/tools/posts.js.map +1 -1
  127. package/dist/tools/site.d.ts +2 -2
  128. package/dist/tools/site.d.ts.map +1 -1
  129. package/dist/tools/site.js +60 -60
  130. package/dist/tools/site.js.map +1 -1
  131. package/dist/tools/taxonomies.d.ts +2 -2
  132. package/dist/tools/taxonomies.js +89 -89
  133. package/dist/tools/users.d.ts +2 -2
  134. package/dist/tools/users.js +68 -68
  135. package/dist/tools/users.js.map +1 -1
  136. package/dist/types/client.d.ts +13 -13
  137. package/dist/types/client.d.ts.map +1 -1
  138. package/dist/types/client.js +12 -12
  139. package/dist/types/client.js.map +1 -1
  140. package/dist/types/index.d.ts +19 -19
  141. package/dist/types/index.d.ts.map +1 -1
  142. package/dist/types/index.js +3 -3
  143. package/dist/types/mcp.d.ts +7 -7
  144. package/dist/types/wordpress.d.ts +21 -21
  145. package/dist/types/wordpress.d.ts.map +1 -1
  146. package/dist/utils/debug.d.ts +2 -2
  147. package/dist/utils/debug.js +28 -28
  148. package/dist/utils/error.d.ts.map +1 -1
  149. package/dist/utils/error.js +13 -13
  150. package/dist/utils/error.js.map +1 -1
  151. package/dist/utils/toolWrapper.d.ts.map +1 -1
  152. package/dist/utils/toolWrapper.js +5 -5
  153. package/dist/utils/toolWrapper.js.map +1 -1
  154. package/dist/utils/validation.d.ts.map +1 -1
  155. package/dist/utils/validation.js +41 -31
  156. package/dist/utils/validation.js.map +1 -1
  157. package/docs/CACHING.md +36 -2
  158. package/docs/DOCKER.md +24 -18
  159. package/docs/PERFORMANCE_MONITORING.md +49 -1
  160. package/docs/SECURITY_TESTING.md +30 -1
  161. package/docs/api/README.md +9 -1
  162. package/docs/api/summary.json +1 -1
  163. package/docs/contract-testing.md +24 -3
  164. package/docs/developer/GITHUB_ACTIONS_SETUP.md +8 -2
  165. package/docs/developer/MAINTENANCE.md +29 -3
  166. package/docs/developer/MIGRATION_GUIDE.md +13 -1
  167. package/docs/developer/NPM_AUTH_SETUP.md +13 -2
  168. package/docs/developer/REFACTORING.md +31 -1
  169. package/docs/releases/COMMUNITY_ANNOUNCEMENT_v1.1.2.md +18 -7
  170. package/docs/releases/RELEASE_NOTES_v1.1.2.md +31 -5
  171. package/docs/user-guides/DOCKER_SETUP.md +264 -0
  172. package/docs/user-guides/DTX_SETUP.md +327 -0
  173. package/docs/user-guides/NPM_SETUP.md +109 -0
  174. package/docs/user-guides/NPX_SETUP.md +281 -0
  175. package/docs/wordpress-rest-api-authentication-troubleshooting.md +13 -2
  176. package/package.json +27 -8
  177. package/src/cache/CacheInvalidation.ts +140 -132
  178. package/src/cache/CacheManager.ts +40 -29
  179. package/src/cache/HttpCacheWrapper.ts +105 -68
  180. package/src/cache/__tests__/CacheInvalidation.test.ts +123 -118
  181. package/src/cache/__tests__/CacheManager.test.ts +156 -152
  182. package/src/cache/__tests__/CachedWordPressClient.test.ts +131 -116
  183. package/src/cache/__tests__/HttpCacheWrapper.test.ts +118 -115
  184. package/src/cache/index.ts +13 -13
  185. package/src/client/CachedWordPressClient.ts +90 -80
  186. package/src/client/api.ts +205 -205
  187. package/src/client/auth.ts +80 -80
  188. package/src/client/managers/AuthenticationManager.ts +61 -61
  189. package/src/client/managers/BaseManager.ts +11 -11
  190. package/src/client/managers/RequestManager.ts +79 -47
  191. package/src/client/managers/index.ts +3 -3
  192. package/src/config/ConfigurationSchema.ts +44 -44
  193. package/src/config/ServerConfiguration.ts +39 -39
  194. package/src/docs/DocumentationGenerator.ts +402 -295
  195. package/src/docs/MarkdownFormatter.ts +94 -69
  196. package/src/docs/index.ts +4 -4
  197. package/src/index.ts +24 -21
  198. package/src/performance/MetricsCollector.ts +90 -58
  199. package/src/performance/PerformanceAnalytics.ts +386 -262
  200. package/src/performance/PerformanceMonitor.ts +152 -118
  201. package/src/performance/index.ts +9 -9
  202. package/src/security/InputValidator.ts +148 -91
  203. package/src/security/SecurityConfig.ts +94 -94
  204. package/src/server/ConnectionTester.ts +21 -15
  205. package/src/server/ToolRegistry.ts +64 -51
  206. package/src/server.ts +2 -2
  207. package/src/tools/BaseToolManager.ts +6 -6
  208. package/src/tools/auth.ts +42 -37
  209. package/src/tools/cache.ts +85 -81
  210. package/src/tools/comments.ts +93 -91
  211. package/src/tools/index.ts +10 -10
  212. package/src/tools/media.ts +89 -89
  213. package/src/tools/pages.ts +89 -87
  214. package/src/tools/performance.ts +443 -352
  215. package/src/tools/posts.ts +109 -107
  216. package/src/tools/site.ts +86 -77
  217. package/src/tools/taxonomies.ts +102 -102
  218. package/src/tools/users.ts +77 -77
  219. package/src/types/client.ts +157 -60
  220. package/src/types/index.ts +49 -27
  221. package/src/types/mcp.ts +15 -15
  222. package/src/types/wordpress.ts +57 -29
  223. package/src/utils/debug.ts +37 -37
  224. package/src/utils/error.ts +47 -25
  225. package/src/utils/toolWrapper.ts +12 -8
  226. package/src/utils/validation.ts +116 -65
  227. package/dist/client/WordPressClient.d.ts +0 -81
  228. package/dist/client/WordPressClient.d.ts.map +0 -1
  229. package/dist/client/WordPressClient.js +0 -354
  230. package/dist/client/WordPressClient.js.map +0 -1
  231. package/dist/performance/AnomalyDetector.d.ts +0 -63
  232. package/dist/performance/AnomalyDetector.d.ts.map +0 -1
  233. package/dist/performance/AnomalyDetector.js +0 -222
  234. package/dist/performance/AnomalyDetector.js.map +0 -1
  235. package/dist/performance/BenchmarkAnalyzer.d.ts +0 -67
  236. package/dist/performance/BenchmarkAnalyzer.d.ts.map +0 -1
  237. package/dist/performance/BenchmarkAnalyzer.js +0 -301
  238. package/dist/performance/BenchmarkAnalyzer.js.map +0 -1
  239. package/dist/performance/TrendAnalyzer.d.ts +0 -69
  240. package/dist/performance/TrendAnalyzer.d.ts.map +0 -1
  241. package/dist/performance/TrendAnalyzer.js +0 -203
  242. package/dist/performance/TrendAnalyzer.js.map +0 -1
  243. package/dist/tools/BaseToolClass.d.ts +0 -76
  244. package/dist/tools/BaseToolClass.d.ts.map +0 -1
  245. package/dist/tools/BaseToolClass.js +0 -104
  246. package/dist/tools/BaseToolClass.js.map +0 -1
  247. package/dist/tools/base.d.ts +0 -37
  248. package/dist/tools/base.d.ts.map +0 -1
  249. package/dist/tools/base.js +0 -60
  250. package/dist/tools/base.js.map +0 -1
  251. package/docs/user-guides/CLAUDE_DESKTOP_SETUP.md +0 -187
@@ -13,6 +13,7 @@ The performance monitoring system consists of three main components:
13
13
  ## 🚀 Key Features
14
14
 
15
15
  ### Real-Time Monitoring
16
+
16
17
  - **Response Time Tracking**: Monitor API response times with percentile analysis (P50, P95, P99)
17
18
  - **Error Rate Monitoring**: Track success/failure rates across all operations
18
19
  - **Cache Performance**: Monitor cache hit rates, memory usage, and efficiency
@@ -20,12 +21,14 @@ The performance monitoring system consists of three main components:
20
21
  - **Tool Usage Analytics**: Monitor which MCP tools are used most frequently
21
22
 
22
23
  ### Historical Analysis
24
+
23
25
  - **Performance Trends**: Analyze performance changes over time
24
26
  - **Predictive Analytics**: Forecast future performance based on historical data
25
27
  - **Anomaly Detection**: Automatically detect unusual performance patterns
26
28
  - **Benchmark Comparisons**: Compare against industry standards
27
29
 
28
30
  ### Intelligent Insights
31
+
29
32
  - **Optimization Recommendations**: Get actionable suggestions for performance improvements
30
33
  - **ROI Estimates**: Understand the impact of potential optimizations
31
34
  - **Alert System**: Receive notifications for performance issues
@@ -36,6 +39,7 @@ The performance monitoring system consists of three main components:
36
39
  The system provides 6 new MCP tools for performance management:
37
40
 
38
41
  ### 1. `wp_performance_stats`
42
+
39
43
  Get real-time performance statistics and metrics.
40
44
 
41
45
  ```bash
@@ -50,11 +54,13 @@ wp_performance_stats --site=site1 --category=all
50
54
  ```
51
55
 
52
56
  **Parameters:**
57
+
53
58
  - `site` (optional): Specific site ID for multi-site setups
54
59
  - `category`: `overview`, `requests`, `cache`, `system`, `tools`, `all` (default: `overview`)
55
60
  - `format`: `summary`, `detailed`, `raw` (default: `summary`)
56
61
 
57
62
  **Example Output:**
63
+
58
64
  ```json
59
65
  {
60
66
  "success": true,
@@ -73,6 +79,7 @@ wp_performance_stats --site=site1 --category=all
73
79
  ```
74
80
 
75
81
  ### 2. `wp_performance_history`
82
+
76
83
  Get historical performance data and trend analysis.
77
84
 
78
85
  ```bash
@@ -87,12 +94,14 @@ wp_performance_history --timeframe=6h --includeTrends=true
87
94
  ```
88
95
 
89
96
  **Parameters:**
97
+
90
98
  - `site` (optional): Specific site ID
91
99
  - `timeframe`: `1h`, `6h`, `12h`, `24h`, `7d` (default: `24h`)
92
100
  - `metrics`: Array of specific metrics to include
93
101
  - `includeTrends`: Include trend analysis (default: `true`)
94
102
 
95
103
  ### 3. `wp_performance_benchmark`
104
+
96
105
  Compare current performance against industry benchmarks.
97
106
 
98
107
  ```bash
@@ -104,11 +113,13 @@ wp_performance_benchmark --category=response_time --includeRecommendations=true
104
113
  ```
105
114
 
106
115
  **Parameters:**
116
+
107
117
  - `site` (optional): Specific site ID
108
118
  - `category`: `response_time`, `cache_performance`, `error_rate`, `system_resources`, `all`
109
119
  - `includeRecommendations`: Include improvement suggestions (default: `true`)
110
120
 
111
121
  **Example Output:**
122
+
112
123
  ```json
113
124
  {
114
125
  "benchmarks": [
@@ -131,6 +142,7 @@ wp_performance_benchmark --category=response_time --includeRecommendations=true
131
142
  ```
132
143
 
133
144
  ### 4. `wp_performance_alerts`
145
+
134
146
  Get performance alerts and anomaly detection results.
135
147
 
136
148
  ```bash
@@ -145,6 +157,7 @@ wp_performance_alerts --category=cache --includeAnomalies=true
145
157
  ```
146
158
 
147
159
  **Parameters:**
160
+
148
161
  - `site` (optional): Specific site ID
149
162
  - `severity`: `info`, `warning`, `error`, `critical`
150
163
  - `category`: `performance`, `cache`, `system`, `wordpress`
@@ -152,6 +165,7 @@ wp_performance_alerts --category=cache --includeAnomalies=true
152
165
  - `includeAnomalies`: Include detected anomalies (default: `true`)
153
166
 
154
167
  ### 5. `wp_performance_optimize`
168
+
155
169
  Get optimization recommendations and insights.
156
170
 
157
171
  ```bash
@@ -166,6 +180,7 @@ wp_performance_optimize --priority=all --includePredictions=true
166
180
  ```
167
181
 
168
182
  **Parameters:**
183
+
169
184
  - `site` (optional): Specific site ID
170
185
  - `focus`: `speed`, `reliability`, `efficiency`, `scaling` (default: `speed`)
171
186
  - `priority`: `quick_wins`, `medium_term`, `long_term`, `all` (default: `all`)
@@ -173,6 +188,7 @@ wp_performance_optimize --priority=all --includePredictions=true
173
188
  - `includePredictions`: Include performance predictions (default: `true`)
174
189
 
175
190
  **Example Output:**
191
+
176
192
  ```json
177
193
  {
178
194
  "recommendations": [
@@ -195,6 +211,7 @@ wp_performance_optimize --priority=all --includePredictions=true
195
211
  ```
196
212
 
197
213
  ### 6. `wp_performance_export`
214
+
198
215
  Export comprehensive performance report.
199
216
 
200
217
  ```bash
@@ -209,6 +226,7 @@ wp_performance_export --format=summary --includeAnalytics=true
209
226
  ```
210
227
 
211
228
  **Parameters:**
229
+
212
230
  - `site` (optional): Specific site ID
213
231
  - `format`: `json`, `csv`, `summary` (default: `json`)
214
232
  - `includeHistorical`: Include historical data (default: `true`)
@@ -218,12 +236,14 @@ wp_performance_export --format=summary --includeAnalytics=true
218
236
  ## 📊 Performance Metrics
219
237
 
220
238
  ### Response Time Metrics
239
+
221
240
  - **Average Response Time**: Mean response time across all requests
222
241
  - **Percentiles**: P50 (median), P95, P99 response times
223
242
  - **Min/Max**: Fastest and slowest response times
224
243
  - **Requests Per Second**: Request throughput rate
225
244
 
226
245
  ### Cache Performance Metrics
246
+
227
247
  - **Hit Rate**: Percentage of requests served from cache
228
248
  - **Cache Size**: Number of cached entries
229
249
  - **Memory Usage**: Estimated memory consumption
@@ -231,12 +251,14 @@ wp_performance_export --format=summary --includeAnalytics=true
231
251
  - **Cache Efficiency**: Overall cache performance rating
232
252
 
233
253
  ### System Metrics
254
+
234
255
  - **Memory Usage**: Current memory consumption percentage
235
256
  - **CPU Usage**: Estimated CPU utilization
236
257
  - **Uptime**: System operational time
237
258
  - **Active Connections**: Number of concurrent connections
238
259
 
239
260
  ### Tool Usage Metrics
261
+
240
262
  - **Most Used Tool**: Tool with highest usage count
241
263
  - **Tool Performance**: Response times and success rates per tool
242
264
  - **Usage Distribution**: Frequency of tool usage
@@ -244,6 +266,7 @@ wp_performance_export --format=summary --includeAnalytics=true
244
266
  ## 🔍 Performance Analysis
245
267
 
246
268
  ### Trend Analysis
269
+
247
270
  The system automatically analyzes performance trends using linear regression:
248
271
 
249
272
  - **Direction**: `improving`, `declining`, or `stable`
@@ -252,6 +275,7 @@ The system automatically analyzes performance trends using linear regression:
252
275
  - **Predictions**: Forecasted future values
253
276
 
254
277
  ### Anomaly Detection
278
+
255
279
  Automatic detection of unusual performance patterns:
256
280
 
257
281
  - **Z-Score Analysis**: Statistical deviation from normal patterns
@@ -260,6 +284,7 @@ Automatic detection of unusual performance patterns:
260
284
  - **Possible Causes**: AI-generated suggestions for anomaly causes
261
285
 
262
286
  ### Benchmark Comparisons
287
+
263
288
  Compare against industry standards:
264
289
 
265
290
  - **Response Time**: `<200ms` (excellent), `200-500ms` (good), `500ms-1s` (average)
@@ -272,16 +297,19 @@ Compare against industry standards:
272
297
  The performance monitoring system is deeply integrated with the intelligent caching system:
273
298
 
274
299
  ### Automatic Cache Metrics
300
+
275
301
  - **Real-time cache statistics** from all registered cache managers
276
302
  - **Site-specific cache isolation** for multi-site installations
277
303
  - **Cache efficiency calculations** with performance impact analysis
278
304
 
279
305
  ### Cache Performance Insights
306
+
280
307
  - **Cache warming recommendations** based on usage patterns
281
308
  - **TTL optimization suggestions** for different data types
282
309
  - **Memory optimization** recommendations
283
310
 
284
311
  ### Cache Management Integration
312
+
285
313
  - Performance monitoring **automatically registers** with cache managers
286
314
  - **Request interception** for transparent performance tracking
287
315
  - **Cache invalidation tracking** for data consistency monitoring
@@ -289,12 +317,14 @@ The performance monitoring system is deeply integrated with the intelligent cach
289
317
  ## 🚨 Alert System
290
318
 
291
319
  ### Alert Types
320
+
292
321
  - **Performance Degradation**: Response times exceeding thresholds
293
322
  - **Error Rate Spikes**: Increased failure rates
294
323
  - **Cache Performance Issues**: Low hit rates or high memory usage
295
324
  - **System Resource Warnings**: High memory or CPU usage
296
325
 
297
326
  ### Alert Configuration
327
+
298
328
  Configure alert thresholds in your monitoring setup:
299
329
 
300
330
  ```javascript
@@ -310,6 +340,7 @@ const monitor = new PerformanceMonitor({
310
340
  ```
311
341
 
312
342
  ### Alert Severity Levels
343
+
313
344
  - **🔴 Critical**: Immediate attention required
314
345
  - **🟠 Error**: Significant performance impact
315
346
  - **🟡 Warning**: Performance degradation detected
@@ -318,31 +349,37 @@ const monitor = new PerformanceMonitor({
318
349
  ## 📈 Optimization Workflow
319
350
 
320
351
  ### 1. Monitor Current Performance
352
+
321
353
  ```bash
322
354
  wp_performance_stats --format=detailed
323
355
  ```
324
356
 
325
357
  ### 2. Analyze Historical Trends
358
+
326
359
  ```bash
327
360
  wp_performance_history --timeframe=7d --includeTrends=true
328
361
  ```
329
362
 
330
363
  ### 3. Compare Against Benchmarks
364
+
331
365
  ```bash
332
366
  wp_performance_benchmark --includeRecommendations=true
333
367
  ```
334
368
 
335
369
  ### 4. Check for Alerts and Anomalies
370
+
336
371
  ```bash
337
372
  wp_performance_alerts --includeAnomalies=true
338
373
  ```
339
374
 
340
375
  ### 5. Get Optimization Recommendations
376
+
341
377
  ```bash
342
378
  wp_performance_optimize --focus=speed --includeROI=true
343
379
  ```
344
380
 
345
381
  ### 6. Export Comprehensive Report
382
+
346
383
  ```bash
347
384
  wp_performance_export --format=json --includeAnalytics=true
348
385
  ```
@@ -350,6 +387,7 @@ wp_performance_export --format=json --includeAnalytics=true
350
387
  ## 🔧 Configuration
351
388
 
352
389
  ### Performance Monitor Configuration
390
+
353
391
  ```javascript
354
392
  const config = {
355
393
  collectInterval: 30000, // 30 seconds
@@ -368,6 +406,7 @@ const config = {
368
406
  ```
369
407
 
370
408
  ### Metrics Collector Configuration
409
+
371
410
  ```javascript
372
411
  const config = {
373
412
  enableRealTime: true,
@@ -380,6 +419,7 @@ const config = {
380
419
  ```
381
420
 
382
421
  ### Analytics Configuration
422
+
383
423
  ```javascript
384
424
  const config = {
385
425
  enablePredictiveAnalysis: true,
@@ -393,21 +433,25 @@ const config = {
393
433
  ## 🎯 Best Practices
394
434
 
395
435
  ### 1. Regular Monitoring
436
+
396
437
  - Check performance stats daily with `wp_performance_stats`
397
438
  - Review weekly trends with `wp_performance_history --timeframe=7d`
398
439
  - Monitor alerts regularly with `wp_performance_alerts`
399
440
 
400
441
  ### 2. Proactive Optimization
442
+
401
443
  - Implement quick wins from `wp_performance_optimize --priority=quick_wins`
402
444
  - Address critical alerts immediately
403
445
  - Follow benchmark recommendations
404
446
 
405
447
  ### 3. Data-Driven Decisions
448
+
406
449
  - Use historical data to identify patterns
407
450
  - Compare before/after optimization results
408
451
  - Export reports for stakeholder communication
409
452
 
410
453
  ### 4. Multi-Site Management
454
+
411
455
  - Monitor each site individually
412
456
  - Compare performance across sites
413
457
  - Implement site-specific optimizations
@@ -417,6 +461,7 @@ const config = {
417
461
  ### Common Issues
418
462
 
419
463
  **1. High Response Times**
464
+
420
465
  ```bash
421
466
  # Check current performance
422
467
  wp_performance_stats --category=requests
@@ -426,6 +471,7 @@ wp_performance_optimize --focus=speed
426
471
  ```
427
472
 
428
473
  **2. Low Cache Hit Rates**
474
+
429
475
  ```bash
430
476
  # Check cache performance
431
477
  wp_performance_stats --category=cache
@@ -435,6 +481,7 @@ wp_performance_optimize --focus=efficiency
435
481
  ```
436
482
 
437
483
  **3. System Resource Issues**
484
+
438
485
  ```bash
439
486
  # Check system metrics
440
487
  wp_performance_stats --category=system
@@ -444,6 +491,7 @@ wp_performance_optimize --focus=scaling
444
491
  ```
445
492
 
446
493
  ### Performance Debugging
494
+
447
495
  1. **Enable detailed logging** in development environments
448
496
  2. **Use benchmark comparisons** to identify problem areas
449
497
  3. **Monitor trends** to catch performance degradation early
@@ -468,4 +516,4 @@ To contribute to the performance monitoring system:
468
516
 
469
517
  ---
470
518
 
471
- **🚀 The performance monitoring system helps you maintain optimal WordPress MCP server performance with real-time insights, intelligent analysis, and actionable recommendations.**
519
+ **🚀 The performance monitoring system helps you maintain optimal WordPress MCP server performance with real-time insights, intelligent analysis, and actionable recommendations.**
@@ -84,6 +84,7 @@ npm test tests/security/security-validation.test.js -- --grep "XSS"
84
84
  ```
85
85
 
86
86
  **Covered Attack Vectors:**
87
+
87
88
  - Script tag injection
88
89
  - Event handler injection
89
90
  - JavaScript URL schemes
@@ -91,6 +92,7 @@ npm test tests/security/security-validation.test.js -- --grep "XSS"
91
92
  - HTML entity encoding
92
93
 
93
94
  **Example Test:**
95
+
94
96
  ```javascript
95
97
  test('should reject script tags in safe strings', () => {
96
98
  const maliciousInput = 'Hello <script>alert("XSS")</script> World';
@@ -105,6 +107,7 @@ npm test tests/security/security-validation.test.js -- --grep "SQL"
105
107
  ```
106
108
 
107
109
  **Covered Attack Vectors:**
110
+
108
111
  - Union-based injection
109
112
  - Boolean-based blind injection
110
113
  - Time-based blind injection
@@ -112,6 +115,7 @@ npm test tests/security/security-validation.test.js -- --grep "SQL"
112
115
  - Comment-based injection
113
116
 
114
117
  **Example Test:**
118
+
115
119
  ```javascript
116
120
  test('should reject SQL injection patterns', () => {
117
121
  const maliciousQueries = [
@@ -133,6 +137,7 @@ npm test tests/security/security-validation.test.js -- --grep "Path"
133
137
  ```
134
138
 
135
139
  **Covered Attack Vectors:**
140
+
136
141
  - Directory traversal (../)
137
142
  - Encoded path traversal
138
143
  - Windows path traversal (..\\)
@@ -145,6 +150,7 @@ npm test tests/security/penetration-tests.test.js
145
150
  ```
146
151
 
147
152
  **Comprehensive Attack Simulation:**
153
+
148
154
  - Command injection attempts
149
155
  - Authentication bypass
150
156
  - Header injection
@@ -156,11 +162,13 @@ npm test tests/security/penetration-tests.test.js
156
162
  ### Adding Security to New Tools
157
163
 
158
164
  1. **Import Security Framework:**
165
+
159
166
  ```typescript
160
167
  import { validateSecurity, ToolSchemas } from '../security/InputValidator.js';
161
168
  ```
162
169
 
163
170
  2. **Apply Validation Decorator:**
171
+
164
172
  ```typescript
165
173
  export class MyTools {
166
174
  @validateSecurity(ToolSchemas.postData)
@@ -171,6 +179,7 @@ export class MyTools {
171
179
  ```
172
180
 
173
181
  3. **Custom Validation Schema:**
182
+
174
183
  ```typescript
175
184
  const customSchema = z.object({
176
185
  customField: SecuritySchemas.safeString,
@@ -217,11 +226,13 @@ async function toolMethod(params: any) {
217
226
  ## 🚨 Security Testing Commands
218
227
 
219
228
  ### Run All Security Tests
229
+
220
230
  ```bash
221
231
  npm run test:security
222
232
  ```
223
233
 
224
234
  ### Run Specific Security Test Categories
235
+
225
236
  ```bash
226
237
  # Input validation tests
227
238
  npm test tests/security/security-validation.test.js
@@ -237,6 +248,7 @@ npm test -- --grep "SQL"
237
248
  ```
238
249
 
239
250
  ### Security Test Coverage
251
+
240
252
  ```bash
241
253
  npm run test:coverage -- tests/security/
242
254
  ```
@@ -244,6 +256,7 @@ npm run test:coverage -- tests/security/
244
256
  ## 📊 Security Monitoring
245
257
 
246
258
  ### Error Logging
259
+
247
260
  Security validation errors are automatically logged:
248
261
 
249
262
  ```typescript
@@ -260,6 +273,7 @@ Security validation errors are automatically logged:
260
273
  ```
261
274
 
262
275
  ### Rate Limiting Monitoring
276
+
263
277
  ```typescript
264
278
  {
265
279
  timestamp: "2024-01-01T00:00:00.000Z",
@@ -274,6 +288,7 @@ Security validation errors are automatically logged:
274
288
  ## 🔍 Security Audit Checklist
275
289
 
276
290
  ### ✅ Input Validation
291
+
277
292
  - [ ] All user inputs validated with Zod schemas
278
293
  - [ ] XSS protection on all text fields
279
294
  - [ ] SQL injection protection on search/query fields
@@ -281,24 +296,28 @@ Security validation errors are automatically logged:
281
296
  - [ ] Length limits enforced on all inputs
282
297
 
283
298
  ### ✅ Output Encoding
299
+
284
300
  - [ ] HTML entities encoded in output
285
301
  - [ ] JSON responses properly escaped
286
302
  - [ ] Error messages sanitized
287
303
  - [ ] Log entries do not contain sensitive data
288
304
 
289
305
  ### ✅ Authentication & Authorization
306
+
290
307
  - [ ] Rate limiting implemented
291
308
  - [ ] Secure password handling
292
309
  - [ ] Session management (if applicable)
293
310
  - [ ] Permission checks on all operations
294
311
 
295
312
  ### ✅ Error Handling
313
+
296
314
  - [ ] Sensitive information not exposed in errors
297
315
  - [ ] Consistent error response format
298
316
  - [ ] Proper logging without data leakage
299
317
  - [ ] Graceful handling of edge cases
300
318
 
301
319
  ### ✅ File Operations
320
+
302
321
  - [ ] Upload restrictions enforced
303
322
  - [ ] File type validation
304
323
  - [ ] Size limits implemented
@@ -307,6 +326,7 @@ Security validation errors are automatically logged:
307
326
  ## 🛠️ Security Tools Integration
308
327
 
309
328
  ### ESLint Security Rules
329
+
310
330
  ```javascript
311
331
  {
312
332
  "extends": ["plugin:security/recommended"],
@@ -319,6 +339,7 @@ Security validation errors are automatically logged:
319
339
  ```
320
340
 
321
341
  ### Automated Security Scanning
342
+
322
343
  ```bash
323
344
  # Add to package.json
324
345
  {
@@ -331,6 +352,7 @@ Security validation errors are automatically logged:
331
352
  ```
332
353
 
333
354
  ### CI/CD Security Pipeline
355
+
334
356
  ```yaml
335
357
  # GitHub Actions workflow
336
358
  - name: Security Audit
@@ -343,18 +365,21 @@ Security validation errors are automatically logged:
343
365
  ## 📚 Best Practices
344
366
 
345
367
  ### Input Validation Best Practices
368
+
346
369
  1. **Validate Early**: Check inputs at the entry point
347
370
  2. **Use Allow Lists**: Define what is allowed, not what is blocked
348
371
  3. **Sanitize and Validate**: Both sanitize and validate inputs
349
372
  4. **Fail Securely**: Default to rejecting invalid input
350
373
 
351
374
  ### Error Handling Best Practices
375
+
352
376
  1. **Generic Error Messages**: Don't expose implementation details
353
377
  2. **Log Detailed Errors**: Log full details for debugging (securely)
354
378
  3. **Rate Limit Errors**: Prevent information gathering
355
379
  4. **Sanitize Stack Traces**: Remove sensitive information
356
380
 
357
381
  ### Security Testing Best Practices
382
+
358
383
  1. **Test All Input Vectors**: Every parameter that accepts user input
359
384
  2. **Use Real Attack Payloads**: Test with actual malicious inputs
360
385
  3. **Automate Security Tests**: Include in CI/CD pipeline
@@ -363,12 +388,14 @@ Security validation errors are automatically logged:
363
388
  ## 🚀 Continuous Security
364
389
 
365
390
  ### Regular Security Updates
391
+
366
392
  - Monthly dependency audits
367
393
  - Quarterly penetration testing
368
394
  - Annual security architecture review
369
395
  - Continuous monitoring and alerting
370
396
 
371
397
  ### Security Metrics
398
+
372
399
  - Number of blocked malicious requests
373
400
  - Rate limiting effectiveness
374
401
  - Input validation error rates
@@ -377,12 +404,14 @@ Security validation errors are automatically logged:
377
404
  ## 📞 Security Incident Response
378
405
 
379
406
  ### If You Discover a Vulnerability
407
+
380
408
  1. **Do Not** create a public issue
381
409
  2. **Do** email security concerns privately
382
410
  3. **Include** steps to reproduce
383
411
  4. **Provide** impact assessment if possible
384
412
 
385
413
  ### Response Timeline
414
+
386
415
  - **24 hours**: Initial acknowledgment
387
416
  - **72 hours**: Preliminary assessment
388
417
  - **7 days**: Fix development and testing
@@ -390,4 +419,4 @@ Security validation errors are automatically logged:
390
419
 
391
420
  ---
392
421
 
393
- **🔒 Security is a shared responsibility - implement, test, and monitor continuously!**
422
+ **🔒 Security is a shared responsibility - implement, test, and monitor continuously!**
@@ -11,12 +11,20 @@
11
11
 
12
12
  The WordPress MCP Server provides **59 tools** across **10 categories** for comprehensive WordPress management through the Model Context Protocol.
13
13
 
14
- **Last Updated:** 30.6.2025
14
+ **Last Updated:** 3.7.2025
15
15
  **Version:** 1.2.0
16
16
  **Coverage:** 59/59 tools with examples
17
17
 
18
18
  ## Quick Start
19
19
 
20
+ **First, install and configure the MCP WordPress server:**
21
+
22
+ 📖 **Setup Guides:**
23
+ - **[NPX Setup](../user-guides/NPX_SETUP.md)** - Zero installation method (recommended)
24
+ - **[NPM Setup](../user-guides/NPM_SETUP.md)** - Local development
25
+ - **[Docker Setup](../user-guides/DOCKER_SETUP.md)** - Containerized deployment
26
+ - **[DTX Setup](../user-guides/DTX_SETUP.md)** - Desktop Extension package
27
+
20
28
  ### Basic Usage
21
29
  ```bash
22
30
  # List all posts
@@ -2,7 +2,7 @@
2
2
  "totalTools": 59,
3
3
  "totalCategories": 10,
4
4
  "totalTypes": 1,
5
- "lastUpdated": "2025-06-29T22:22:37.534Z",
5
+ "lastUpdated": "2025-07-03T17:22:44.406Z",
6
6
  "version": "1.2.0",
7
7
  "coverage": {
8
8
  "toolsWithExamples": 59,