mcp-wordpress 2.10.0 → 2.10.2

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 (198) hide show
  1. package/README.md +17 -19
  2. package/bin/mcp-wordpress.js +3 -3
  3. package/bin/setup.js +140 -141
  4. package/bin/status.js +112 -114
  5. package/dist/client/MockWordPressClient.d.ts.map +1 -1
  6. package/dist/client/MockWordPressClient.js.map +1 -1
  7. package/dist/client/SEOWordPressClient.d.ts.map +1 -1
  8. package/dist/client/SEOWordPressClient.js +16 -14
  9. package/dist/client/SEOWordPressClient.js.map +1 -1
  10. package/dist/client/index.d.ts +6 -6
  11. package/dist/client/index.js +6 -6
  12. package/dist/client/managers/AuthManager.d.ts.map +1 -1
  13. package/dist/client/managers/AuthManager.js +2 -2
  14. package/dist/client/managers/AuthManager.js.map +1 -1
  15. package/dist/client/managers/AuthenticationManager.js +1 -1
  16. package/dist/client/managers/JWTAuthImplementation.d.ts.map +1 -1
  17. package/dist/client/managers/JWTAuthImplementation.js +7 -7
  18. package/dist/client/managers/JWTAuthImplementation.js.map +1 -1
  19. package/dist/client/managers/composed/MigrationAdapter.js +1 -1
  20. package/dist/client/managers/composed/index.d.ts +2 -2
  21. package/dist/client/managers/composed/index.d.ts.map +1 -1
  22. package/dist/client/managers/composed/index.js +1 -1
  23. package/dist/client/managers/composed/index.js.map +1 -1
  24. package/dist/client/managers/implementations/ErrorHandlerImpl.d.ts.map +1 -1
  25. package/dist/client/managers/implementations/ErrorHandlerImpl.js +2 -4
  26. package/dist/client/managers/implementations/ErrorHandlerImpl.js.map +1 -1
  27. package/dist/client/managers/implementations/ParameterValidatorImpl.d.ts.map +1 -1
  28. package/dist/client/managers/implementations/ParameterValidatorImpl.js +1 -1
  29. package/dist/client/managers/implementations/ParameterValidatorImpl.js.map +1 -1
  30. package/dist/client/managers/interfaces/ManagerInterfaces.d.ts.map +1 -1
  31. package/dist/config/index.d.ts +3 -3
  32. package/dist/config/index.js +3 -3
  33. package/dist/docs/MarkdownFormatter.d.ts.map +1 -1
  34. package/dist/docs/MarkdownFormatter.js +7 -7
  35. package/dist/docs/MarkdownFormatter.js.map +1 -1
  36. package/dist/performance/PerformanceAnalytics.d.ts.map +1 -1
  37. package/dist/performance/PerformanceAnalytics.js +3 -1
  38. package/dist/performance/PerformanceAnalytics.js.map +1 -1
  39. package/dist/security/InputValidator.js +1 -1
  40. package/dist/security/SecurityCIPipeline.js +1 -1
  41. package/dist/security/SecurityCIPipeline.js.map +1 -1
  42. package/dist/security/SecurityConfig.d.ts.map +1 -1
  43. package/dist/security/SecurityConfig.js +6 -2
  44. package/dist/security/SecurityConfig.js.map +1 -1
  45. package/dist/server/index.d.ts +2 -2
  46. package/dist/server/index.js +2 -2
  47. package/dist/tools/cache.d.ts.map +1 -1
  48. package/dist/tools/cache.js.map +1 -1
  49. package/dist/tools/comments.d.ts.map +1 -1
  50. package/dist/tools/comments.js.map +1 -1
  51. package/dist/tools/performance.d.ts.map +1 -1
  52. package/dist/tools/performance.js.map +1 -1
  53. package/dist/tools/posts/PostHandlers.d.ts.map +1 -1
  54. package/dist/tools/posts/PostHandlers.js.map +1 -1
  55. package/dist/tools/seo/SEOTools.d.ts.map +1 -1
  56. package/dist/tools/seo/SEOTools.js.map +1 -1
  57. package/dist/tools/seo/analyzers/ContentAnalyzer.d.ts.map +1 -1
  58. package/dist/tools/seo/analyzers/ContentAnalyzer.js.map +1 -1
  59. package/dist/types/enhanced.d.ts +17 -17
  60. package/dist/types/enhanced.d.ts.map +1 -1
  61. package/dist/types/enhanced.js +2 -2
  62. package/dist/types/index.d.ts +2 -2
  63. package/dist/types/index.d.ts.map +1 -1
  64. package/dist/types/requests.d.ts +16 -16
  65. package/dist/types/tools.d.ts +46 -46
  66. package/dist/types/tools.d.ts.map +1 -1
  67. package/dist/utils/index.d.ts +7 -7
  68. package/dist/utils/index.js +7 -7
  69. package/docs/ARCHITECTURE.md +17 -17
  70. package/docs/BADGE_UPDATES.md +11 -11
  71. package/docs/CACHING.md +2 -0
  72. package/docs/CI_CD_IMPROVEMENTS.md +8 -5
  73. package/docs/CONFIGURATION.md +76 -46
  74. package/docs/DOCKER_PUBLISHING_TROUBLESHOOTING.md +11 -2
  75. package/docs/EVALUATION.md +16 -21
  76. package/docs/INCREMENTAL_COVERAGE.md +7 -3
  77. package/docs/INSTALLATION.md +33 -19
  78. package/docs/PUBLISHING-TROUBLESHOOTING.md +3 -2
  79. package/docs/SECURITY.md +17 -15
  80. package/docs/SECURITY_TESTING.md +3 -0
  81. package/docs/TROUBLESHOOTING.md +85 -36
  82. package/docs/api/README.md +118 -125
  83. package/docs/api/categories/auth.md +3 -1
  84. package/docs/api/categories/cache.md +3 -1
  85. package/docs/api/categories/comment.md +3 -1
  86. package/docs/api/categories/media.md +3 -1
  87. package/docs/api/categories/page.md +3 -1
  88. package/docs/api/categories/performance.md +3 -1
  89. package/docs/api/categories/post.md +3 -1
  90. package/docs/api/categories/site.md +3 -1
  91. package/docs/api/categories/taxonomy.md +3 -1
  92. package/docs/api/categories/user.md +3 -1
  93. package/docs/api/openapi.json +114 -410
  94. package/docs/api/summary.json +1 -1
  95. package/docs/api/tools/wp_approve_comment.md +13 -25
  96. package/docs/api/tools/wp_cache_clear.md +17 -30
  97. package/docs/api/tools/wp_cache_info.md +16 -29
  98. package/docs/api/tools/wp_cache_stats.md +16 -29
  99. package/docs/api/tools/wp_cache_warm.md +16 -29
  100. package/docs/api/tools/wp_create_application_password.md +14 -26
  101. package/docs/api/tools/wp_create_category.md +14 -26
  102. package/docs/api/tools/wp_create_comment.md +18 -31
  103. package/docs/api/tools/wp_create_page.md +17 -29
  104. package/docs/api/tools/wp_create_post.md +25 -30
  105. package/docs/api/tools/wp_create_tag.md +13 -25
  106. package/docs/api/tools/wp_create_user.md +18 -30
  107. package/docs/api/tools/wp_delete_application_password.md +14 -26
  108. package/docs/api/tools/wp_delete_category.md +13 -25
  109. package/docs/api/tools/wp_delete_comment.md +14 -26
  110. package/docs/api/tools/wp_delete_media.md +14 -25
  111. package/docs/api/tools/wp_delete_page.md +14 -25
  112. package/docs/api/tools/wp_delete_post.md +17 -25
  113. package/docs/api/tools/wp_delete_tag.md +13 -25
  114. package/docs/api/tools/wp_delete_user.md +14 -25
  115. package/docs/api/tools/wp_get_application_passwords.md +13 -25
  116. package/docs/api/tools/wp_get_auth_status.md +12 -24
  117. package/docs/api/tools/wp_get_category.md +13 -25
  118. package/docs/api/tools/wp_get_comment.md +13 -25
  119. package/docs/api/tools/wp_get_current_user.md +17 -30
  120. package/docs/api/tools/wp_get_media.md +13 -25
  121. package/docs/api/tools/wp_get_page.md +13 -25
  122. package/docs/api/tools/wp_get_page_revisions.md +13 -25
  123. package/docs/api/tools/wp_get_post.md +16 -25
  124. package/docs/api/tools/wp_get_post_revisions.md +13 -25
  125. package/docs/api/tools/wp_get_site_settings.md +12 -23
  126. package/docs/api/tools/wp_get_tag.md +13 -25
  127. package/docs/api/tools/wp_get_user.md +13 -25
  128. package/docs/api/tools/wp_list_categories.md +15 -27
  129. package/docs/api/tools/wp_list_comments.md +15 -27
  130. package/docs/api/tools/wp_list_media.md +18 -31
  131. package/docs/api/tools/wp_list_pages.md +18 -31
  132. package/docs/api/tools/wp_list_posts.md +29 -41
  133. package/docs/api/tools/wp_list_tags.md +14 -26
  134. package/docs/api/tools/wp_list_users.md +20 -34
  135. package/docs/api/tools/wp_performance_alerts.md +22 -36
  136. package/docs/api/tools/wp_performance_benchmark.md +20 -34
  137. package/docs/api/tools/wp_performance_export.md +22 -36
  138. package/docs/api/tools/wp_performance_history.md +21 -35
  139. package/docs/api/tools/wp_performance_optimize.md +22 -36
  140. package/docs/api/tools/wp_performance_stats.md +20 -34
  141. package/docs/api/tools/wp_search_site.md +18 -32
  142. package/docs/api/tools/wp_spam_comment.md +13 -25
  143. package/docs/api/tools/wp_switch_auth_method.md +18 -31
  144. package/docs/api/tools/wp_test_auth.md +15 -30
  145. package/docs/api/tools/wp_update_category.md +14 -26
  146. package/docs/api/tools/wp_update_comment.md +17 -30
  147. package/docs/api/tools/wp_update_media.md +19 -32
  148. package/docs/api/tools/wp_update_page.md +18 -30
  149. package/docs/api/tools/wp_update_post.md +21 -30
  150. package/docs/api/tools/wp_update_site_settings.md +18 -31
  151. package/docs/api/tools/wp_update_tag.md +14 -26
  152. package/docs/api/tools/wp_update_user.md +17 -29
  153. package/docs/api/tools/wp_upload_media.md +20 -32
  154. package/docs/api/types/WordPressPost.md +8 -15
  155. package/docs/code-improvements.md +1 -0
  156. package/docs/developer/GITHUB_ACTIONS_SETUP.md +2 -2
  157. package/docs/developer/MAINTENANCE.md +4 -0
  158. package/docs/developer/NPM_AUTH_SETUP.md +3 -0
  159. package/docs/developer/RELEASE_PROCESS.md +1 -0
  160. package/docs/examples/multi-site-setup.md +2 -0
  161. package/docs/integrations/claude-desktop.md +14 -5
  162. package/docs/integrations/cline.md +1 -0
  163. package/docs/user-guides/DTX_SETUP.md +9 -8
  164. package/docs/user-guides/NPX_SETUP.md +5 -9
  165. package/docs/user-guides/SMITHERY_SETUP.md +5 -0
  166. package/docs/v2.2.0-resolution-demo.md +17 -2
  167. package/package.json +2 -1
  168. package/src/cache/__tests__/CacheManager.test.ts +4 -8
  169. package/src/client/MockWordPressClient.ts +5 -1
  170. package/src/client/SEOWordPressClient.ts +30 -26
  171. package/src/client/index.ts +6 -6
  172. package/src/client/managers/AuthManager.ts +16 -8
  173. package/src/client/managers/AuthenticationManager.ts +2 -2
  174. package/src/client/managers/JWTAuthImplementation.ts +24 -27
  175. package/src/client/managers/ManagersIndex.ts +1 -1
  176. package/src/client/managers/composed/MigrationAdapter.ts +1 -1
  177. package/src/client/managers/composed/index.ts +7 -7
  178. package/src/client/managers/implementations/ErrorHandlerImpl.ts +12 -26
  179. package/src/client/managers/implementations/ParameterValidatorImpl.ts +49 -49
  180. package/src/client/managers/interfaces/ManagerInterfaces.ts +13 -9
  181. package/src/config/index.ts +3 -3
  182. package/src/docs/MarkdownFormatter.ts +13 -9
  183. package/src/performance/PerformanceAnalytics.ts +9 -3
  184. package/src/security/InputValidator.ts +1 -1
  185. package/src/security/SecurityCIPipeline.ts +1 -1
  186. package/src/security/SecurityConfig.ts +9 -3
  187. package/src/server/index.ts +2 -2
  188. package/src/tools/cache.ts +3 -1
  189. package/src/tools/comments.ts +3 -1
  190. package/src/tools/performance.ts +7 -3
  191. package/src/tools/posts/PostHandlers.ts +3 -1
  192. package/src/tools/seo/SEOTools.ts +6 -2
  193. package/src/tools/seo/analyzers/ContentAnalyzer.ts +9 -3
  194. package/src/types/enhanced.ts +34 -34
  195. package/src/types/index.ts +13 -11
  196. package/src/types/requests.ts +19 -19
  197. package/src/types/tools.ts +137 -84
  198. package/src/utils/index.ts +7 -7
@@ -14,9 +14,9 @@
14
14
 
15
15
  ## System Overview
16
16
 
17
- The MCP WordPress Server is a TypeScript-based Model Context Protocol (MCP) server that provides AI tools
18
- with comprehensive WordPress management capabilities. It follows a modular, security-first architecture with
19
- comprehensive validation and performance optimization.
17
+ The MCP WordPress Server is a TypeScript-based Model Context Protocol (MCP) server that provides AI tools with
18
+ comprehensive WordPress management capabilities. It follows a modular, security-first architecture with comprehensive
19
+ validation and performance optimization.
20
20
 
21
21
  ### Key Architectural Principles
22
22
 
@@ -222,7 +222,7 @@ class MCPWordPressServer {
222
222
  private wordpressClients: Map<string, WordPressClient>;
223
223
  private toolRegistry: ToolRegistry;
224
224
  private connectionTester: ConnectionTester;
225
-
225
+
226
226
  // Server lifecycle management
227
227
  // Tool registration and routing
228
228
  // Multi-site client management
@@ -246,7 +246,7 @@ Manages tool discovery, registration, and request routing:
246
246
  class ToolRegistry {
247
247
  private tools: Map<string, ToolHandler>;
248
248
  private toolClasses: ToolClass[];
249
-
249
+
250
250
  // Dynamic tool discovery
251
251
  // Tool metadata management
252
252
  // Request routing
@@ -270,7 +270,7 @@ Modular HTTP client for WordPress REST API:
270
270
  class WordPressClient {
271
271
  private authManager: AuthenticationManager;
272
272
  private requestManager: RequestManager;
273
-
273
+
274
274
  // High-level WordPress operations
275
275
  // Manager coordination
276
276
  // Configuration management
@@ -307,7 +307,7 @@ class PostTools {
307
307
  public getTools(): MCPTool[] {
308
308
  // Tool definitions
309
309
  }
310
-
310
+
311
311
  public async handleListPosts(client: WordPressClient, params: PostQueryParams): Promise<string> {
312
312
  // Implementation with validation, processing, and formatting
313
313
  }
@@ -734,11 +734,11 @@ class WordPressClient {
734
734
  constructor(
735
735
  private authManager: AuthenticationManager,
736
736
  private requestManager: RequestManager,
737
- private cacheManager: CacheManager
737
+ private cacheManager: CacheManager,
738
738
  ) {}
739
-
739
+
740
740
  async getPosts(params: PostQueryParams): Promise<Post[]> {
741
- return this.requestManager.get('/posts', params);
741
+ return this.requestManager.get("/posts", params);
742
742
  }
743
743
  }
744
744
  ```
@@ -771,7 +771,7 @@ class ClientFactory {
771
771
  const authManager = new AuthenticationManager(config.auth);
772
772
  const requestManager = new RequestManager(config.request);
773
773
  const cacheManager = new CacheManager(config.cache);
774
-
774
+
775
775
  return new WordPressClient(authManager, requestManager, cacheManager);
776
776
  }
777
777
  }
@@ -782,13 +782,13 @@ class ClientFactory {
782
782
  ```typescript
783
783
  class PerformanceMonitor {
784
784
  private observers: PerformanceObserver[] = [];
785
-
785
+
786
786
  subscribe(observer: PerformanceObserver): void {
787
787
  this.observers.push(observer);
788
788
  }
789
-
789
+
790
790
  notify(metric: PerformanceMetric): void {
791
- this.observers.forEach(observer => observer.update(metric));
791
+ this.observers.forEach((observer) => observer.update(metric));
792
792
  }
793
793
  }
794
794
  ```
@@ -802,7 +802,7 @@ abstract class BaseTool {
802
802
  const result = await this.executeOperation(client, params);
803
803
  return this.formatResponse(result);
804
804
  }
805
-
805
+
806
806
  protected abstract validateParameters(params: any): void;
807
807
  protected abstract executeOperation(client: WordPressClient, params: any): Promise<any>;
808
808
  protected abstract formatResponse(result: any): string;
@@ -845,6 +845,6 @@ abstract class BaseTool {
845
845
 
846
846
  ---
847
847
 
848
- *This architecture documentation is maintained by the development team. Last updated: 2024-01-15*
848
+ _This architecture documentation is maintained by the development team. Last updated: 2024-01-15_
849
849
 
850
- *For architectural questions, visit our [GitHub Discussions](https://github.com/docdyhr/mcp-wordpress/discussions)*
850
+ _For architectural questions, visit our [GitHub Discussions](https://github.com/docdyhr/mcp-wordpress/discussions)_
@@ -8,7 +8,7 @@ The README.md contains dynamic badges showing:
8
8
 
9
9
  - Test results (passed/total count)
10
10
  - Line coverage percentage
11
- - Branch coverage percentage
11
+ - Branch coverage percentage
12
12
  - Function coverage percentage
13
13
 
14
14
  These badges should be updated when test counts or coverage metrics change significantly.
@@ -32,7 +32,7 @@ Replace the badge URLs in README.md with the new ones from the script output.
32
32
  **Badge Sections to Update:**
33
33
 
34
34
  - Line 19: `[![Line Coverage](...)]`
35
- - Line 20: `[![Branch Coverage](...)]`
35
+ - Line 20: `[![Branch Coverage](...)]`
36
36
  - Line 21: `[![Function Coverage](...)]`
37
37
  - Line 22: `[![Test Results](...)]`
38
38
 
@@ -40,13 +40,13 @@ Replace the badge URLs in README.md with the new ones from the script output.
40
40
 
41
41
  The script automatically applies colors based on coverage levels:
42
42
 
43
- | Coverage % | Color | Badge Color Code |
44
- |-----------|-------|------------------|
45
- | ≥ 70% | Bright Green | `brightgreen` |
46
- | ≥ 50% | Green | `green` |
47
- | ≥ 30% | Yellow | `yellow` |
48
- | ≥ 20% | Orange | `orange` |
49
- | < 20% | Red | `red` |
43
+ | Coverage % | Color | Badge Color Code |
44
+ | ---------- | ------------ | ---------------- |
45
+ | ≥ 70% | Bright Green | `brightgreen` |
46
+ | ≥ 50% | Green | `green` |
47
+ | ≥ 30% | Yellow | `yellow` |
48
+ | ≥ 20% | Orange | `orange` |
49
+ | < 20% | Red | `red` |
50
50
 
51
51
  **Test Results:**
52
52
 
@@ -79,7 +79,7 @@ The extraction script:
79
79
  Future improvements will include:
80
80
 
81
81
  1. **Automated Badge Updates**: GitHub Actions workflow to update badges after successful CI runs
82
- 2. **Coverage Reporting**: Enhanced coverage collection from TypeScript sources
82
+ 2. **Coverage Reporting**: Enhanced coverage collection from TypeScript sources
83
83
  3. **Historical Tracking**: Track coverage trends over time
84
84
  4. **PR Integration**: Show coverage diff in pull requests
85
85
 
@@ -125,7 +125,7 @@ Test badge rendering by visiting the URLs directly:
125
125
  # Test line coverage badge
126
126
  curl -I "https://img.shields.io/badge/lines%20coverage-30.97%25-yellow?logo=jest&logoColor=white"
127
127
 
128
- # Test test results badge
128
+ # Test test results badge
129
129
  curl -I "https://img.shields.io/badge/tests-399%2F404%20passing-yellow?logo=checkmarx&logoColor=white"
130
130
  ```
131
131
 
package/docs/CACHING.md CHANGED
@@ -285,10 +285,12 @@ wp_cache_clear --site="site2" --pattern="posts" # Clear site2 posts only
285
285
  ### **Poor Cache Performance**
286
286
 
287
287
  1. **Monitor hit rates:**
288
+
288
289
  - Good: >60% hit rate after warm-up
289
290
  - Poor: <30% hit rate indicates issues
290
291
 
291
292
  2. **Check TTL settings:**
293
+
292
294
  - Too short: Frequent cache misses
293
295
  - Too long: Stale data issues
294
296
 
@@ -2,8 +2,8 @@
2
2
 
3
3
  ## 🎯 Overview
4
4
 
5
- This document outlines the comprehensive improvements made to the CI/CD pipeline for the MCP WordPress project.
6
- These changes enhance reliability, security, performance, and maintainability.
5
+ This document outlines the comprehensive improvements made to the CI/CD pipeline for the MCP WordPress project. These
6
+ changes enhance reliability, security, performance, and maintainability.
7
7
 
8
8
  ## ✅ Improvements Implemented
9
9
 
@@ -96,7 +96,7 @@ npm run check:ci
96
96
  **Includes:**
97
97
 
98
98
  - TypeScript type checking
99
- - ESLint code linting
99
+ - ESLint code linting
100
100
  - Test coverage analysis
101
101
 
102
102
  ### 3. **CI/CD Health Check Workflow**
@@ -147,21 +147,25 @@ npm run test:coverage
147
147
  ## 🎯 Key Benefits
148
148
 
149
149
  1. **🛡️ Increased Reliability**
150
+
150
151
  - Better error handling prevents cascading failures
151
152
  - Timeouts prevent hanging builds
152
153
  - Improved retry logic for transient failures
153
154
 
154
155
  2. **⚡ Enhanced Performance**
156
+
155
157
  - Intelligent caching reduces build times
156
158
  - Parallel execution optimized
157
159
  - Artifact management streamlined
158
160
 
159
161
  3. **🔒 Improved Security**
162
+
160
163
  - Updated security scanners
161
164
  - Better secret handling validation
162
165
  - Enhanced security monitoring
163
166
 
164
167
  4. **📈 Better Monitoring**
168
+
165
169
  - Automated health checks
166
170
  - Comprehensive validation scripts
167
171
  - Actionable insights and recommendations
@@ -187,5 +191,4 @@ npm run test:coverage
187
191
 
188
192
  ---
189
193
 
190
- **Last Updated**: August 8, 2025
191
- **Status**: ✅ Complete - Ready for Production
194
+ **Last Updated**: August 8, 2025 **Status**: ✅ Complete - Ready for Production
@@ -6,12 +6,12 @@ Complete configuration reference for MCP WordPress Server supporting single-site
6
6
 
7
7
  The MCP WordPress Server supports flexible configuration through multiple methods:
8
8
 
9
- | Method | Best For | Configuration File |
10
- |--------|----------|--------------------|
11
- | **Environment Variables** | Single site, development | `.env` |
12
- | **Multi-Site JSON** | Multiple sites, production | `mcp-wordpress.config.json` |
13
- | **Claude Desktop** | Desktop integration | `claude_desktop_config.json` |
14
- | **DXT Extension** | Easy desktop setup | Built-in UI |
9
+ | Method | Best For | Configuration File |
10
+ | ------------------------- | -------------------------- | ---------------------------- |
11
+ | **Environment Variables** | Single site, development | `.env` |
12
+ | **Multi-Site JSON** | Multiple sites, production | `mcp-wordpress.config.json` |
13
+ | **Claude Desktop** | Desktop integration | `claude_desktop_config.json` |
14
+ | **DXT Extension** | Easy desktop setup | Built-in UI |
15
15
 
16
16
  ## 🌐 Single-Site Configuration
17
17
 
@@ -47,33 +47,33 @@ RATE_LIMIT_WINDOW=60000
47
47
 
48
48
  #### Required Variables
49
49
 
50
- | Variable | Required | Description | Example |
51
- |----------|----------|-------------|---------|
52
- | `WORDPRESS_SITE_URL` | Yes | Full WordPress site URL | `https://blog.example.com` |
53
- | `WORDPRESS_USERNAME` | Yes | WordPress username | `admin` |
54
- | `WORDPRESS_APP_PASSWORD` | Yes | WordPress application password | `AbCd EfGh IjKl MnOp QrSt UvWx` |
50
+ | Variable | Required | Description | Example |
51
+ | ------------------------ | -------- | ------------------------------ | ------------------------------- |
52
+ | `WORDPRESS_SITE_URL` | Yes | Full WordPress site URL | `https://blog.example.com` |
53
+ | `WORDPRESS_USERNAME` | Yes | WordPress username | `admin` |
54
+ | `WORDPRESS_APP_PASSWORD` | Yes | WordPress application password | `AbCd EfGh IjKl MnOp QrSt UvWx` |
55
55
 
56
56
  #### Authentication Variables
57
57
 
58
- | Variable | Default | Description | Options |
59
- |----------|---------|-------------|---------|
58
+ | Variable | Default | Description | Options |
59
+ | ----------------------- | -------------- | --------------------- | ----------------------------------------- |
60
60
  | `WORDPRESS_AUTH_METHOD` | `app-password` | Authentication method | `app-password`, `jwt`, `basic`, `api-key` |
61
61
 
62
62
  #### Runtime Variables
63
63
 
64
- | Variable | Default | Description | Options |
65
- |----------|---------|-------------|---------|
66
- | `NODE_ENV` | `production` | Runtime environment | `development`, `production`, `test`, `dxt` |
67
- | `DEBUG` | `false` | Enable debug logging | `true`, `false` |
68
- | `LOG_LEVEL` | `info` | Logging verbosity | `error`, `warn`, `info`, `debug` |
64
+ | Variable | Default | Description | Options |
65
+ | ----------- | ------------ | -------------------- | ------------------------------------------ |
66
+ | `NODE_ENV` | `production` | Runtime environment | `development`, `production`, `test`, `dxt` |
67
+ | `DEBUG` | `false` | Enable debug logging | `true`, `false` |
68
+ | `LOG_LEVEL` | `info` | Logging verbosity | `error`, `warn`, `info`, `debug` |
69
69
 
70
70
  #### Performance Variables
71
71
 
72
- | Variable | Default | Description | Range |
73
- |----------|---------|-------------|-------|
74
- | `DISABLE_CACHE` | `false` | Disable caching system | `true`, `false` |
75
- | `CACHE_TTL` | `300` | Cache time-to-live (seconds) | `60-3600` |
76
- | `MAX_CACHE_SIZE` | `1000` | Maximum cache entries | `100-10000` |
72
+ | Variable | Default | Description | Range |
73
+ | ---------------- | ------- | ---------------------------- | --------------- |
74
+ | `DISABLE_CACHE` | `false` | Disable caching system | `true`, `false` |
75
+ | `CACHE_TTL` | `300` | Cache time-to-live (seconds) | `60-3600` |
76
+ | `MAX_CACHE_SIZE` | `1000` | Maximum cache entries | `100-10000` |
77
77
 
78
78
  ## 🏢 Multi-Site Configuration
79
79
 
@@ -86,7 +86,7 @@ Create `mcp-wordpress.config.json` in your project root:
86
86
  "sites": [
87
87
  {
88
88
  "id": "main-site",
89
- "name": "Main WordPress Site",
89
+ "name": "Main WordPress Site",
90
90
  "config": {
91
91
  "WORDPRESS_SITE_URL": "https://main-site.com",
92
92
  "WORDPRESS_USERNAME": "admin",
@@ -98,7 +98,7 @@ Create `mcp-wordpress.config.json` in your project root:
98
98
  "id": "client-blog",
99
99
  "name": "Client Blog",
100
100
  "config": {
101
- "WORDPRESS_SITE_URL": "https://client-blog.com",
101
+ "WORDPRESS_SITE_URL": "https://client-blog.com",
102
102
  "WORDPRESS_USERNAME": "editor",
103
103
  "WORDPRESS_APP_PASSWORD": "yyyy yyyy yyyy yyyy yyyy yyyy",
104
104
  "WORDPRESS_AUTH_METHOD": "jwt"
@@ -121,14 +121,17 @@ Create `mcp-wordpress.config.json` in your project root:
121
121
  ### Multi-Site Configuration Rules
122
122
 
123
123
  #### Site Identification
124
+
124
125
  - **`id`**: Unique identifier (alphanumeric, hyphens, underscores only)
125
126
  - **`name`**: Human-readable name for documentation
126
127
  - **Maximum sites**: 50 sites per configuration
127
128
 
128
129
  #### Uniqueness Requirements
130
+
129
131
  All of these must be unique across all sites:
132
+
130
133
  - Site IDs
131
- - Site names
134
+ - Site names
132
135
  - WordPress site URLs
133
136
 
134
137
  #### Site-Specific Usage
@@ -146,6 +149,7 @@ wp_get_site_settings --site="dev-site"
146
149
  ### Multi-Site Example Configurations
147
150
 
148
151
  #### Agency Setup
152
+
149
153
  ```json
150
154
  {
151
155
  "sites": [
@@ -159,7 +163,7 @@ wp_get_site_settings --site="dev-site"
159
163
  }
160
164
  },
161
165
  {
162
- "id": "client-a",
166
+ "id": "client-a",
163
167
  "name": "Client A Blog",
164
168
  "config": {
165
169
  "WORDPRESS_SITE_URL": "https://clienta.com/blog",
@@ -172,7 +176,7 @@ wp_get_site_settings --site="dev-site"
172
176
  "name": "Client B E-commerce",
173
177
  "config": {
174
178
  "WORDPRESS_SITE_URL": "https://clientb-shop.com",
175
- "WORDPRESS_USERNAME": "shop_manager",
179
+ "WORDPRESS_USERNAME": "shop_manager",
176
180
  "WORDPRESS_APP_PASSWORD": "zzzz zzzz zzzz zzzz zzzz zzzz"
177
181
  }
178
182
  }
@@ -181,6 +185,7 @@ wp_get_site_settings --site="dev-site"
181
185
  ```
182
186
 
183
187
  #### Development Workflow
188
+
184
189
  ```json
185
190
  {
186
191
  "sites": [
@@ -195,7 +200,7 @@ wp_get_site_settings --site="dev-site"
195
200
  },
196
201
  {
197
202
  "id": "staging",
198
- "name": "Staging Environment",
203
+ "name": "Staging Environment",
199
204
  "config": {
200
205
  "WORDPRESS_SITE_URL": "https://staging.mysite.com",
201
206
  "WORDPRESS_USERNAME": "admin",
@@ -221,33 +226,38 @@ wp_get_site_settings --site="dev-site"
221
226
  ### Application Passwords (Recommended)
222
227
 
223
228
  **WordPress Setup:**
229
+
224
230
  1. **Enable Application Passwords** (WordPress 5.6+)
225
231
  2. **Generate Password**: Users → Profile → Application Passwords
226
232
  3. **Copy Password**: Exact format with spaces
227
233
 
228
234
  **Configuration:**
235
+
229
236
  ```json
230
237
  {
231
238
  "WORDPRESS_AUTH_METHOD": "app-password",
232
- "WORDPRESS_USERNAME": "your-username",
239
+ "WORDPRESS_USERNAME": "your-username",
233
240
  "WORDPRESS_APP_PASSWORD": "AbCd EfGh IjKl MnOp QrSt UvWx"
234
241
  }
235
242
  ```
236
243
 
237
244
  **Security Benefits:**
245
+
238
246
  - ✅ Revocable without changing main password
239
- - ✅ Scoped permissions
247
+ - ✅ Scoped permissions
240
248
  - ✅ Audit trail
241
249
  - ✅ WordPress native support
242
250
 
243
251
  ### JWT Authentication
244
252
 
245
253
  **WordPress Setup:**
254
+
246
255
  1. **Install JWT Plugin**: JWT Authentication for WP-API
247
256
  2. **Configure JWT Secret** in wp-config.php
248
257
  3. **Get JWT Token** via login endpoint
249
258
 
250
259
  **Configuration:**
260
+
251
261
  ```json
252
262
  {
253
263
  "WORDPRESS_AUTH_METHOD": "jwt",
@@ -257,6 +267,7 @@ wp_get_site_settings --site="dev-site"
257
267
  ```
258
268
 
259
269
  **WordPress JWT Setup:**
270
+
260
271
  ```php
261
272
  // wp-config.php
262
273
  define('JWT_AUTH_SECRET_KEY', 'your-secret-key');
@@ -268,6 +279,7 @@ define('JWT_AUTH_CORS_ENABLE', true);
268
279
  **⚠️ Development Only - Not recommended for production**
269
280
 
270
281
  **Configuration:**
282
+
271
283
  ```json
272
284
  {
273
285
  "WORDPRESS_AUTH_METHOD": "basic",
@@ -279,15 +291,17 @@ define('JWT_AUTH_CORS_ENABLE', true);
279
291
  ### API Key Authentication
280
292
 
281
293
  **WordPress Setup:**
282
- 1. **Install API Key Plugin**
294
+
295
+ 1. **Install API Key Plugin**
283
296
  2. **Generate API Key** in WordPress admin
284
297
  3. **Configure Key Permissions**
285
298
 
286
299
  **Configuration:**
300
+
287
301
  ```json
288
302
  {
289
303
  "WORDPRESS_AUTH_METHOD": "api-key",
290
- "WORDPRESS_USERNAME": "your-username",
304
+ "WORDPRESS_USERNAME": "your-username",
291
305
  "WORDPRESS_APP_PASSWORD": "your-api-key"
292
306
  }
293
307
  ```
@@ -306,7 +320,7 @@ Add to `claude_desktop_config.json`:
306
320
  "args": ["-y", "mcp-wordpress"],
307
321
  "env": {
308
322
  "WORDPRESS_SITE_URL": "https://your-site.com",
309
- "WORDPRESS_USERNAME": "your-username",
323
+ "WORDPRESS_USERNAME": "your-username",
310
324
  "WORDPRESS_APP_PASSWORD": "your-app-password",
311
325
  "WORDPRESS_AUTH_METHOD": "app-password"
312
326
  }
@@ -340,7 +354,7 @@ For multi-site setups, create a configuration file and reference it:
340
354
  {
341
355
  "mcpServers": {
342
356
  "mcp-wordpress": {
343
- "command": "npx",
357
+ "command": "npx",
344
358
  "args": ["-y", "mcp-wordpress"],
345
359
  "cwd": "/path/to/your/config/directory"
346
360
  }
@@ -365,7 +379,7 @@ docker run -d \
365
379
  ### Docker Compose
366
380
 
367
381
  ```yaml
368
- version: '3.8'
382
+ version: "3.8"
369
383
  services:
370
384
  mcp-wordpress:
371
385
  image: docdyhr/mcp-wordpress:latest
@@ -383,7 +397,7 @@ services:
383
397
  ### Multi-Site with Docker
384
398
 
385
399
  ```yaml
386
- version: '3.8'
400
+ version: "3.8"
387
401
  services:
388
402
  mcp-wordpress:
389
403
  image: docdyhr/mcp-wordpress:latest
@@ -397,6 +411,7 @@ services:
397
411
  ### Performance Tuning
398
412
 
399
413
  #### Cache Configuration
414
+
400
415
  ```bash
401
416
  # Optimize for high-traffic sites
402
417
  CACHE_TTL=600 # 10 minutes
@@ -404,18 +419,19 @@ MAX_CACHE_SIZE=5000 # 5000 entries
404
419
  CACHE_CLEANUP_INTERVAL=300 # 5 minutes
405
420
 
406
421
  # Optimize for low-memory environments
407
- CACHE_TTL=120 # 2 minutes
422
+ CACHE_TTL=120 # 2 minutes
408
423
  MAX_CACHE_SIZE=100 # 100 entries
409
424
  DISABLE_CACHE=false # Keep basic caching
410
425
  ```
411
426
 
412
427
  #### Rate Limiting
428
+
413
429
  ```bash
414
430
  # Conservative limits
415
431
  RATE_LIMIT_REQUESTS=100 # 100 requests
416
432
  RATE_LIMIT_WINDOW=60000 # per minute
417
433
 
418
- # Aggressive limits
434
+ # Aggressive limits
419
435
  RATE_LIMIT_REQUESTS=1000 # 1000 requests
420
436
  RATE_LIMIT_WINDOW=60000 # per minute
421
437
  ```
@@ -423,6 +439,7 @@ RATE_LIMIT_WINDOW=60000 # per minute
423
439
  ### Security Hardening
424
440
 
425
441
  #### Network Security
442
+
426
443
  ```bash
427
444
  # Bind to specific interface (Docker/production)
428
445
  BIND_ADDRESS=127.0.0.1
@@ -435,6 +452,7 @@ FORCE_HTTPS=true
435
452
  ```
436
453
 
437
454
  #### Authentication Security
455
+
438
456
  ```bash
439
457
  # Strengthen authentication
440
458
  AUTH_TIMEOUT=300 # 5 minute auth timeout
@@ -445,6 +463,7 @@ AUTH_LOCKOUT_DURATION=900 # 15 minute lockout
445
463
  ### Monitoring Configuration
446
464
 
447
465
  #### Logging
466
+
448
467
  ```bash
449
468
  # Development logging
450
469
  NODE_ENV=development
@@ -452,13 +471,14 @@ DEBUG=true
452
471
  LOG_LEVEL=debug
453
472
 
454
473
  # Production logging
455
- NODE_ENV=production
474
+ NODE_ENV=production
456
475
  DEBUG=false
457
476
  LOG_LEVEL=warn
458
477
  LOG_FILE=/var/log/mcp-wordpress.log
459
478
  ```
460
479
 
461
480
  #### Performance Monitoring
481
+
462
482
  ```bash
463
483
  # Enable performance tracking
464
484
  ENABLE_PERFORMANCE_MONITORING=true
@@ -487,19 +507,21 @@ npm run config:show
487
507
  ### Common Validation Errors
488
508
 
489
509
  #### 1. Invalid URL Format
510
+
490
511
  ```bash
491
512
  # ❌ Common mistakes
492
513
  WORDPRESS_SITE_URL=mysite.com # Missing protocol
493
514
  WORDPRESS_SITE_URL=https://mysite.com/ # Trailing slash
494
515
  WORDPRESS_SITE_URL=http://localhost # Missing port for local
495
516
 
496
- # ✅ Correct formats
517
+ # ✅ Correct formats
497
518
  WORDPRESS_SITE_URL=https://mysite.com
498
519
  WORDPRESS_SITE_URL=http://localhost:8080
499
520
  WORDPRESS_SITE_URL=https://blog.mysite.com
500
521
  ```
501
522
 
502
523
  #### 2. Invalid Authentication Method
524
+
503
525
  ```bash
504
526
  # ❌ Invalid
505
527
  WORDPRESS_AUTH_METHOD=password # Not supported
@@ -512,18 +534,19 @@ WORDPRESS_AUTH_METHOD=api-key # With plugin
512
534
  ```
513
535
 
514
536
  #### 3. Multi-Site Configuration Errors
537
+
515
538
  ```bash
516
539
  # ❌ Duplicate site IDs
517
540
  {"id": "site1", ...}
518
541
  {"id": "site1", ...} # Error: duplicate ID
519
542
 
520
- # ❌ Invalid site ID characters
543
+ # ❌ Invalid site ID characters
521
544
  {"id": "site 1", ...} # Spaces not allowed
522
545
  {"id": "site@1", ...} # Special chars not allowed
523
546
 
524
547
  # ✅ Valid site IDs
525
548
  {"id": "site-1", ...} # Hyphens OK
526
- {"id": "site_1", ...} # Underscores OK
549
+ {"id": "site_1", ...} # Underscores OK
527
550
  {"id": "site1", ...} # Alphanumeric OK
528
551
  ```
529
552
 
@@ -532,11 +555,13 @@ WORDPRESS_AUTH_METHOD=api-key # With plugin
532
555
  ### From Single-Site to Multi-Site
533
556
 
534
557
  1. **Backup Current Configuration**
558
+
535
559
  ```bash
536
560
  cp .env .env.backup
537
561
  ```
538
562
 
539
563
  2. **Create Multi-Site Config**
564
+
540
565
  ```json
541
566
  {
542
567
  "sites": [
@@ -545,7 +570,7 @@ WORDPRESS_AUTH_METHOD=api-key # With plugin
545
570
  "name": "Main Site",
546
571
  "config": {
547
572
  "WORDPRESS_SITE_URL": "your-current-url",
548
- "WORDPRESS_USERNAME": "your-current-username",
573
+ "WORDPRESS_USERNAME": "your-current-username",
549
574
  "WORDPRESS_APP_PASSWORD": "your-current-password"
550
575
  }
551
576
  }
@@ -570,6 +595,7 @@ WORDPRESS_AUTH_METHOD=api-key # With plugin
570
595
 
571
596
  1. **Choose Primary Site** from multi-site config
572
597
  2. **Extract Configuration**
598
+
573
599
  ```bash
574
600
  # From mcp-wordpress.config.json site
575
601
  WORDPRESS_SITE_URL=https://primary-site.com
@@ -584,6 +610,7 @@ WORDPRESS_AUTH_METHOD=api-key # With plugin
584
610
  ### Credential Management
585
611
 
586
612
  1. **Never commit credentials** to version control
613
+
587
614
  ```bash
588
615
  # Add to .gitignore
589
616
  .env
@@ -599,6 +626,7 @@ WORDPRESS_AUTH_METHOD=api-key # With plugin
599
626
  ### Configuration Security
600
627
 
601
628
  1. **File Permissions**
629
+
602
630
  ```bash
603
631
  # Secure configuration files
604
632
  chmod 600 .env
@@ -606,10 +634,11 @@ WORDPRESS_AUTH_METHOD=api-key # With plugin
606
634
  ```
607
635
 
608
636
  2. **Environment Isolation**
637
+
609
638
  ```bash
610
639
  # Separate configs for different environments
611
640
  .env.development
612
- .env.staging
641
+ .env.staging
613
642
  .env.production
614
643
  ```
615
644
 
@@ -624,6 +653,7 @@ WORDPRESS_AUTH_METHOD=api-key # With plugin
624
653
  ### Example Templates
625
654
 
626
655
  Complete configuration examples are available in:
656
+
627
657
  - **[Single-Site Template](../examples/basic-setup/.env.example)**
628
658
  - **[Multi-Site Template](../examples/multi-site/mcp-wordpress.config.json.example)**
629
659
  - **[Docker Template](../examples/docker/docker-compose.yml)**
@@ -657,4 +687,4 @@ CACHE_TTL=60
657
687
  ---
658
688
 
659
689
  **Need help with configuration?** Check the [Troubleshooting Guide](TROUBLESHOOTING.md) or
660
- [open an issue](https://github.com/docdyhr/mcp-wordpress/issues/new) for assistance.
690
+ [open an issue](https://github.com/docdyhr/mcp-wordpress/issues/new) for assistance.