mcp-wordpress 1.5.2 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. package/README.md +332 -61
  2. package/dist/cache/CacheInvalidation.d.ts.map +1 -1
  3. package/dist/cache/CacheInvalidation.js +4 -4
  4. package/dist/cache/CacheInvalidation.js.map +1 -1
  5. package/dist/client/MockWordPressClient.d.ts +55 -0
  6. package/dist/client/MockWordPressClient.d.ts.map +1 -0
  7. package/dist/client/MockWordPressClient.js +369 -0
  8. package/dist/client/MockWordPressClient.js.map +1 -0
  9. package/dist/client/api.d.ts +1 -0
  10. package/dist/client/api.d.ts.map +1 -1
  11. package/dist/client/api.js +26 -60
  12. package/dist/client/api.js.map +1 -1
  13. package/dist/client/managers/AuthenticationManager.d.ts.map +1 -1
  14. package/dist/client/managers/AuthenticationManager.js +4 -3
  15. package/dist/client/managers/AuthenticationManager.js.map +1 -1
  16. package/dist/config/ConfigurationSchema.d.ts +3 -3
  17. package/dist/config/ConfigurationSchema.d.ts.map +1 -1
  18. package/dist/config/ConfigurationSchema.js +7 -24
  19. package/dist/config/ConfigurationSchema.js.map +1 -1
  20. package/dist/config/ServerConfiguration.d.ts +8 -0
  21. package/dist/config/ServerConfiguration.d.ts.map +1 -1
  22. package/dist/config/ServerConfiguration.js +80 -31
  23. package/dist/config/ServerConfiguration.js.map +1 -1
  24. package/dist/docs/DocumentationGenerator.d.ts.map +1 -1
  25. package/dist/docs/DocumentationGenerator.js +5 -7
  26. package/dist/docs/DocumentationGenerator.js.map +1 -1
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +33 -29
  29. package/dist/index.js.map +1 -1
  30. package/dist/security/InputValidator.d.ts.map +1 -1
  31. package/dist/security/InputValidator.js +3 -11
  32. package/dist/security/InputValidator.js.map +1 -1
  33. package/dist/server/ToolRegistry.d.ts +4 -0
  34. package/dist/server/ToolRegistry.d.ts.map +1 -1
  35. package/dist/server/ToolRegistry.js +71 -8
  36. package/dist/server/ToolRegistry.js.map +1 -1
  37. package/dist/tools/auth.d.ts.map +1 -1
  38. package/dist/tools/auth.js +8 -3
  39. package/dist/tools/auth.js.map +1 -1
  40. package/dist/tools/posts.d.ts.map +1 -1
  41. package/dist/tools/posts.js +287 -20
  42. package/dist/tools/posts.js.map +1 -1
  43. package/dist/tools/site.d.ts.map +1 -1
  44. package/dist/tools/site.js +47 -9
  45. package/dist/tools/site.js.map +1 -1
  46. package/dist/tools/users.d.ts.map +1 -1
  47. package/dist/tools/users.js +113 -10
  48. package/dist/tools/users.js.map +1 -1
  49. package/dist/utils/enhancedError.d.ts +61 -0
  50. package/dist/utils/enhancedError.d.ts.map +1 -0
  51. package/dist/utils/enhancedError.js +221 -0
  52. package/dist/utils/enhancedError.js.map +1 -0
  53. package/dist/utils/streaming.d.ts +104 -0
  54. package/dist/utils/streaming.d.ts.map +1 -0
  55. package/dist/utils/streaming.js +312 -0
  56. package/dist/utils/streaming.js.map +1 -0
  57. package/dist/utils/validation.d.ts +19 -3
  58. package/dist/utils/validation.d.ts.map +1 -1
  59. package/dist/utils/validation.js +174 -24
  60. package/dist/utils/validation.js.map +1 -1
  61. package/docs/ARCHITECTURE.md +850 -0
  62. package/docs/CACHING.md +20 -17
  63. package/docs/CONFIGURATION.md +660 -0
  64. package/docs/DOCKER.md +61 -60
  65. package/docs/EVALUATION.md +397 -0
  66. package/docs/INSTALLATION.md +423 -0
  67. package/docs/PERFORMANCE_MONITORING.md +17 -15
  68. package/docs/SECURITY.md +621 -0
  69. package/docs/SECURITY_TESTING.md +22 -26
  70. package/docs/TEST_SITE_SETUP.md +136 -0
  71. package/docs/TROUBLESHOOTING.md +578 -0
  72. package/docs/api/README.md +76 -91
  73. package/docs/api/categories/auth.md +0 -2
  74. package/docs/api/categories/cache.md +0 -2
  75. package/docs/api/categories/comment.md +0 -2
  76. package/docs/api/categories/media.md +0 -2
  77. package/docs/api/categories/page.md +0 -2
  78. package/docs/api/categories/performance.md +0 -2
  79. package/docs/api/categories/post.md +0 -2
  80. package/docs/api/categories/site.md +0 -2
  81. package/docs/api/categories/taxonomy.md +0 -2
  82. package/docs/api/categories/user.md +0 -2
  83. package/docs/api/summary.json +1 -1
  84. package/docs/api/tools/wp_approve_comment.md +11 -3
  85. package/docs/api/tools/wp_cache_clear.md +14 -5
  86. package/docs/api/tools/wp_cache_info.md +14 -5
  87. package/docs/api/tools/wp_cache_stats.md +14 -5
  88. package/docs/api/tools/wp_cache_warm.md +14 -5
  89. package/docs/api/tools/wp_create_application_password.md +11 -3
  90. package/docs/api/tools/wp_create_category.md +11 -3
  91. package/docs/api/tools/wp_create_comment.md +14 -5
  92. package/docs/api/tools/wp_create_page.md +13 -5
  93. package/docs/api/tools/wp_create_post.md +14 -7
  94. package/docs/api/tools/wp_create_tag.md +11 -3
  95. package/docs/api/tools/wp_create_user.md +13 -5
  96. package/docs/api/tools/wp_delete_application_password.md +11 -3
  97. package/docs/api/tools/wp_delete_category.md +11 -3
  98. package/docs/api/tools/wp_delete_comment.md +11 -3
  99. package/docs/api/tools/wp_delete_media.md +10 -3
  100. package/docs/api/tools/wp_delete_page.md +10 -3
  101. package/docs/api/tools/wp_delete_post.md +11 -5
  102. package/docs/api/tools/wp_delete_tag.md +11 -3
  103. package/docs/api/tools/wp_delete_user.md +10 -3
  104. package/docs/api/tools/wp_get_application_passwords.md +11 -3
  105. package/docs/api/tools/wp_get_auth_status.md +11 -3
  106. package/docs/api/tools/wp_get_category.md +11 -3
  107. package/docs/api/tools/wp_get_comment.md +11 -3
  108. package/docs/api/tools/wp_get_current_user.md +11 -3
  109. package/docs/api/tools/wp_get_media.md +11 -3
  110. package/docs/api/tools/wp_get_page.md +11 -3
  111. package/docs/api/tools/wp_get_page_revisions.md +11 -3
  112. package/docs/api/tools/wp_get_post.md +12 -5
  113. package/docs/api/tools/wp_get_post_revisions.md +11 -3
  114. package/docs/api/tools/wp_get_site_settings.md +10 -3
  115. package/docs/api/tools/wp_get_tag.md +11 -3
  116. package/docs/api/tools/wp_get_user.md +11 -3
  117. package/docs/api/tools/wp_list_categories.md +11 -3
  118. package/docs/api/tools/wp_list_comments.md +11 -3
  119. package/docs/api/tools/wp_list_media.md +14 -5
  120. package/docs/api/tools/wp_list_pages.md +14 -5
  121. package/docs/api/tools/wp_list_posts.md +15 -7
  122. package/docs/api/tools/wp_list_tags.md +11 -3
  123. package/docs/api/tools/wp_list_users.md +11 -3
  124. package/docs/api/tools/wp_performance_alerts.md +17 -7
  125. package/docs/api/tools/wp_performance_benchmark.md +17 -7
  126. package/docs/api/tools/wp_performance_export.md +17 -7
  127. package/docs/api/tools/wp_performance_history.md +17 -7
  128. package/docs/api/tools/wp_performance_optimize.md +17 -7
  129. package/docs/api/tools/wp_performance_stats.md +17 -7
  130. package/docs/api/tools/wp_search_site.md +11 -3
  131. package/docs/api/tools/wp_spam_comment.md +11 -3
  132. package/docs/api/tools/wp_switch_auth_method.md +14 -5
  133. package/docs/api/tools/wp_test_auth.md +11 -3
  134. package/docs/api/tools/wp_update_category.md +11 -3
  135. package/docs/api/tools/wp_update_comment.md +14 -5
  136. package/docs/api/tools/wp_update_media.md +14 -5
  137. package/docs/api/tools/wp_update_page.md +13 -5
  138. package/docs/api/tools/wp_update_post.md +14 -7
  139. package/docs/api/tools/wp_update_site_settings.md +14 -5
  140. package/docs/api/tools/wp_update_tag.md +11 -3
  141. package/docs/api/tools/wp_update_user.md +13 -5
  142. package/docs/api/tools/wp_upload_media.md +13 -5
  143. package/docs/api/types/WordPressPost.md +2 -0
  144. package/docs/code-improvements.md +40 -0
  145. package/docs/contract-testing.md +1 -1
  146. package/docs/developer/API_REFERENCE.md +19 -59
  147. package/docs/developer/ARCHITECTURE.md +8 -11
  148. package/docs/developer/BUILD_SYSTEM.md +2 -2
  149. package/docs/developer/CONTRIBUTING.md +3 -5
  150. package/docs/developer/GITHUB_ACTIONS_SETUP.md +2 -2
  151. package/docs/developer/MIGRATION_GUIDE.md +5 -6
  152. package/docs/developer/README.md +2 -1
  153. package/docs/developer/REFACTORING.md +9 -15
  154. package/docs/developer/RELEASE_PROCESS.md +4 -3
  155. package/docs/developer/TESTING.md +2 -2
  156. package/docs/examples/claude-desktop-config.md +8 -0
  157. package/docs/integrations/claude-desktop.md +426 -0
  158. package/docs/integrations/cline.md +537 -0
  159. package/docs/integrations/vs-code.md +515 -0
  160. package/docs/releases/COMMUNITY_ANNOUNCEMENT_v1.1.2.md +30 -23
  161. package/docs/releases/RELEASE_NOTES_v1.1.2.md +7 -6
  162. package/docs/testing-configurations.md +11 -0
  163. package/docs/user-guides/DOCKER_NPM_DTX_SETUP.md +3 -2
  164. package/docs/user-guides/DOCKER_SETUP.md +3 -2
  165. package/docs/user-guides/DTX_SETUP.md +6 -5
  166. package/docs/user-guides/DXT_INSTALLATION.md +4 -4
  167. package/docs/user-guides/NPM_SETUP.md +4 -2
  168. package/docs/user-guides/NPX_SETUP.md +4 -2
  169. package/docs/user-guides/SMITHERY_SETUP.md +402 -0
  170. package/docs/wordpress-rest-api-authentication-troubleshooting.md +45 -42
  171. package/package.json +12 -2
  172. package/src/cache/CacheInvalidation.ts +7 -18
  173. package/src/client/MockWordPressClient.ts +398 -0
  174. package/src/client/api.ts +77 -237
  175. package/src/client/managers/AuthenticationManager.ts +19 -56
  176. package/src/config/ConfigurationSchema.ts +14 -45
  177. package/src/config/ServerConfiguration.ts +98 -71
  178. package/src/docs/DocumentationGenerator.ts +39 -123
  179. package/src/dxt-entry.cjs +4 -1
  180. package/src/index.ts +35 -54
  181. package/src/security/InputValidator.ts +15 -57
  182. package/src/server/ToolRegistry.ts +88 -17
  183. package/src/tools/auth.ts +15 -22
  184. package/src/tools/posts.ts +347 -64
  185. package/src/tools/site.ts +69 -46
  186. package/src/tools/users.ts +142 -44
  187. package/src/utils/enhancedError.ts +248 -0
  188. package/src/utils/streaming.ts +428 -0
  189. package/src/utils/validation.ts +253 -92
  190. package/dist/mcp-wordpress-1.5.2.tgz +0 -0
@@ -19,13 +19,11 @@ Updates one or more general settings for a WordPress site.
19
19
  Simple example of using wp_update_site_settings
20
20
 
21
21
  **Command:**
22
-
23
22
  ```bash
24
23
  wp_update_site_settings
25
24
  ```
26
25
 
27
26
  **Response:**
28
-
29
27
  ```json
30
28
  {
31
29
  "success": true,
@@ -38,7 +36,6 @@ wp_update_site_settings
38
36
  ```
39
37
 
40
38
  **Error Example (Authentication failure):**
41
-
42
39
  ```json
43
40
  {
44
41
  "error": "Authentication failed",
@@ -46,18 +43,17 @@ wp_update_site_settings
46
43
  }
47
44
  ```
48
45
 
46
+
49
47
  ### Advanced site Configuration
50
48
 
51
49
  Comprehensive example using all available parameters
52
50
 
53
51
  **Command:**
54
-
55
52
  ```bash
56
53
  wp_update_site_settings --title="Example Post Title" --description="example_value" --timezone="example_value"
57
54
  ```
58
55
 
59
56
  **Response:**
60
-
61
57
  ```json
62
58
  {
63
59
  "success": true,
@@ -69,6 +65,13 @@ wp_update_site_settings --title="Example Post Title" --description="example_valu
69
65
  }
70
66
  ```
71
67
 
68
+
69
+
70
+
71
+
72
+
73
+
74
+
72
75
  ## Response Format
73
76
 
74
77
  **Return Type:** `site`
@@ -95,24 +98,30 @@ wp_update_site_settings --title="Example Post Title" --description="example_valu
95
98
  **Description:** Invalid credentials or insufficient permissions
96
99
  **Resolution:** Check your authentication credentials and user permissions
97
100
 
101
+
98
102
  ### VALIDATION_ERROR
99
103
 
100
104
  **Message:** Parameter validation failed
101
105
  **Description:** One or more required parameters are missing or invalid
102
106
  **Resolution:** Review the required parameters and their formats
103
107
 
108
+
104
109
  ### NOT_FOUND
105
110
 
106
111
  **Message:** Resource not found
107
112
  **Description:** The requested resource does not exist
108
113
  **Resolution:** Verify the resource ID and ensure it exists
109
114
 
115
+
110
116
  ### PERMISSION_DENIED
111
117
 
112
118
  **Message:** Insufficient permissions
113
119
  **Description:** The user does not have permission to perform this action
114
120
  **Resolution:** Contact an administrator to grant the necessary permissions
115
121
 
122
+
123
+
124
+
116
125
  ---
117
126
 
118
127
  *Generated automatically from tool definitions - Do not edit manually*
@@ -18,13 +18,11 @@ Updates an existing tag.
18
18
  Simple example of using wp_update_tag
19
19
 
20
20
  **Command:**
21
-
22
21
  ```bash
23
22
  wp_update_tag --id="123"
24
23
  ```
25
24
 
26
25
  **Response:**
27
-
28
26
  ```json
29
27
  {
30
28
  "success": true,
@@ -37,7 +35,6 @@ wp_update_tag --id="123"
37
35
  ```
38
36
 
39
37
  **Error Example (Authentication failure):**
40
-
41
38
  ```json
42
39
  {
43
40
  "error": "Authentication failed",
@@ -45,6 +42,11 @@ wp_update_tag --id="123"
45
42
  }
46
43
  ```
47
44
 
45
+
46
+
47
+
48
+
49
+
48
50
  ## Response Format
49
51
 
50
52
  **Return Type:** `taxonomy`
@@ -71,24 +73,30 @@ wp_update_tag --id="123"
71
73
  **Description:** Invalid credentials or insufficient permissions
72
74
  **Resolution:** Check your authentication credentials and user permissions
73
75
 
76
+
74
77
  ### VALIDATION_ERROR
75
78
 
76
79
  **Message:** Parameter validation failed
77
80
  **Description:** One or more required parameters are missing or invalid
78
81
  **Resolution:** Review the required parameters and their formats
79
82
 
83
+
80
84
  ### NOT_FOUND
81
85
 
82
86
  **Message:** Resource not found
83
87
  **Description:** The requested resource does not exist
84
88
  **Resolution:** Verify the resource ID and ensure it exists
85
89
 
90
+
86
91
  ### PERMISSION_DENIED
87
92
 
88
93
  **Message:** Insufficient permissions
89
94
  **Description:** The user does not have permission to perform this action
90
95
  **Resolution:** Contact an administrator to grant the necessary permissions
91
96
 
97
+
98
+
99
+
92
100
  ---
93
101
 
94
102
  *Generated automatically from tool definitions - Do not edit manually*
@@ -19,13 +19,11 @@ Updates an existing user.
19
19
  Simple example of using wp_update_user
20
20
 
21
21
  **Command:**
22
-
23
22
  ```bash
24
23
  wp_update_user --id="123"
25
24
  ```
26
25
 
27
26
  **Response:**
28
-
29
27
  ```json
30
28
  {
31
29
  "success": true,
@@ -38,7 +36,6 @@ wp_update_user --id="123"
38
36
  ```
39
37
 
40
38
  **Error Example (Authentication failure):**
41
-
42
39
  ```json
43
40
  {
44
41
  "error": "Authentication failed",
@@ -46,18 +43,17 @@ wp_update_user --id="123"
46
43
  }
47
44
  ```
48
45
 
46
+
49
47
  ### Advanced user Configuration
50
48
 
51
49
  Comprehensive example using all available parameters
52
50
 
53
51
  **Command:**
54
-
55
52
  ```bash
56
53
  wp_update_user --id="123" --email="user@example.com" --name="example_value"
57
54
  ```
58
55
 
59
56
  **Response:**
60
-
61
57
  ```json
62
58
  {
63
59
  "success": true,
@@ -69,6 +65,11 @@ wp_update_user --id="123" --email="user@example.com" --name="example_value"
69
65
  }
70
66
  ```
71
67
 
68
+
69
+
70
+
71
+
72
+
72
73
  ## Required Permissions
73
74
 
74
75
  This tool requires the following WordPress user capabilities:
@@ -77,6 +78,7 @@ This tool requires the following WordPress user capabilities:
77
78
 
78
79
  **Note:** The authenticated user must have these capabilities to successfully execute this tool.
79
80
 
81
+
80
82
  ## Response Format
81
83
 
82
84
  **Return Type:** `user`
@@ -103,24 +105,30 @@ This tool requires the following WordPress user capabilities:
103
105
  **Description:** Invalid credentials or insufficient permissions
104
106
  **Resolution:** Check your authentication credentials and user permissions
105
107
 
108
+
106
109
  ### VALIDATION_ERROR
107
110
 
108
111
  **Message:** Parameter validation failed
109
112
  **Description:** One or more required parameters are missing or invalid
110
113
  **Resolution:** Review the required parameters and their formats
111
114
 
115
+
112
116
  ### NOT_FOUND
113
117
 
114
118
  **Message:** Resource not found
115
119
  **Description:** The requested resource does not exist
116
120
  **Resolution:** Verify the resource ID and ensure it exists
117
121
 
122
+
118
123
  ### PERMISSION_DENIED
119
124
 
120
125
  **Message:** Insufficient permissions
121
126
  **Description:** The user does not have permission to perform this action
122
127
  **Resolution:** Contact an administrator to grant the necessary permissions
123
128
 
129
+
130
+
131
+
124
132
  ---
125
133
 
126
134
  *Generated automatically from tool definitions - Do not edit manually*
@@ -22,13 +22,11 @@ Uploads a file to the WordPress media library.
22
22
  Simple example of using wp_upload_media
23
23
 
24
24
  **Command:**
25
-
26
25
  ```bash
27
26
  wp_upload_media --file_path="example_value"
28
27
  ```
29
28
 
30
29
  **Response:**
31
-
32
30
  ```json
33
31
  {
34
32
  "success": true,
@@ -38,7 +36,6 @@ wp_upload_media --file_path="example_value"
38
36
  ```
39
37
 
40
38
  **Error Example (Authentication failure):**
41
-
42
39
  ```json
43
40
  {
44
41
  "error": "Authentication failed",
@@ -46,18 +43,17 @@ wp_upload_media --file_path="example_value"
46
43
  }
47
44
  ```
48
45
 
46
+
49
47
  ### Advanced media Configuration
50
48
 
51
49
  Comprehensive example using all available parameters
52
50
 
53
51
  **Command:**
54
-
55
52
  ```bash
56
53
  wp_upload_media --file_path="example_value" --title="Example Post Title" --alt_text="example_value" --caption="example_value" --description="example_value" --post="example_value"
57
54
  ```
58
55
 
59
56
  **Response:**
60
-
61
57
  ```json
62
58
  {
63
59
  "success": true,
@@ -66,6 +62,11 @@ wp_upload_media --file_path="example_value" --title="Example Post Title" --alt_t
66
62
  }
67
63
  ```
68
64
 
65
+
66
+
67
+
68
+
69
+
69
70
  ## Required Permissions
70
71
 
71
72
  This tool requires the following WordPress user capabilities:
@@ -74,6 +75,7 @@ This tool requires the following WordPress user capabilities:
74
75
 
75
76
  **Note:** The authenticated user must have these capabilities to successfully execute this tool.
76
77
 
78
+
77
79
  ## Response Format
78
80
 
79
81
  **Return Type:** `object`
@@ -100,24 +102,30 @@ This tool requires the following WordPress user capabilities:
100
102
  **Description:** Invalid credentials or insufficient permissions
101
103
  **Resolution:** Check your authentication credentials and user permissions
102
104
 
105
+
103
106
  ### VALIDATION_ERROR
104
107
 
105
108
  **Message:** Parameter validation failed
106
109
  **Description:** One or more required parameters are missing or invalid
107
110
  **Resolution:** Review the required parameters and their formats
108
111
 
112
+
109
113
  ### NOT_FOUND
110
114
 
111
115
  **Message:** Resource not found
112
116
  **Description:** The requested resource does not exist
113
117
  **Resolution:** Verify the resource ID and ensure it exists
114
118
 
119
+
115
120
  ### PERMISSION_DENIED
116
121
 
117
122
  **Message:** Insufficient permissions
118
123
  **Description:** The user does not have permission to perform this action
119
124
  **Resolution:** Contact an administrator to grant the necessary permissions
120
125
 
126
+
127
+
128
+
121
129
  ---
122
130
 
123
131
  *Generated automatically from tool definitions - Do not edit manually*
@@ -35,3 +35,5 @@ WordPress blog post object
35
35
  "slug": "welcome-to-wordpress"
36
36
  }
37
37
  ```
38
+
39
+
@@ -0,0 +1,40 @@
1
+ # Code Improvements TODO
2
+
3
+ ## Test Coverage Improvements Needed
4
+
5
+ Based on coverage analysis, the following areas need attention:
6
+
7
+ ### Critical Areas (0% coverage)
8
+
9
+ 1. **Tool Implementations** (`src/tools/`):
10
+ - site.ts (0% coverage)
11
+ - taxonomies.ts (0% coverage)
12
+ - users.ts (0% coverage)
13
+ - media.ts (0.78% coverage)
14
+ - posts.ts (0.58% coverage)
15
+
16
+ 2. **Utility Functions** (`src/utils/`):
17
+ - enhancedError.ts (0% coverage)
18
+ - error.ts (0% coverage)
19
+ - streaming.ts (0% coverage)
20
+ - toolWrapper.ts (3.12% coverage)
21
+ - validation.ts (2.56% coverage)
22
+
23
+ ### Recommendations
24
+
25
+ 1. Add unit tests for all tool implementations
26
+ 2. Create test cases for error handling utilities
27
+ 3. Test streaming functionality with mock data
28
+ 4. Improve validation test coverage
29
+
30
+ ## Performance Optimizations
31
+
32
+ 1. Consider lazy loading for tool implementations
33
+ 2. Implement connection pooling for multi-site setups
34
+ 3. Add request batching for bulk operations
35
+
36
+ ## Documentation Improvements
37
+
38
+ 1. Add API documentation for each tool
39
+ 2. Create troubleshooting guide
40
+ 3. Add performance tuning guide
@@ -115,7 +115,7 @@ The contract tests verify:
115
115
  - Retrieve posts with pagination
116
116
  - Response format validation
117
117
 
118
- ### ✅ Media API
118
+ ### ✅ Media API
119
119
 
120
120
  - File upload handling
121
121
  - Multipart form data
@@ -55,18 +55,9 @@ Handles multiple WordPress authentication methods.
55
55
  ```typescript
56
56
  class AuthenticationManager {
57
57
  // Authentication methods
58
- async authenticateWithAppPassword(
59
- username: string,
60
- password: string,
61
- ): Promise<AuthResult>;
62
- async authenticateWithJWT(
63
- username: string,
64
- password: string,
65
- ): Promise<AuthResult>;
66
- async authenticateWithBasic(
67
- username: string,
68
- password: string,
69
- ): Promise<AuthResult>;
58
+ async authenticateWithAppPassword(username: string, password: string): Promise<AuthResult>;
59
+ async authenticateWithJWT(username: string, password: string): Promise<AuthResult>;
60
+ async authenticateWithBasic(username: string, password: string): Promise<AuthResult>;
70
61
  async authenticateWithApiKey(apiKey: string): Promise<AuthResult>;
71
62
 
72
63
  // Token management
@@ -119,9 +110,7 @@ class PostTools {
119
110
  async deletePost(params: DeletePostParams): Promise<DeleteResult>;
120
111
  async getPost(params: GetPostParams): Promise<PostResult>;
121
112
  async listPosts(params: ListPostsParams): Promise<PostListResult>;
122
- async getPostRevisions(
123
- params: GetPostRevisionsParams,
124
- ): Promise<PostRevisionsResult>;
113
+ async getPostRevisions(params: GetPostRevisionsParams): Promise<PostRevisionsResult>;
125
114
  }
126
115
  ```
127
116
 
@@ -168,9 +157,7 @@ class PageTools {
168
157
  async deletePage(params: DeletePageParams): Promise<DeleteResult>;
169
158
  async getPage(params: GetPageParams): Promise<PageResult>;
170
159
  async listPages(params: ListPagesParams): Promise<PageListResult>;
171
- async getPageRevisions(
172
- params: GetPageRevisionsParams,
173
- ): Promise<PageRevisionsResult>;
160
+ async getPageRevisions(params: GetPageRevisionsParams): Promise<PageRevisionsResult>;
174
161
  }
175
162
  ```
176
163
 
@@ -224,9 +211,7 @@ class CommentTools {
224
211
  async getComment(params: GetCommentParams): Promise<CommentResult>;
225
212
  async listComments(params: ListCommentsParams): Promise<CommentListResult>;
226
213
  async moderateComment(params: ModerateCommentParams): Promise<CommentResult>;
227
- async bulkModerateComments(
228
- params: BulkModerateCommentsParams,
229
- ): Promise<BulkResult>;
214
+ async bulkModerateComments(params: BulkModerateCommentsParams): Promise<BulkResult>;
230
215
  }
231
216
  ```
232
217
 
@@ -239,9 +224,7 @@ class TaxonomyTools {
239
224
  async updateCategory(params: UpdateCategoryParams): Promise<CategoryResult>;
240
225
  async deleteCategory(params: DeleteCategoryParams): Promise<DeleteResult>;
241
226
  async getCategory(params: GetCategoryParams): Promise<CategoryResult>;
242
- async listCategories(
243
- params: ListCategoriesParams,
244
- ): Promise<CategoryListResult>;
227
+ async listCategories(params: ListCategoriesParams): Promise<CategoryListResult>;
245
228
 
246
229
  // Tags
247
230
  async createTag(params: CreateTagParams): Promise<TagResult>;
@@ -257,9 +240,7 @@ class TaxonomyTools {
257
240
  ```typescript
258
241
  class SiteTools {
259
242
  async getSiteInfo(params: GetSiteInfoParams): Promise<SiteInfoResult>;
260
- async updateSiteSettings(
261
- params: UpdateSiteSettingsParams,
262
- ): Promise<SiteSettingsResult>;
243
+ async updateSiteSettings(params: UpdateSiteSettingsParams): Promise<SiteSettingsResult>;
263
244
  async getSiteStats(params: GetSiteStatsParams): Promise<SiteStatsResult>;
264
245
  async getPlugins(params: GetPluginsParams): Promise<PluginsResult>;
265
246
  async getThemes(params: GetThemesParams): Promise<ThemesResult>;
@@ -273,9 +254,7 @@ class SiteTools {
273
254
  class AuthTools {
274
255
  async testAuth(params: TestAuthParams): Promise<AuthTestResult>;
275
256
  async refreshToken(params: RefreshTokenParams): Promise<TokenResult>;
276
- async validatePermissions(
277
- params: ValidatePermissionsParams,
278
- ): Promise<PermissionsResult>;
257
+ async validatePermissions(params: ValidatePermissionsParams): Promise<PermissionsResult>;
279
258
  }
280
259
  ```
281
260
 
@@ -286,9 +265,7 @@ class CacheTools {
286
265
  async getCacheStats(params: GetCacheStatsParams): Promise<CacheStatsResult>;
287
266
  async clearCache(params: ClearCacheParams): Promise<ClearCacheResult>;
288
267
  async warmCache(params: WarmCacheParams): Promise<WarmCacheResult>;
289
- async setCacheConfig(
290
- params: SetCacheConfigParams,
291
- ): Promise<CacheConfigResult>;
268
+ async setCacheConfig(params: SetCacheConfigParams): Promise<CacheConfigResult>;
292
269
  }
293
270
  ```
294
271
 
@@ -296,24 +273,12 @@ class CacheTools {
296
273
 
297
274
  ```typescript
298
275
  class PerformanceTools {
299
- async getPerformanceMetrics(
300
- params: GetPerformanceMetricsParams,
301
- ): Promise<PerformanceMetricsResult>;
302
- async runPerformanceTest(
303
- params: RunPerformanceTestParams,
304
- ): Promise<PerformanceTestResult>;
305
- async getSystemHealth(
306
- params: GetSystemHealthParams,
307
- ): Promise<SystemHealthResult>;
308
- async benchmarkOperations(
309
- params: BenchmarkOperationsParams,
310
- ): Promise<BenchmarkResult>;
311
- async getOptimizationSuggestions(
312
- params: GetOptimizationSuggestionsParams,
313
- ): Promise<OptimizationResult>;
314
- async monitorRealTimeMetrics(
315
- params: MonitorRealTimeMetricsParams,
316
- ): Promise<RealTimeMetricsResult>;
276
+ async getPerformanceMetrics(params: GetPerformanceMetricsParams): Promise<PerformanceMetricsResult>;
277
+ async runPerformanceTest(params: RunPerformanceTestParams): Promise<PerformanceTestResult>;
278
+ async getSystemHealth(params: GetSystemHealthParams): Promise<SystemHealthResult>;
279
+ async benchmarkOperations(params: BenchmarkOperationsParams): Promise<BenchmarkResult>;
280
+ async getOptimizationSuggestions(params: GetOptimizationSuggestionsParams): Promise<OptimizationResult>;
281
+ async monitorRealTimeMetrics(params: MonitorRealTimeMetricsParams): Promise<RealTimeMetricsResult>;
317
282
  }
318
283
  ```
319
284
 
@@ -573,12 +538,7 @@ class DebugLogger {
573
538
  static log(level: LogLevel, message: string, context?: any): void;
574
539
  static error(error: Error, context?: any): void;
575
540
  static performance(operation: string, duration: number): void;
576
- static http(
577
- method: string,
578
- url: string,
579
- status: number,
580
- duration: number,
581
- ): void;
541
+ static http(method: string, url: string, status: number, duration: number): void;
582
542
  }
583
543
  ```
584
544
 
@@ -664,5 +624,5 @@ const server = new MCPWordPressServer({
664
624
 
665
625
  ---
666
626
 
667
- **Need more details?** This API reference covers the complete technical interface. For implementation
668
- examples, see the source code in `src/` directory.
627
+ **Need more details?** This API reference covers the complete technical interface. For implementation examples, see the
628
+ source code in `src/` directory.
@@ -4,7 +4,8 @@ This guide explains the system architecture and design patterns used in the MCP
4
4
 
5
5
  ## 🏗️ Overall Architecture
6
6
 
7
- The MCP WordPress Server follows a modular, layered architecture designed for scalability, maintainability, and extensibility.
7
+ The MCP WordPress Server follows a modular, layered architecture designed for scalability, maintainability, and
8
+ extensibility.
8
9
 
9
10
  ```text
10
11
  ┌─────────────────────────────────────────────────────────────┐
@@ -309,10 +310,8 @@ Commit → CI/CD Pipeline → Tests → Security Scan → Publishing
309
310
 
310
311
  ### Request Optimization
311
312
 
312
- **Batching**: Group related requests
313
- **Deduplication**: Eliminate duplicate requests
314
- **Connection Pooling**: Reuse HTTP connections
315
- **Compression**: Reduce payload size
313
+ **Batching**: Group related requests **Deduplication**: Eliminate duplicate requests **Connection Pooling**: Reuse HTTP
314
+ connections **Compression**: Reduce payload size
316
315
 
317
316
  ## 🔮 Extensibility
318
317
 
@@ -356,10 +355,8 @@ Commit → CI/CD Pipeline → Tests → Security Scan → Publishing
356
355
 
357
356
  ### Logging Strategy
358
357
 
359
- **Structured Logging**: JSON format for parsing
360
- **Log Levels**: DEBUG, INFO, WARN, ERROR
361
- **Contextual Information**: Request IDs, user context
362
- **Security Logging**: Authentication events, suspicious activity
358
+ **Structured Logging**: JSON format for parsing **Log Levels**: DEBUG, INFO, WARN, ERROR **Contextual Information**:
359
+ Request IDs, user context **Security Logging**: Authentication events, suspicious activity
363
360
 
364
361
  ## 📚 Further Reading
365
362
 
@@ -370,5 +367,5 @@ Commit → CI/CD Pipeline → Tests → Security Scan → Publishing
370
367
 
371
368
  ---
372
369
 
373
- **Understanding the architecture?** This foundation enables the system's reliability, performance,
374
- and extensibility. Each component is designed to be testable, maintainable, and scalable.
370
+ **Understanding the architecture?** This foundation enables the system's reliability, performance, and extensibility.
371
+ Each component is designed to be testable, maintainable, and scalable.
@@ -456,5 +456,5 @@ npm install -g webpack-bundle-analyzer
456
456
 
457
457
  ---
458
458
 
459
- **Optimizing your build?** This build system is designed for both development speed and
460
- production efficiency. Each configuration option is tuned for optimal performance.
459
+ **Optimizing your build?** This build system is designed for both development speed and production efficiency. Each
460
+ configuration option is tuned for optimal performance.
@@ -215,9 +215,7 @@ describe("PostTools", () => {
215
215
  test("should handle API errors gracefully", async () => {
216
216
  mockClient.posts.create.mockRejectedValue(new Error("API Error"));
217
217
 
218
- await expect(postTools.createPost(validParams)).rejects.toThrow(
219
- "API Error",
220
- );
218
+ await expect(postTools.createPost(validParams)).rejects.toThrow("API Error");
221
219
  });
222
220
  });
223
221
  });
@@ -465,5 +463,5 @@ Please read it to understand the expected behavior in our community.
465
463
 
466
464
  ---
467
465
 
468
- **Ready to contribute?** Thank you for your interest in improving the MCP WordPress Server! Every
469
- contribution, no matter how small, helps make this project better for everyone. 🚀
466
+ **Ready to contribute?** Thank you for your interest in improving the MCP WordPress Server! Every contribution, no
467
+ matter how small, helps make this project better for everyone. 🚀
@@ -2,8 +2,8 @@
2
2
 
3
3
  ## Overview
4
4
 
5
- The MCP WordPress project includes comprehensive GitHub Actions workflows for automated testing, quality
6
- assurance, and NPM publishing.
5
+ The MCP WordPress project includes comprehensive GitHub Actions workflows for automated testing, quality assurance, and
6
+ NPM publishing.
7
7
 
8
8
  ## Workflows
9
9
 
@@ -1,7 +1,7 @@
1
1
  # Migration Guide: Single-Site to Multi-Site Configuration
2
2
 
3
- This guide helps you migrate from the previous single-site configuration to the new multi-site
4
- configuration introduced in v2.0.0.
3
+ This guide helps you migrate from the previous single-site configuration to the new multi-site configuration introduced
4
+ in v2.0.0.
5
5
 
6
6
  ## Breaking Changes
7
7
 
@@ -15,8 +15,7 @@ WORDPRESS_USERNAME=admin
15
15
  WORDPRESS_APP_PASSWORD=xxxx xxxx xxxx xxxx xxxx xxxx
16
16
  ```
17
17
 
18
- **New Method (Configuration File):**
19
- Create a `mcp-wordpress.config.json` file:
18
+ **New Method (Configuration File):** Create a `mcp-wordpress.config.json` file:
20
19
 
21
20
  ```json
22
21
  {
@@ -162,8 +161,8 @@ wp_create_post --site="site2" --title="New Blog Post"
162
161
 
163
162
  ## Backward Compatibility
164
163
 
165
- The server maintains backward compatibility with environment variables. If no `mcp-wordpress.config.json`
166
- file is found, it will fall back to using environment variables as before.
164
+ The server maintains backward compatibility with environment variables. If no `mcp-wordpress.config.json` file is found,
165
+ it will fall back to using environment variables as before.
167
166
 
168
167
  ## Troubleshooting
169
168
 
@@ -239,4 +239,5 @@ npm run status # Check connection status
239
239
 
240
240
  ---
241
241
 
242
- **Ready to contribute?** Start with the [Development Setup](DEVELOPMENT_SETUP.md) guide and join our community of contributors!
242
+ **Ready to contribute?** Start with the [Development Setup](DEVELOPMENT_SETUP.md) guide and join our community of
243
+ contributors!