mcp-wordpress 1.2.3 → 1.3.1

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 (262) hide show
  1. package/README.md +113 -181
  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.1.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 +11 -5
  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/categories/auth.md +2 -0
  163. package/docs/api/categories/cache.md +2 -0
  164. package/docs/api/categories/comment.md +2 -0
  165. package/docs/api/categories/media.md +2 -0
  166. package/docs/api/categories/page.md +2 -0
  167. package/docs/api/categories/performance.md +2 -0
  168. package/docs/api/categories/post.md +2 -0
  169. package/docs/api/categories/taxonomy.md +2 -0
  170. package/docs/api/categories/user.md +2 -0
  171. package/docs/api/summary.json +1 -1
  172. package/docs/api/tools/wp_approve_comment.md +3 -5
  173. package/docs/contract-testing.md +24 -3
  174. package/docs/developer/GITHUB_ACTIONS_SETUP.md +8 -2
  175. package/docs/developer/MAINTENANCE.md +27 -1
  176. package/docs/developer/MIGRATION_GUIDE.md +13 -1
  177. package/docs/developer/NPM_AUTH_SETUP.md +13 -2
  178. package/docs/developer/REFACTORING.md +31 -1
  179. package/docs/releases/COMMUNITY_ANNOUNCEMENT_v1.1.2.md +18 -7
  180. package/docs/releases/RELEASE_NOTES_v1.1.2.md +31 -5
  181. package/docs/user-guides/DOCKER_NPM_DTX_SETUP.md +217 -0
  182. package/docs/user-guides/DOCKER_SETUP.md +264 -0
  183. package/docs/user-guides/DTX_SETUP.md +327 -0
  184. package/docs/user-guides/NPM_SETUP.md +109 -0
  185. package/docs/user-guides/NPX_SETUP.md +281 -0
  186. package/docs/wordpress-rest-api-authentication-troubleshooting.md +13 -2
  187. package/package.json +20 -6
  188. package/src/cache/CacheInvalidation.ts +140 -132
  189. package/src/cache/CacheManager.ts +40 -29
  190. package/src/cache/HttpCacheWrapper.ts +105 -68
  191. package/src/cache/__tests__/CacheInvalidation.test.ts +123 -118
  192. package/src/cache/__tests__/CacheManager.test.ts +156 -152
  193. package/src/cache/__tests__/CachedWordPressClient.test.ts +131 -116
  194. package/src/cache/__tests__/HttpCacheWrapper.test.ts +118 -115
  195. package/src/cache/index.ts +13 -13
  196. package/src/client/CachedWordPressClient.ts +90 -80
  197. package/src/client/api.ts +205 -205
  198. package/src/client/auth.ts +80 -80
  199. package/src/client/managers/AuthenticationManager.ts +61 -61
  200. package/src/client/managers/BaseManager.ts +11 -11
  201. package/src/client/managers/RequestManager.ts +79 -47
  202. package/src/client/managers/index.ts +3 -3
  203. package/src/config/ConfigurationSchema.ts +44 -44
  204. package/src/config/ServerConfiguration.ts +39 -39
  205. package/src/docs/DocumentationGenerator.ts +402 -295
  206. package/src/docs/MarkdownFormatter.ts +94 -69
  207. package/src/docs/index.ts +4 -4
  208. package/src/index.ts +24 -21
  209. package/src/performance/MetricsCollector.ts +90 -58
  210. package/src/performance/PerformanceAnalytics.ts +386 -262
  211. package/src/performance/PerformanceMonitor.ts +152 -118
  212. package/src/performance/index.ts +9 -9
  213. package/src/security/InputValidator.ts +148 -91
  214. package/src/security/SecurityConfig.ts +94 -94
  215. package/src/server/ConnectionTester.ts +21 -15
  216. package/src/server/ToolRegistry.ts +64 -51
  217. package/src/server.ts +2 -2
  218. package/src/tools/BaseToolManager.ts +6 -6
  219. package/src/tools/auth.ts +42 -37
  220. package/src/tools/cache.ts +85 -81
  221. package/src/tools/comments.ts +93 -91
  222. package/src/tools/index.ts +10 -10
  223. package/src/tools/media.ts +89 -89
  224. package/src/tools/pages.ts +89 -87
  225. package/src/tools/performance.ts +443 -352
  226. package/src/tools/posts.ts +109 -107
  227. package/src/tools/site.ts +86 -77
  228. package/src/tools/taxonomies.ts +102 -102
  229. package/src/tools/users.ts +77 -77
  230. package/src/types/client.ts +157 -60
  231. package/src/types/index.ts +49 -27
  232. package/src/types/mcp.ts +15 -15
  233. package/src/types/wordpress.ts +57 -29
  234. package/src/utils/debug.ts +37 -37
  235. package/src/utils/error.ts +47 -25
  236. package/src/utils/toolWrapper.ts +12 -8
  237. package/src/utils/validation.ts +116 -65
  238. package/dist/client/WordPressClient.d.ts +0 -81
  239. package/dist/client/WordPressClient.d.ts.map +0 -1
  240. package/dist/client/WordPressClient.js +0 -354
  241. package/dist/client/WordPressClient.js.map +0 -1
  242. package/dist/performance/AnomalyDetector.d.ts +0 -63
  243. package/dist/performance/AnomalyDetector.d.ts.map +0 -1
  244. package/dist/performance/AnomalyDetector.js +0 -222
  245. package/dist/performance/AnomalyDetector.js.map +0 -1
  246. package/dist/performance/BenchmarkAnalyzer.d.ts +0 -67
  247. package/dist/performance/BenchmarkAnalyzer.d.ts.map +0 -1
  248. package/dist/performance/BenchmarkAnalyzer.js +0 -301
  249. package/dist/performance/BenchmarkAnalyzer.js.map +0 -1
  250. package/dist/performance/TrendAnalyzer.d.ts +0 -69
  251. package/dist/performance/TrendAnalyzer.d.ts.map +0 -1
  252. package/dist/performance/TrendAnalyzer.js +0 -203
  253. package/dist/performance/TrendAnalyzer.js.map +0 -1
  254. package/dist/tools/BaseToolClass.d.ts +0 -76
  255. package/dist/tools/BaseToolClass.d.ts.map +0 -1
  256. package/dist/tools/BaseToolClass.js +0 -104
  257. package/dist/tools/BaseToolClass.js.map +0 -1
  258. package/dist/tools/base.d.ts +0 -37
  259. package/dist/tools/base.d.ts.map +0 -1
  260. package/dist/tools/base.js +0 -60
  261. package/dist/tools/base.js.map +0 -1
  262. package/docs/user-guides/CLAUDE_DESKTOP_SETUP.md +0 -187
@@ -0,0 +1,264 @@
1
+ # Docker Setup Guide
2
+
3
+ This guide provides step-by-step instructions for setting up the MCP WordPress server using Docker, specifically for Claude Desktop integration.
4
+
5
+ ---
6
+
7
+ ## 🚀 Quick Start
8
+
9
+ ### 1. Pull the Docker Image
10
+
11
+ ```bash
12
+ docker pull docdyhr/mcp-wordpress:latest
13
+ ```
14
+
15
+ ### 2. Add to Claude Desktop configuration
16
+
17
+ ## 🎯 Claude Desktop Integration (Recommended)
18
+
19
+ ### Single-Site Setup
20
+
21
+ Add this to your Claude Desktop configuration file (`~/Library/Application Support/Claude/claude_desktop_config.json`):
22
+
23
+ ```json
24
+ {
25
+ "mcpServers": {
26
+ "mcp-wordpress": {
27
+ "command": "docker",
28
+ "args": [
29
+ "run",
30
+ "--rm",
31
+ "-i",
32
+ "-e",
33
+ "WORDPRESS_SITE_URL=https://your-site.com",
34
+ "-e",
35
+ "WORDPRESS_USERNAME=your_username",
36
+ "-e",
37
+ "WORDPRESS_APP_PASSWORD=xxxx xxxx xxxx xxxx xxxx xxxx",
38
+ "docdyhr/mcp-wordpress:latest"
39
+ ]
40
+ }
41
+ }
42
+ }
43
+ ```
44
+
45
+ ### Multi-Site Setup (Recommended)
46
+
47
+ 1. **Create `mcp-wordpress.config.json`**:
48
+
49
+ ```json
50
+ {
51
+ "sites": [
52
+ {
53
+ "id": "site1",
54
+ "name": "Main Site",
55
+ "config": {
56
+ "WORDPRESS_SITE_URL": "https://site1.com",
57
+ "WORDPRESS_USERNAME": "admin",
58
+ "WORDPRESS_APP_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx"
59
+ }
60
+ },
61
+ {
62
+ "id": "site2",
63
+ "name": "Blog Site",
64
+ "config": {
65
+ "WORDPRESS_SITE_URL": "https://blog.site2.com",
66
+ "WORDPRESS_USERNAME": "editor",
67
+ "WORDPRESS_APP_PASSWORD": "yyyy yyyy yyyy yyyy yyyy yyyy"
68
+ }
69
+ }
70
+ ]
71
+ }
72
+ ```
73
+
74
+ 2. **Add to Claude Desktop configuration**:
75
+
76
+ ```json
77
+ {
78
+ "mcpServers": {
79
+ "mcp-wordpress": {
80
+ "command": "docker",
81
+ "args": [
82
+ "run",
83
+ "--rm",
84
+ "-i",
85
+ "-v",
86
+ "/absolute/path/to/mcp-wordpress.config.json:/app/mcp-wordpress.config.json:ro",
87
+ "docdyhr/mcp-wordpress:latest"
88
+ ]
89
+ }
90
+ }
91
+ }
92
+ ```
93
+
94
+ ## 🔧 Standalone Docker Usage
95
+
96
+ ### Single-Site Mode
97
+
98
+ ```bash
99
+ # Interactive mode (recommended for testing)
100
+ docker run --rm -i \
101
+ -e WORDPRESS_SITE_URL=https://your-site.com \
102
+ -e WORDPRESS_USERNAME=your_username \
103
+ -e WORDPRESS_APP_PASSWORD="xxxx xxxx xxxx xxxx xxxx xxxx" \
104
+ docdyhr/mcp-wordpress:latest
105
+
106
+ # Background mode (for debugging/logs)
107
+ docker run -d --name mcp-wordpress-debug \
108
+ -e WORDPRESS_SITE_URL=https://your-site.com \
109
+ -e WORDPRESS_USERNAME=your_username \
110
+ -e WORDPRESS_APP_PASSWORD="xxxx xxxx xxxx xxxx xxxx xxxx" \
111
+ docdyhr/mcp-wordpress:latest
112
+ ```
113
+
114
+ ### Multi-Site Mode
115
+
116
+ ```bash
117
+ # Interactive mode
118
+ docker run --rm -i \
119
+ -v ./mcp-wordpress.config.json:/app/mcp-wordpress.config.json:ro \
120
+ docdyhr/mcp-wordpress:latest
121
+
122
+ # Background mode (for debugging/logs)
123
+ docker run -d --name mcp-wordpress-multisite \
124
+ -v ./mcp-wordpress.config.json:/app/mcp-wordpress.config.json:ro \
125
+ docdyhr/mcp-wordpress:latest
126
+ ```
127
+
128
+ ## 🐳 Docker Compose Setup
129
+
130
+ Create `docker-compose.yml`:
131
+
132
+ ```yaml
133
+ version: '3.8'
134
+
135
+ services:
136
+ mcp-wordpress:
137
+ image: docdyhr/mcp-wordpress:latest
138
+ container_name: mcp-wordpress
139
+ restart: unless-stopped
140
+ volumes:
141
+ # Mount configuration file (choose one approach)
142
+ - ./mcp-wordpress.config.json:/app/mcp-wordpress.config.json:ro
143
+ # OR mount .env file for single-site
144
+ - ./.env:/app/.env:ro
145
+ environment:
146
+ - NODE_ENV=production
147
+ # Note: No ports exposed - MCP uses stdin/stdout
148
+ ```
149
+
150
+ **Start with Docker Compose:**
151
+
152
+ ```bash
153
+ docker-compose up -d
154
+ ```
155
+
156
+ ## 🛠️ Development & Debugging
157
+
158
+ ### View Logs
159
+
160
+ ```bash
161
+ # For named containers
162
+ docker logs mcp-wordpress-debug
163
+ docker logs -f mcp-wordpress-multisite # Follow logs
164
+
165
+ # For Docker Compose
166
+ docker-compose logs -f mcp-wordpress
167
+ ```
168
+
169
+ ### Container Management
170
+
171
+ ```bash
172
+ # List running containers
173
+ docker ps
174
+
175
+ # Stop containers
176
+ docker stop mcp-wordpress-debug
177
+ docker-compose down
178
+
179
+ # Remove containers
180
+ docker rm mcp-wordpress-debug
181
+ ```
182
+
183
+ ### Test Configuration
184
+
185
+ ```bash
186
+ # Test single-site setup
187
+ echo '{"jsonrpc": "2.0", "method": "tools/list", "id": 1}' | \
188
+ docker run --rm -i \
189
+ -e WORDPRESS_SITE_URL=https://your-site.com \
190
+ -e WORDPRESS_USERNAME=your_username \
191
+ -e WORDPRESS_APP_PASSWORD="xxxx xxxx xxxx xxxx xxxx xxxx" \
192
+ docdyhr/mcp-wordpress:latest
193
+
194
+ # Test multi-site setup
195
+ echo '{"jsonrpc": "2.0", "method": "tools/list", "id": 1}' | \
196
+ docker run --rm -i \
197
+ -v ./mcp-wordpress.config.json:/app/mcp-wordpress.config.json:ro \
198
+ docdyhr/mcp-wordpress:latest
199
+ ```
200
+
201
+ ## 🔍 Troubleshooting
202
+
203
+ ### Common Issues
204
+
205
+ **1. MCP Integration Not Working**
206
+
207
+ - ❌ **Problem**: Using `-d` flag in Claude Desktop config
208
+ - ✅ **Solution**: Remove `-d` flag, use `--rm -i` instead
209
+
210
+ **2. Configuration File Not Found**
211
+
212
+ - ❌ **Problem**: Wrong mount path `/app/config/mcp-wordpress.config.json`
213
+ - ✅ **Solution**: Use correct path `/app/mcp-wordpress.config.json`
214
+
215
+ **3. Permission Denied**
216
+
217
+ - ❌ **Problem**: Config file not readable by container
218
+ - ✅ **Solution**: Use absolute paths and check file permissions
219
+
220
+ **4. App Password with Spaces**
221
+
222
+ - ❌ **Problem**: Spaces in password breaking Docker args
223
+ - ✅ **Solution**: Quote the password in command line, or use config file
224
+
225
+ ### Validation Commands
226
+
227
+ ```bash
228
+ # Verify image exists
229
+ docker images | grep mcp-wordpress
230
+
231
+ # Check container health
232
+ docker run --rm docdyhr/mcp-wordpress:latest --health-check
233
+
234
+ # Validate config file
235
+ docker run --rm -i \
236
+ -v ./mcp-wordpress.config.json:/app/mcp-wordpress.config.json:ro \
237
+ docdyhr/mcp-wordpress:latest --validate-config
238
+ ```
239
+
240
+ ## 🚨 Important Notes
241
+
242
+ ### ✅ Do's
243
+
244
+ - ✅ Use `--rm -i` for Claude Desktop integration
245
+ - ✅ Mount config file to `/app/mcp-wordpress.config.json`
246
+ - ✅ Use absolute paths for volume mounts
247
+ - ✅ Quote passwords with spaces in command line
248
+
249
+ ### ❌ Don'ts
250
+
251
+ - ❌ **Never use `-d` flag with Claude Desktop** (breaks MCP communication)
252
+ - ❌ **Don't expose ports** like `-p 3000:3000` (unnecessary for MCP)
253
+ - ❌ **Don't use named containers** with `--name` for MCP (can cause conflicts)
254
+ - ❌ **Don't mount to `/app/config/`** (wrong path)
255
+
256
+ ## 🔄 After Setup
257
+
258
+ 1. **Restart Claude Desktop** to load the new configuration
259
+ 2. **Test the integration** with commands like:
260
+ - "List my WordPress posts"
261
+ - "Show my site statistics"
262
+ - "What WordPress sites do I have configured?"
263
+
264
+ The Docker container will start automatically when Claude Desktop needs to use WordPress tools.
@@ -0,0 +1,327 @@
1
+ # DTX (Desktop Extension) Setup Guide
2
+
3
+ This guide provides step-by-step instructions for setting up the MCP WordPress server using the DTX (Desktop Extension) package format for Claude Desktop.
4
+
5
+ ---
6
+
7
+ ## 🖼️ What is DTX?
8
+
9
+ DTX (Desktop Extension) is a package format for Claude Desktop that provides:
10
+
11
+ - **One-Click Installation** - Install directly through Claude Desktop
12
+ - **Secure Configuration** - Credentials stored in OS keychain
13
+ - **Built-in Documentation** - Tool descriptions and usage examples
14
+ - **User-Friendly Setup** - No command line required
15
+ - **Automatic Updates** - Easy version management
16
+
17
+ ## 🚀 Quick DTX Installation
18
+
19
+ ### Method 1: Install from Built Package
20
+
21
+ 1. **Download the DTX Package**
22
+
23
+ ```bash
24
+ # Download the latest release
25
+ curl -L https://github.com/docdyhr/mcp-wordpress/releases/latest/download/mcp-wordpress.dxt -o mcp-wordpress.dxt
26
+ ```
27
+
28
+ 2. **Install in Claude Desktop**
29
+ - Open Claude Desktop
30
+ - Go to **Extensions** menu
31
+ - Click **Install Extension**
32
+ - Select the `mcp-wordpress.dxt` file
33
+ - Follow the configuration prompts
34
+
35
+ ### Method 2: Build DTX Package Yourself
36
+
37
+ 1. **Clone and Build**
38
+
39
+ ```bash
40
+ git clone https://github.com/docdyhr/mcp-wordpress.git
41
+ cd mcp-wordpress
42
+ npm install
43
+ npm run build
44
+ npm run dxt:package
45
+ ```
46
+
47
+ 2. **Install the Generated Package**
48
+ - The package will be created as `mcp-wordpress.dxt`
49
+ - Install through Claude Desktop Extensions menu
50
+
51
+ ## ⚙️ DTX Configuration
52
+
53
+ After installation, Claude Desktop will prompt you to configure:
54
+
55
+ ### Single-Site Configuration (Default)
56
+
57
+ The DTX GUI interface supports single-site configuration:
58
+
59
+ 1. **WordPress Site URL**
60
+ - Enter your full WordPress site URL
61
+ - Example: `https://yoursite.com`
62
+
63
+ 2. **WordPress Username**
64
+ - Your WordPress admin username
65
+ - Must have appropriate permissions
66
+
67
+ 3. **WordPress Application Password**
68
+ - Generate in WordPress: Admin → Users → Profile → Application Passwords
69
+ - Format: `xxxx xxxx xxxx xxxx xxxx xxxx`
70
+
71
+ 4. **Authentication Method** (Optional)
72
+ - **Application Password** (Recommended)
73
+ - JWT Authentication
74
+ - Basic Authentication
75
+ - API Key Authentication
76
+
77
+ 5. **Debug Mode** (Optional)
78
+ - Enable for troubleshooting
79
+ - Provides verbose logging
80
+
81
+ ### Multi-Site Configuration (Manual Setup)
82
+
83
+ The DTX package supports multi-site configuration, but requires manual setup:
84
+
85
+ #### Method 1: Using mcp-wordpress.config.json (Recommended)
86
+
87
+ 1. **After DTX installation**, create a `mcp-wordpress.config.json` file in your home directory:
88
+
89
+ ```json
90
+ {
91
+ "sites": [
92
+ {
93
+ "id": "site1",
94
+ "name": "Main Site",
95
+ "config": {
96
+ "WORDPRESS_SITE_URL": "https://site1.com",
97
+ "WORDPRESS_USERNAME": "admin",
98
+ "WORDPRESS_APP_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx"
99
+ }
100
+ },
101
+ {
102
+ "id": "site2",
103
+ "name": "Blog Site",
104
+ "config": {
105
+ "WORDPRESS_SITE_URL": "https://blog.site2.com",
106
+ "WORDPRESS_USERNAME": "editor",
107
+ "WORDPRESS_APP_PASSWORD": "yyyy yyyy yyyy yyyy yyyy yyyy"
108
+ }
109
+ }
110
+ ]
111
+ }
112
+ ```
113
+
114
+ 2. **Place the file in one of these locations:**
115
+ - **macOS/Linux**: `~/mcp-wordpress.config.json`
116
+ - **Windows**: `%USERPROFILE%\mcp-wordpress.config.json`
117
+ - **DTX Install Directory**: Next to the DTX package files
118
+
119
+ 3. **Skip the DTX configuration prompts (or enter dummy values)**
120
+
121
+ 4. **Restart Claude Desktop** - the server will detect and use your config file
122
+
123
+ #### Method 2: Environment Variable Override
124
+
125
+ Set the `MCP_WORDPRESS_CONFIG_PATH` environment variable to point to your config file:
126
+
127
+ ```bash
128
+ # macOS/Linux
129
+ export MCP_WORDPRESS_CONFIG_PATH=/path/to/mcp-wordpress.config.json
130
+
131
+ # Windows
132
+ set MCP_WORDPRESS_CONFIG_PATH=C:\path\to\mcp-wordpress.config.json
133
+ ```
134
+
135
+ Then restart Claude Desktop.
136
+
137
+ ### How Multi-Site Works with DTX
138
+
139
+ When using multi-site configuration:
140
+
141
+ 1. **All sites are available** in every tool by using the `--site` parameter
142
+ 2. **Example**: `wp_list_posts --site="site1"`
143
+ 3. **If `--site` is omitted**:
144
+ - Single site: Uses the configured site
145
+ - Multi-site: Shows error if more than one site exists
146
+
147
+ ### Testing Multi-Site Configuration
148
+
149
+ After setup, test with these commands:
150
+
151
+ ```text
152
+ # List posts from specific site
153
+ wp_list_posts --site="site1"
154
+
155
+ # Get stats from another site
156
+ wp_get_site_stats --site="site2"
157
+
158
+ # See all configured sites
159
+ wp_test_auth
160
+ ```
161
+
162
+ ## 🔧 DTX Development Commands
163
+
164
+ ### Building DTX Package
165
+
166
+ ```bash
167
+ # Clean previous builds
168
+ npm run dxt:clean
169
+
170
+ # Build the DTX package
171
+ npm run dxt:build
172
+
173
+ # Package everything (clean + build)
174
+ npm run dxt:package
175
+
176
+ # Validate the package (requires dxt CLI)
177
+ npm run dxt:validate
178
+ ```
179
+
180
+ ### DTX Package Structure
181
+
182
+ The DTX package includes:
183
+
184
+ ```
185
+ mcp-wordpress.dxt/
186
+ ├── manifest.json # DTX configuration and metadata
187
+ ├── icon.png # Extension icon
188
+ ├── screenshots/ # Usage screenshots
189
+ ├── dist/ # Compiled application
190
+ └── node_modules/ # Dependencies (production only)
191
+ ```
192
+
193
+ ## 📋 DTX Features
194
+
195
+ ### Automatic Configuration
196
+
197
+ The DTX package automatically configures:
198
+
199
+ - **22 Primary Tools** - Complete WordPress management toolkit
200
+ - **4 Built-in Prompts** - Pre-configured workflows
201
+ - **Secure Credentials** - Stored in OS keychain
202
+ - **Environment Variables** - Automatically set based on user input
203
+
204
+ ### Built-in Prompts
205
+
206
+ After installation, you'll have access to these prompts:
207
+
208
+ 1. **Setup WordPress** - Initial site setup and configuration
209
+ 2. **Content Management** - Content creation and management workflow
210
+ 3. **Performance Optimization** - Performance monitoring and optimization
211
+ 4. **Multi-Site Management** - Multi-site administration workflow
212
+
213
+ ### Tool Categories
214
+
215
+ The DTX includes 59 tools across:
216
+
217
+ - **Posts & Pages** - Content management
218
+ - **Media Library** - File uploads and management
219
+ - **Users & Comments** - User administration and moderation
220
+ - **Categories & Tags** - Taxonomy management
221
+ - **Site Settings** - Configuration and statistics
222
+ - **Authentication** - Security and access management
223
+ - **Cache Management** - Performance optimization
224
+ - **Performance Monitoring** - Real-time analytics
225
+
226
+ ## 🔍 DTX Troubleshooting
227
+
228
+ ### Installation Issues
229
+
230
+ **Problem**: "Package format not recognized"
231
+
232
+ - **Solution**: Ensure you have the latest Claude Desktop version
233
+
234
+ **Problem**: "Installation failed"
235
+
236
+ - **Solution**: Check that the DTX file isn't corrupted; rebuild if necessary
237
+
238
+ ### Configuration Issues
239
+
240
+ **Problem**: "Authentication failed"
241
+
242
+ - **Solution**: Verify your Application Password is correct and has no quotes
243
+
244
+ **Problem**: "Site not accessible"
245
+
246
+ - **Solution**: Check your WordPress URL and ensure REST API is enabled
247
+
248
+ ### Debugging DTX
249
+
250
+ 1. **Enable Debug Mode** in the DTX configuration
251
+ 2. **Check Claude Desktop logs** in Console.app (macOS)
252
+ 3. **Test manually** with NPX: `npx -y mcp-wordpress`
253
+
254
+ ## 🆚 DTX vs Other Installation Methods
255
+
256
+ ### DTX Advantages
257
+
258
+ ✅ **One-click installation** through Claude Desktop
259
+ ✅ **Secure credential storage** in OS keychain
260
+ ✅ **Built-in documentation** and prompts
261
+ ✅ **No command line required**
262
+ ✅ **Automatic dependency management**
263
+
264
+ ### DTX Limitations
265
+
266
+ ❌ **Less flexibility** than manual configuration
267
+ ❌ **Limited customization** options
268
+ ❌ **Requires DTX-compatible Claude Desktop**
269
+
270
+ ### When to Use DTX
271
+
272
+ - You want the simplest installation experience
273
+ - You prefer GUI configuration over command line
274
+ - You don't need custom configurations
275
+ - You want automatic updates and management
276
+
277
+ ### When to Use Other Methods
278
+
279
+ - You need custom configurations
280
+ - You're developing or contributing to the project
281
+ - You prefer command line control
282
+ - You need to modify the source code
283
+
284
+ ## 🔄 Updating DTX Package
285
+
286
+ ### Automatic Updates
287
+
288
+ - Claude Desktop will notify you of available updates
289
+ - Click **Update** when prompted
290
+
291
+ ### Manual Updates
292
+
293
+ 1. Download the latest DTX package
294
+ 2. Go to Extensions → Manage Extensions
295
+ 3. Remove the old version
296
+ 4. Install the new version
297
+ 5. Re-configure if necessary
298
+
299
+ ## 📦 DTX Package Distribution
300
+
301
+ ### For Users
302
+
303
+ - Download from GitHub Releases
304
+ - Install directly in Claude Desktop
305
+
306
+ ### For Developers
307
+
308
+ ```bash
309
+ # Build and test locally
310
+ npm run dxt:package
311
+ # Install the generated mcp-wordpress.dxt file
312
+
313
+ # Validate before distribution
314
+ npm run dxt:validate
315
+ ```
316
+
317
+ ---
318
+
319
+ ## 🎯 Quick Start Summary
320
+
321
+ 1. **Download**: Get `mcp-wordpress.dxt` from releases
322
+ 2. **Install**: Extensions menu in Claude Desktop
323
+ 3. **Configure**: Enter WordPress credentials
324
+ 4. **Test**: Try "List my WordPress posts"
325
+ 5. **Explore**: Use built-in prompts and tools
326
+
327
+ The DTX format provides the easiest way to get started with WordPress management in Claude Desktop!
@@ -0,0 +1,109 @@
1
+ # NPM Setup Guide (Local Development)
2
+
3
+ This guide provides step-by-step instructions for setting up the MCP WordPress server locally for development, customization, and contribution.
4
+
5
+ ---
6
+
7
+ ## 📦 Local NPM Setup
8
+
9
+ For local development, customization, or contributing to the project:
10
+
11
+ ### 1. Install Dependencies
12
+
13
+ Clone the repository and install dependencies:
14
+
15
+ ```bash
16
+ git clone https://github.com/docdyhr/mcp-wordpress.git
17
+ cd mcp-wordpress
18
+ npm install
19
+ ```
20
+
21
+ ### 2. Run the Setup Wizard
22
+
23
+ Run the interactive setup wizard:
24
+
25
+ ```bash
26
+ npm run setup
27
+ ```
28
+
29
+ ### 3. Build the Project
30
+
31
+ Compile TypeScript to JavaScript:
32
+
33
+ ```bash
34
+ npm run build
35
+ ```
36
+
37
+ ### 4. Start the Server
38
+
39
+ Start the MCP WordPress server:
40
+
41
+ ```bash
42
+ npm start
43
+ ```
44
+
45
+ ### 5. Test the Tools
46
+
47
+ Run tests to verify functionality:
48
+
49
+ ```bash
50
+ npm run test:tools
51
+ ```
52
+
53
+ ### 6. Claude Desktop Configuration (Local)
54
+
55
+ For local development, use this Claude Desktop configuration:
56
+
57
+ ```json
58
+ {
59
+ "mcpServers": {
60
+ "mcp-wordpress": {
61
+ "command": "node",
62
+ "args": ["/absolute/path/to/mcp-wordpress/dist/index.js"],
63
+ "env": {
64
+ "DEBUG": "false",
65
+ "MCP_DEBUG": "false"
66
+ }
67
+ }
68
+ }
69
+ }
70
+ ```
71
+
72
+ ### 7. Development Commands
73
+
74
+ ```bash
75
+ npm run dev # Development mode with auto-rebuild
76
+ npm run build:watch # Watch mode compilation
77
+ npm run test:watch # Watch mode testing
78
+ npm run lint # Code linting
79
+ npm run format # Code formatting
80
+ ```
81
+
82
+ ### 8. Maintenance Commands
83
+
84
+ ```bash
85
+ npm run status # Check WordPress connection
86
+ npm run health # Full system health check
87
+ npm run verify-claude # Verify Claude Desktop integration
88
+ npm run docs:generate # Generate API documentation
89
+ ```
90
+
91
+ ## 🔧 Local Development Benefits
92
+
93
+ - **Full Control**: Complete access to source code for customization
94
+ - **Offline Work**: No internet required after initial setup
95
+ - **Debugging**: Direct access to code for troubleshooting
96
+ - **Contributing**: Make changes and submit pull requests
97
+ - **Version Control**: Lock to specific versions or branches
98
+ - **Custom Features**: Add your own tools and modifications
99
+
100
+ ## 🚨 Important Notes
101
+
102
+ - **Build Required**: Must compile TypeScript before running
103
+ - **Dependencies**: Requires Node.js 18+ and npm installed
104
+ - **Updates**: Manual process to get latest changes
105
+ - **Space**: Uses local disk space for code and dependencies
106
+
107
+ ---
108
+
109
+ After setup, restart Claude Desktop and test with commands like "List my WordPress posts" or "Show me my site statistics".