mcp-wordpress 1.2.2 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (251) hide show
  1. package/README.md +210 -182
  2. package/dist/cache/CacheInvalidation.d.ts +3 -3
  3. package/dist/cache/CacheInvalidation.d.ts.map +1 -1
  4. package/dist/cache/CacheInvalidation.js +119 -119
  5. package/dist/cache/CacheInvalidation.js.map +1 -1
  6. package/dist/cache/CacheManager.d.ts +5 -0
  7. package/dist/cache/CacheManager.d.ts.map +1 -1
  8. package/dist/cache/CacheManager.js +26 -16
  9. package/dist/cache/CacheManager.js.map +1 -1
  10. package/dist/cache/HttpCacheWrapper.d.ts +1 -1
  11. package/dist/cache/HttpCacheWrapper.d.ts.map +1 -1
  12. package/dist/cache/HttpCacheWrapper.js +29 -29
  13. package/dist/cache/HttpCacheWrapper.js.map +1 -1
  14. package/dist/cache/__tests__/CacheInvalidation.test.js +96 -94
  15. package/dist/cache/__tests__/CacheInvalidation.test.js.map +1 -1
  16. package/dist/cache/__tests__/CacheManager.test.js +113 -113
  17. package/dist/cache/__tests__/CacheManager.test.js.map +1 -1
  18. package/dist/cache/__tests__/CachedWordPressClient.test.js +102 -99
  19. package/dist/cache/__tests__/CachedWordPressClient.test.js.map +1 -1
  20. package/dist/cache/__tests__/HttpCacheWrapper.test.js +98 -95
  21. package/dist/cache/__tests__/HttpCacheWrapper.test.js.map +1 -1
  22. package/dist/cache/index.d.ts +7 -7
  23. package/dist/cache/index.d.ts.map +1 -1
  24. package/dist/cache/index.js +4 -4
  25. package/dist/cache/index.js.map +1 -1
  26. package/dist/client/CachedWordPressClient.d.ts +4 -4
  27. package/dist/client/CachedWordPressClient.d.ts.map +1 -1
  28. package/dist/client/CachedWordPressClient.js +55 -51
  29. package/dist/client/CachedWordPressClient.js.map +1 -1
  30. package/dist/client/api.d.ts +10 -10
  31. package/dist/client/api.js +158 -158
  32. package/dist/client/api.js.map +1 -1
  33. package/dist/client/auth.d.ts +2 -2
  34. package/dist/client/auth.js +72 -72
  35. package/dist/client/managers/AuthenticationManager.d.ts +2 -2
  36. package/dist/client/managers/AuthenticationManager.js +46 -46
  37. package/dist/client/managers/BaseManager.d.ts +1 -1
  38. package/dist/client/managers/BaseManager.js +9 -9
  39. package/dist/client/managers/RequestManager.d.ts +5 -3
  40. package/dist/client/managers/RequestManager.d.ts.map +1 -1
  41. package/dist/client/managers/RequestManager.js +39 -19
  42. package/dist/client/managers/RequestManager.js.map +1 -1
  43. package/dist/client/managers/index.d.ts +3 -3
  44. package/dist/client/managers/index.js +3 -3
  45. package/dist/config/ConfigurationSchema.d.ts +2 -2
  46. package/dist/config/ConfigurationSchema.d.ts.map +1 -1
  47. package/dist/config/ConfigurationSchema.js +40 -40
  48. package/dist/config/ConfigurationSchema.js.map +1 -1
  49. package/dist/config/ServerConfiguration.d.ts +2 -2
  50. package/dist/config/ServerConfiguration.js +35 -35
  51. package/dist/config/ServerConfiguration.js.map +1 -1
  52. package/dist/docs/DocumentationGenerator.d.ts.map +1 -1
  53. package/dist/docs/DocumentationGenerator.js +296 -255
  54. package/dist/docs/DocumentationGenerator.js.map +1 -1
  55. package/dist/docs/MarkdownFormatter.d.ts +1 -1
  56. package/dist/docs/MarkdownFormatter.d.ts.map +1 -1
  57. package/dist/docs/MarkdownFormatter.js +60 -51
  58. package/dist/docs/MarkdownFormatter.js.map +1 -1
  59. package/dist/docs/index.d.ts +3 -3
  60. package/dist/docs/index.d.ts.map +1 -1
  61. package/dist/docs/index.js +2 -2
  62. package/dist/index.d.ts.map +1 -1
  63. package/dist/index.js +16 -16
  64. package/dist/index.js.map +1 -1
  65. package/dist/mcp-wordpress-1.3.0.tgz +0 -0
  66. package/dist/performance/MetricsCollector.d.ts +3 -3
  67. package/dist/performance/MetricsCollector.d.ts.map +1 -1
  68. package/dist/performance/MetricsCollector.js +33 -27
  69. package/dist/performance/MetricsCollector.js.map +1 -1
  70. package/dist/performance/PerformanceAnalytics.d.ts +12 -12
  71. package/dist/performance/PerformanceAnalytics.d.ts.map +1 -1
  72. package/dist/performance/PerformanceAnalytics.js +200 -154
  73. package/dist/performance/PerformanceAnalytics.js.map +1 -1
  74. package/dist/performance/PerformanceMonitor.d.ts +5 -5
  75. package/dist/performance/PerformanceMonitor.d.ts.map +1 -1
  76. package/dist/performance/PerformanceMonitor.js +53 -52
  77. package/dist/performance/PerformanceMonitor.js.map +1 -1
  78. package/dist/performance/index.d.ts +6 -6
  79. package/dist/performance/index.d.ts.map +1 -1
  80. package/dist/performance/index.js +3 -3
  81. package/dist/security/InputValidator.d.ts +1 -1
  82. package/dist/security/InputValidator.d.ts.map +1 -1
  83. package/dist/security/InputValidator.js +111 -88
  84. package/dist/security/InputValidator.js.map +1 -1
  85. package/dist/security/SecurityConfig.d.ts +5 -5
  86. package/dist/security/SecurityConfig.js +92 -92
  87. package/dist/security/SecurityConfig.js.map +1 -1
  88. package/dist/server/ConnectionTester.d.ts +1 -1
  89. package/dist/server/ConnectionTester.d.ts.map +1 -1
  90. package/dist/server/ConnectionTester.js +4 -4
  91. package/dist/server/ConnectionTester.js.map +1 -1
  92. package/dist/server/ToolRegistry.d.ts +2 -2
  93. package/dist/server/ToolRegistry.d.ts.map +1 -1
  94. package/dist/server/ToolRegistry.js +35 -32
  95. package/dist/server/ToolRegistry.js.map +1 -1
  96. package/dist/server.d.ts +2 -2
  97. package/dist/server.js +2 -2
  98. package/dist/tools/BaseToolManager.js +5 -5
  99. package/dist/tools/auth.d.ts +2 -2
  100. package/dist/tools/auth.d.ts.map +1 -1
  101. package/dist/tools/auth.js +32 -31
  102. package/dist/tools/auth.js.map +1 -1
  103. package/dist/tools/cache.d.ts +1 -1
  104. package/dist/tools/cache.d.ts.map +1 -1
  105. package/dist/tools/cache.js +71 -71
  106. package/dist/tools/cache.js.map +1 -1
  107. package/dist/tools/comments.d.ts +2 -2
  108. package/dist/tools/comments.d.ts.map +1 -1
  109. package/dist/tools/comments.js +79 -79
  110. package/dist/tools/comments.js.map +1 -1
  111. package/dist/tools/index.d.ts +10 -10
  112. package/dist/tools/index.js +10 -10
  113. package/dist/tools/media.d.ts +2 -2
  114. package/dist/tools/media.js +80 -80
  115. package/dist/tools/pages.d.ts +2 -2
  116. package/dist/tools/pages.d.ts.map +1 -1
  117. package/dist/tools/pages.js +75 -75
  118. package/dist/tools/pages.js.map +1 -1
  119. package/dist/tools/performance.d.ts +1 -1
  120. package/dist/tools/performance.d.ts.map +1 -1
  121. package/dist/tools/performance.js +311 -287
  122. package/dist/tools/performance.js.map +1 -1
  123. package/dist/tools/posts.d.ts +2 -2
  124. package/dist/tools/posts.d.ts.map +1 -1
  125. package/dist/tools/posts.js +94 -94
  126. package/dist/tools/posts.js.map +1 -1
  127. package/dist/tools/site.d.ts +2 -2
  128. package/dist/tools/site.d.ts.map +1 -1
  129. package/dist/tools/site.js +60 -60
  130. package/dist/tools/site.js.map +1 -1
  131. package/dist/tools/taxonomies.d.ts +2 -2
  132. package/dist/tools/taxonomies.js +89 -89
  133. package/dist/tools/users.d.ts +2 -2
  134. package/dist/tools/users.js +68 -68
  135. package/dist/tools/users.js.map +1 -1
  136. package/dist/types/client.d.ts +13 -13
  137. package/dist/types/client.d.ts.map +1 -1
  138. package/dist/types/client.js +12 -12
  139. package/dist/types/client.js.map +1 -1
  140. package/dist/types/index.d.ts +19 -19
  141. package/dist/types/index.d.ts.map +1 -1
  142. package/dist/types/index.js +3 -3
  143. package/dist/types/mcp.d.ts +7 -7
  144. package/dist/types/wordpress.d.ts +21 -21
  145. package/dist/types/wordpress.d.ts.map +1 -1
  146. package/dist/utils/debug.d.ts +2 -2
  147. package/dist/utils/debug.js +28 -28
  148. package/dist/utils/error.d.ts.map +1 -1
  149. package/dist/utils/error.js +13 -13
  150. package/dist/utils/error.js.map +1 -1
  151. package/dist/utils/toolWrapper.d.ts.map +1 -1
  152. package/dist/utils/toolWrapper.js +5 -5
  153. package/dist/utils/toolWrapper.js.map +1 -1
  154. package/dist/utils/validation.d.ts.map +1 -1
  155. package/dist/utils/validation.js +41 -31
  156. package/dist/utils/validation.js.map +1 -1
  157. package/docs/CACHING.md +36 -2
  158. package/docs/DOCKER.md +24 -18
  159. package/docs/PERFORMANCE_MONITORING.md +49 -1
  160. package/docs/SECURITY_TESTING.md +30 -1
  161. package/docs/api/README.md +9 -1
  162. package/docs/api/summary.json +1 -1
  163. package/docs/contract-testing.md +24 -3
  164. package/docs/developer/GITHUB_ACTIONS_SETUP.md +8 -2
  165. package/docs/developer/MAINTENANCE.md +29 -3
  166. package/docs/developer/MIGRATION_GUIDE.md +13 -1
  167. package/docs/developer/NPM_AUTH_SETUP.md +13 -2
  168. package/docs/developer/REFACTORING.md +31 -1
  169. package/docs/releases/COMMUNITY_ANNOUNCEMENT_v1.1.2.md +18 -7
  170. package/docs/releases/RELEASE_NOTES_v1.1.2.md +31 -5
  171. package/docs/user-guides/DOCKER_SETUP.md +264 -0
  172. package/docs/user-guides/DTX_SETUP.md +327 -0
  173. package/docs/user-guides/NPM_SETUP.md +109 -0
  174. package/docs/user-guides/NPX_SETUP.md +281 -0
  175. package/docs/wordpress-rest-api-authentication-troubleshooting.md +13 -2
  176. package/package.json +27 -8
  177. package/src/cache/CacheInvalidation.ts +140 -132
  178. package/src/cache/CacheManager.ts +40 -29
  179. package/src/cache/HttpCacheWrapper.ts +105 -68
  180. package/src/cache/__tests__/CacheInvalidation.test.ts +123 -118
  181. package/src/cache/__tests__/CacheManager.test.ts +156 -152
  182. package/src/cache/__tests__/CachedWordPressClient.test.ts +131 -116
  183. package/src/cache/__tests__/HttpCacheWrapper.test.ts +118 -115
  184. package/src/cache/index.ts +13 -13
  185. package/src/client/CachedWordPressClient.ts +90 -80
  186. package/src/client/api.ts +205 -205
  187. package/src/client/auth.ts +80 -80
  188. package/src/client/managers/AuthenticationManager.ts +61 -61
  189. package/src/client/managers/BaseManager.ts +11 -11
  190. package/src/client/managers/RequestManager.ts +79 -47
  191. package/src/client/managers/index.ts +3 -3
  192. package/src/config/ConfigurationSchema.ts +44 -44
  193. package/src/config/ServerConfiguration.ts +39 -39
  194. package/src/docs/DocumentationGenerator.ts +402 -295
  195. package/src/docs/MarkdownFormatter.ts +94 -69
  196. package/src/docs/index.ts +4 -4
  197. package/src/index.ts +24 -21
  198. package/src/performance/MetricsCollector.ts +90 -58
  199. package/src/performance/PerformanceAnalytics.ts +386 -262
  200. package/src/performance/PerformanceMonitor.ts +152 -118
  201. package/src/performance/index.ts +9 -9
  202. package/src/security/InputValidator.ts +148 -91
  203. package/src/security/SecurityConfig.ts +94 -94
  204. package/src/server/ConnectionTester.ts +21 -15
  205. package/src/server/ToolRegistry.ts +64 -51
  206. package/src/server.ts +2 -2
  207. package/src/tools/BaseToolManager.ts +6 -6
  208. package/src/tools/auth.ts +42 -37
  209. package/src/tools/cache.ts +85 -81
  210. package/src/tools/comments.ts +93 -91
  211. package/src/tools/index.ts +10 -10
  212. package/src/tools/media.ts +89 -89
  213. package/src/tools/pages.ts +89 -87
  214. package/src/tools/performance.ts +443 -352
  215. package/src/tools/posts.ts +109 -107
  216. package/src/tools/site.ts +86 -77
  217. package/src/tools/taxonomies.ts +102 -102
  218. package/src/tools/users.ts +77 -77
  219. package/src/types/client.ts +157 -60
  220. package/src/types/index.ts +49 -27
  221. package/src/types/mcp.ts +15 -15
  222. package/src/types/wordpress.ts +57 -29
  223. package/src/utils/debug.ts +37 -37
  224. package/src/utils/error.ts +47 -25
  225. package/src/utils/toolWrapper.ts +12 -8
  226. package/src/utils/validation.ts +116 -65
  227. package/dist/client/WordPressClient.d.ts +0 -81
  228. package/dist/client/WordPressClient.d.ts.map +0 -1
  229. package/dist/client/WordPressClient.js +0 -354
  230. package/dist/client/WordPressClient.js.map +0 -1
  231. package/dist/performance/AnomalyDetector.d.ts +0 -63
  232. package/dist/performance/AnomalyDetector.d.ts.map +0 -1
  233. package/dist/performance/AnomalyDetector.js +0 -222
  234. package/dist/performance/AnomalyDetector.js.map +0 -1
  235. package/dist/performance/BenchmarkAnalyzer.d.ts +0 -67
  236. package/dist/performance/BenchmarkAnalyzer.d.ts.map +0 -1
  237. package/dist/performance/BenchmarkAnalyzer.js +0 -301
  238. package/dist/performance/BenchmarkAnalyzer.js.map +0 -1
  239. package/dist/performance/TrendAnalyzer.d.ts +0 -69
  240. package/dist/performance/TrendAnalyzer.d.ts.map +0 -1
  241. package/dist/performance/TrendAnalyzer.js +0 -203
  242. package/dist/performance/TrendAnalyzer.js.map +0 -1
  243. package/dist/tools/BaseToolClass.d.ts +0 -76
  244. package/dist/tools/BaseToolClass.d.ts.map +0 -1
  245. package/dist/tools/BaseToolClass.js +0 -104
  246. package/dist/tools/BaseToolClass.js.map +0 -1
  247. package/dist/tools/base.d.ts +0 -37
  248. package/dist/tools/base.d.ts.map +0 -1
  249. package/dist/tools/base.js +0 -60
  250. package/dist/tools/base.js.map +0 -1
  251. package/docs/user-guides/CLAUDE_DESKTOP_SETUP.md +0 -187
@@ -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".
@@ -0,0 +1,281 @@
1
+ # NPX Setup Guide
2
+
3
+ This guide provides step-by-step instructions for using the MCP WordPress server with NPX - the quickest way to get started without local installation.
4
+
5
+ ---
6
+
7
+ ## 🚀 What is NPX?
8
+
9
+ NPX is a package runner that comes with npm 5.2+. It allows you to:
10
+
11
+ - Run packages without installing them locally
12
+ - Always use the latest published version
13
+ - Avoid global installations
14
+ - Get started in seconds
15
+
16
+ ## 📋 Prerequisites
17
+
18
+ - Node.js 18+ with npm 5.2+ (check with `npx --version`)
19
+ - WordPress site with REST API enabled
20
+ - WordPress Application Password (recommended)
21
+
22
+ ## 🎯 Quick Start
23
+
24
+ ### 1. Claude Desktop Configuration
25
+
26
+ Add this to your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json`):
27
+
28
+ #### Single-Site Setup
29
+
30
+ ```json
31
+ {
32
+ "mcpServers": {
33
+ "mcp-wordpress": {
34
+ "command": "npx",
35
+ "args": ["-y", "mcp-wordpress"],
36
+ "env": {
37
+ "WORDPRESS_SITE_URL": "https://your-site.com",
38
+ "WORDPRESS_USERNAME": "your_username",
39
+ "WORDPRESS_APP_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx",
40
+ "WORDPRESS_AUTH_METHOD": "app-password"
41
+ }
42
+ }
43
+ }
44
+ }
45
+ ```
46
+
47
+ #### Multi-Site Setup
48
+
49
+ First, create `mcp-wordpress.config.json` in your home directory:
50
+
51
+ ```json
52
+ {
53
+ "sites": [
54
+ {
55
+ "id": "site1",
56
+ "name": "Main Site",
57
+ "config": {
58
+ "WORDPRESS_SITE_URL": "https://site1.com",
59
+ "WORDPRESS_USERNAME": "admin",
60
+ "WORDPRESS_APP_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx"
61
+ }
62
+ },
63
+ {
64
+ "id": "site2",
65
+ "name": "Blog Site",
66
+ "config": {
67
+ "WORDPRESS_SITE_URL": "https://blog.site2.com",
68
+ "WORDPRESS_USERNAME": "editor",
69
+ "WORDPRESS_APP_PASSWORD": "yyyy yyyy yyyy yyyy yyyy yyyy"
70
+ }
71
+ }
72
+ ]
73
+ }
74
+ ```
75
+
76
+ Then use this simpler Claude Desktop configuration:
77
+
78
+ ```json
79
+ {
80
+ "mcpServers": {
81
+ "mcp-wordpress": {
82
+ "command": "npx",
83
+ "args": ["-y", "mcp-wordpress"]
84
+ }
85
+ }
86
+ }
87
+ ```
88
+
89
+ ### 2. Generate WordPress Application Password
90
+
91
+ 1. Log into WordPress Admin
92
+ 2. Go to Users → Your Profile
93
+ 3. Scroll to "Application Passwords"
94
+ 4. Enter a name (e.g., "Claude Desktop")
95
+ 5. Click "Add New Application Password"
96
+ 6. Copy the generated password (format: `xxxx xxxx xxxx xxxx xxxx xxxx`)
97
+
98
+ ### 3. Restart Claude Desktop
99
+
100
+ After updating the configuration, restart Claude Desktop to load the NPX-based server.
101
+
102
+ ## 🧪 Testing NPX Setup
103
+
104
+ ### Manual Testing (Terminal)
105
+
106
+ Test the NPX setup before using in Claude Desktop:
107
+
108
+ ```bash
109
+ # Single-site test
110
+ WORDPRESS_SITE_URL=https://your-site.com \
111
+ WORDPRESS_USERNAME=your_username \
112
+ WORDPRESS_APP_PASSWORD="xxxx xxxx xxxx xxxx xxxx xxxx" \
113
+ npx -y mcp-wordpress
114
+
115
+ # Multi-site test (with config file in current directory)
116
+ npx -y mcp-wordpress
117
+ ```
118
+
119
+ ### Claude Desktop Testing
120
+
121
+ After configuration, test with these commands:
122
+
123
+ - "List my WordPress posts"
124
+ - "Show my site statistics"
125
+ - "What WordPress tools are available?"
126
+
127
+ ## 🔧 NPX Options
128
+
129
+ ### Force Latest Version
130
+
131
+ ```json
132
+ {
133
+ "command": "npx",
134
+ "args": ["--yes", "--package=mcp-wordpress@latest", "mcp-wordpress"]
135
+ }
136
+ ```
137
+
138
+ ### Use Specific Version
139
+
140
+ ```json
141
+ {
142
+ "command": "npx",
143
+ "args": ["-y", "mcp-wordpress@1.2.4"]
144
+ }
145
+ ```
146
+
147
+ ### Clear NPX Cache
148
+
149
+ If you're having issues with cached versions:
150
+
151
+ ```bash
152
+ # Clear npx cache
153
+ rm -rf ~/.npm/_npx
154
+
155
+ # Or force fresh download
156
+ npx --ignore-existing mcp-wordpress
157
+ ```
158
+
159
+ ## 🆚 NPX vs Other Methods
160
+
161
+ ### NPX Advantages
162
+
163
+ ✅ **No installation required** - Just configure and use
164
+ ✅ **Always latest version** - Automatic updates
165
+ ✅ **No maintenance** - No local files to manage
166
+ ✅ **Quick setup** - Under 30 seconds
167
+ ✅ **Cross-platform** - Works everywhere Node.js works
168
+
169
+ ### NPX Limitations
170
+
171
+ ❌ **Requires internet** - Downloads package on first run
172
+ ❌ **Slower startup** - Initial download takes time
173
+ ❌ **No customization** - Can't modify the code
174
+ ❌ **No offline work** - Needs internet connection
175
+
176
+ ### When to Use NPX
177
+
178
+ - ✅ You just want to use WordPress tools
179
+ - ✅ You want automatic updates
180
+ - ✅ You don't need to modify code
181
+ - ✅ You have reliable internet
182
+
183
+ ### When NOT to Use NPX
184
+
185
+ - ❌ You need to customize the tools
186
+ - ❌ You're developing new features
187
+ - ❌ You work offline frequently
188
+ - ❌ You need a specific version locked
189
+
190
+ ## 🔍 Troubleshooting
191
+
192
+ ### Common Issues
193
+
194
+ **"Command not found: npx"**
195
+
196
+ - Install Node.js 18+ which includes npx
197
+ - Or install npx globally: `npm install -g npx`
198
+
199
+ **"No matching version found"**
200
+
201
+ - Check your internet connection
202
+ - Try clearing npm cache: `npm cache clean --force`
203
+
204
+ **"Authentication failed"**
205
+
206
+ - Verify Application Password has no extra spaces
207
+ - Check WordPress username is correct
208
+ - Ensure REST API is accessible
209
+
210
+ **"Config file not found"**
211
+
212
+ - For multi-site, ensure `mcp-wordpress.config.json` is in:
213
+ - Home directory: `~/mcp-wordpress.config.json`
214
+ - Or current directory when testing
215
+
216
+ ### Debug Mode
217
+
218
+ Enable debug output by adding to env:
219
+
220
+ ```json
221
+ {
222
+ "env": {
223
+ "DEBUG": "true",
224
+ "LOG_LEVEL": "debug"
225
+ }
226
+ }
227
+ ```
228
+
229
+ ## 📊 Performance Tips
230
+
231
+ ### NPX Caching
232
+
233
+ NPX caches packages after first download:
234
+
235
+ - First run: Downloads package (5-10 seconds)
236
+ - Subsequent runs: Uses cache (instant)
237
+ - Cache location: `~/.npm/_npx/`
238
+
239
+ ### Network Optimization
240
+
241
+ For slow connections, pre-cache the package:
242
+
243
+ ```bash
244
+ # Pre-download the package
245
+ npx -y mcp-wordpress --help
246
+
247
+ # Now it's cached for Claude Desktop use
248
+ ```
249
+
250
+ ## 🎯 Quick Reference
251
+
252
+ ### Essential Commands
253
+
254
+ ```bash
255
+ # Check npx version
256
+ npx --version
257
+
258
+ # Test connection
259
+ npx -y mcp-wordpress
260
+
261
+ # Clear cache
262
+ rm -rf ~/.npm/_npx
263
+
264
+ # View package info
265
+ npm view mcp-wordpress
266
+ ```
267
+
268
+ ### Environment Variables
269
+
270
+ ```bash
271
+ WORDPRESS_SITE_URL # Required: Your WordPress URL
272
+ WORDPRESS_USERNAME # Required: WordPress username
273
+ WORDPRESS_APP_PASSWORD # Required: Application password
274
+ WORDPRESS_AUTH_METHOD # Optional: Auth method (default: app-password)
275
+ DEBUG # Optional: Enable debug output
276
+ LOG_LEVEL # Optional: Logging level (debug, info, warn, error)
277
+ ```
278
+
279
+ ---
280
+
281
+ NPX provides the fastest way to get started with WordPress tools in Claude Desktop - no installation, no maintenance, just pure functionality!