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.
- package/README.md +210 -182
- package/dist/cache/CacheInvalidation.d.ts +3 -3
- package/dist/cache/CacheInvalidation.d.ts.map +1 -1
- package/dist/cache/CacheInvalidation.js +119 -119
- package/dist/cache/CacheInvalidation.js.map +1 -1
- package/dist/cache/CacheManager.d.ts +5 -0
- package/dist/cache/CacheManager.d.ts.map +1 -1
- package/dist/cache/CacheManager.js +26 -16
- package/dist/cache/CacheManager.js.map +1 -1
- package/dist/cache/HttpCacheWrapper.d.ts +1 -1
- package/dist/cache/HttpCacheWrapper.d.ts.map +1 -1
- package/dist/cache/HttpCacheWrapper.js +29 -29
- package/dist/cache/HttpCacheWrapper.js.map +1 -1
- package/dist/cache/__tests__/CacheInvalidation.test.js +96 -94
- package/dist/cache/__tests__/CacheInvalidation.test.js.map +1 -1
- package/dist/cache/__tests__/CacheManager.test.js +113 -113
- package/dist/cache/__tests__/CacheManager.test.js.map +1 -1
- package/dist/cache/__tests__/CachedWordPressClient.test.js +102 -99
- package/dist/cache/__tests__/CachedWordPressClient.test.js.map +1 -1
- package/dist/cache/__tests__/HttpCacheWrapper.test.js +98 -95
- package/dist/cache/__tests__/HttpCacheWrapper.test.js.map +1 -1
- package/dist/cache/index.d.ts +7 -7
- package/dist/cache/index.d.ts.map +1 -1
- package/dist/cache/index.js +4 -4
- package/dist/cache/index.js.map +1 -1
- package/dist/client/CachedWordPressClient.d.ts +4 -4
- package/dist/client/CachedWordPressClient.d.ts.map +1 -1
- package/dist/client/CachedWordPressClient.js +55 -51
- package/dist/client/CachedWordPressClient.js.map +1 -1
- package/dist/client/api.d.ts +10 -10
- package/dist/client/api.js +158 -158
- package/dist/client/api.js.map +1 -1
- package/dist/client/auth.d.ts +2 -2
- package/dist/client/auth.js +72 -72
- package/dist/client/managers/AuthenticationManager.d.ts +2 -2
- package/dist/client/managers/AuthenticationManager.js +46 -46
- package/dist/client/managers/BaseManager.d.ts +1 -1
- package/dist/client/managers/BaseManager.js +9 -9
- package/dist/client/managers/RequestManager.d.ts +5 -3
- package/dist/client/managers/RequestManager.d.ts.map +1 -1
- package/dist/client/managers/RequestManager.js +39 -19
- package/dist/client/managers/RequestManager.js.map +1 -1
- package/dist/client/managers/index.d.ts +3 -3
- package/dist/client/managers/index.js +3 -3
- package/dist/config/ConfigurationSchema.d.ts +2 -2
- package/dist/config/ConfigurationSchema.d.ts.map +1 -1
- package/dist/config/ConfigurationSchema.js +40 -40
- package/dist/config/ConfigurationSchema.js.map +1 -1
- package/dist/config/ServerConfiguration.d.ts +2 -2
- package/dist/config/ServerConfiguration.js +35 -35
- package/dist/config/ServerConfiguration.js.map +1 -1
- package/dist/docs/DocumentationGenerator.d.ts.map +1 -1
- package/dist/docs/DocumentationGenerator.js +296 -255
- package/dist/docs/DocumentationGenerator.js.map +1 -1
- package/dist/docs/MarkdownFormatter.d.ts +1 -1
- package/dist/docs/MarkdownFormatter.d.ts.map +1 -1
- package/dist/docs/MarkdownFormatter.js +60 -51
- package/dist/docs/MarkdownFormatter.js.map +1 -1
- package/dist/docs/index.d.ts +3 -3
- package/dist/docs/index.d.ts.map +1 -1
- package/dist/docs/index.js +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +16 -16
- package/dist/index.js.map +1 -1
- package/dist/mcp-wordpress-1.3.0.tgz +0 -0
- package/dist/performance/MetricsCollector.d.ts +3 -3
- package/dist/performance/MetricsCollector.d.ts.map +1 -1
- package/dist/performance/MetricsCollector.js +33 -27
- package/dist/performance/MetricsCollector.js.map +1 -1
- package/dist/performance/PerformanceAnalytics.d.ts +12 -12
- package/dist/performance/PerformanceAnalytics.d.ts.map +1 -1
- package/dist/performance/PerformanceAnalytics.js +200 -154
- package/dist/performance/PerformanceAnalytics.js.map +1 -1
- package/dist/performance/PerformanceMonitor.d.ts +5 -5
- package/dist/performance/PerformanceMonitor.d.ts.map +1 -1
- package/dist/performance/PerformanceMonitor.js +53 -52
- package/dist/performance/PerformanceMonitor.js.map +1 -1
- package/dist/performance/index.d.ts +6 -6
- package/dist/performance/index.d.ts.map +1 -1
- package/dist/performance/index.js +3 -3
- package/dist/security/InputValidator.d.ts +1 -1
- package/dist/security/InputValidator.d.ts.map +1 -1
- package/dist/security/InputValidator.js +111 -88
- package/dist/security/InputValidator.js.map +1 -1
- package/dist/security/SecurityConfig.d.ts +5 -5
- package/dist/security/SecurityConfig.js +92 -92
- package/dist/security/SecurityConfig.js.map +1 -1
- package/dist/server/ConnectionTester.d.ts +1 -1
- package/dist/server/ConnectionTester.d.ts.map +1 -1
- package/dist/server/ConnectionTester.js +4 -4
- package/dist/server/ConnectionTester.js.map +1 -1
- package/dist/server/ToolRegistry.d.ts +2 -2
- package/dist/server/ToolRegistry.d.ts.map +1 -1
- package/dist/server/ToolRegistry.js +35 -32
- package/dist/server/ToolRegistry.js.map +1 -1
- package/dist/server.d.ts +2 -2
- package/dist/server.js +2 -2
- package/dist/tools/BaseToolManager.js +5 -5
- package/dist/tools/auth.d.ts +2 -2
- package/dist/tools/auth.d.ts.map +1 -1
- package/dist/tools/auth.js +32 -31
- package/dist/tools/auth.js.map +1 -1
- package/dist/tools/cache.d.ts +1 -1
- package/dist/tools/cache.d.ts.map +1 -1
- package/dist/tools/cache.js +71 -71
- package/dist/tools/cache.js.map +1 -1
- package/dist/tools/comments.d.ts +2 -2
- package/dist/tools/comments.d.ts.map +1 -1
- package/dist/tools/comments.js +79 -79
- package/dist/tools/comments.js.map +1 -1
- package/dist/tools/index.d.ts +10 -10
- package/dist/tools/index.js +10 -10
- package/dist/tools/media.d.ts +2 -2
- package/dist/tools/media.js +80 -80
- package/dist/tools/pages.d.ts +2 -2
- package/dist/tools/pages.d.ts.map +1 -1
- package/dist/tools/pages.js +75 -75
- package/dist/tools/pages.js.map +1 -1
- package/dist/tools/performance.d.ts +1 -1
- package/dist/tools/performance.d.ts.map +1 -1
- package/dist/tools/performance.js +311 -287
- package/dist/tools/performance.js.map +1 -1
- package/dist/tools/posts.d.ts +2 -2
- package/dist/tools/posts.d.ts.map +1 -1
- package/dist/tools/posts.js +94 -94
- package/dist/tools/posts.js.map +1 -1
- package/dist/tools/site.d.ts +2 -2
- package/dist/tools/site.d.ts.map +1 -1
- package/dist/tools/site.js +60 -60
- package/dist/tools/site.js.map +1 -1
- package/dist/tools/taxonomies.d.ts +2 -2
- package/dist/tools/taxonomies.js +89 -89
- package/dist/tools/users.d.ts +2 -2
- package/dist/tools/users.js +68 -68
- package/dist/tools/users.js.map +1 -1
- package/dist/types/client.d.ts +13 -13
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/client.js +12 -12
- package/dist/types/client.js.map +1 -1
- package/dist/types/index.d.ts +19 -19
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +3 -3
- package/dist/types/mcp.d.ts +7 -7
- package/dist/types/wordpress.d.ts +21 -21
- package/dist/types/wordpress.d.ts.map +1 -1
- package/dist/utils/debug.d.ts +2 -2
- package/dist/utils/debug.js +28 -28
- package/dist/utils/error.d.ts.map +1 -1
- package/dist/utils/error.js +13 -13
- package/dist/utils/error.js.map +1 -1
- package/dist/utils/toolWrapper.d.ts.map +1 -1
- package/dist/utils/toolWrapper.js +5 -5
- package/dist/utils/toolWrapper.js.map +1 -1
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +41 -31
- package/dist/utils/validation.js.map +1 -1
- package/docs/CACHING.md +36 -2
- package/docs/DOCKER.md +24 -18
- package/docs/PERFORMANCE_MONITORING.md +49 -1
- package/docs/SECURITY_TESTING.md +30 -1
- package/docs/api/README.md +9 -1
- package/docs/api/summary.json +1 -1
- package/docs/contract-testing.md +24 -3
- package/docs/developer/GITHUB_ACTIONS_SETUP.md +8 -2
- package/docs/developer/MAINTENANCE.md +29 -3
- package/docs/developer/MIGRATION_GUIDE.md +13 -1
- package/docs/developer/NPM_AUTH_SETUP.md +13 -2
- package/docs/developer/REFACTORING.md +31 -1
- package/docs/releases/COMMUNITY_ANNOUNCEMENT_v1.1.2.md +18 -7
- package/docs/releases/RELEASE_NOTES_v1.1.2.md +31 -5
- package/docs/user-guides/DOCKER_SETUP.md +264 -0
- package/docs/user-guides/DTX_SETUP.md +327 -0
- package/docs/user-guides/NPM_SETUP.md +109 -0
- package/docs/user-guides/NPX_SETUP.md +281 -0
- package/docs/wordpress-rest-api-authentication-troubleshooting.md +13 -2
- package/package.json +27 -8
- package/src/cache/CacheInvalidation.ts +140 -132
- package/src/cache/CacheManager.ts +40 -29
- package/src/cache/HttpCacheWrapper.ts +105 -68
- package/src/cache/__tests__/CacheInvalidation.test.ts +123 -118
- package/src/cache/__tests__/CacheManager.test.ts +156 -152
- package/src/cache/__tests__/CachedWordPressClient.test.ts +131 -116
- package/src/cache/__tests__/HttpCacheWrapper.test.ts +118 -115
- package/src/cache/index.ts +13 -13
- package/src/client/CachedWordPressClient.ts +90 -80
- package/src/client/api.ts +205 -205
- package/src/client/auth.ts +80 -80
- package/src/client/managers/AuthenticationManager.ts +61 -61
- package/src/client/managers/BaseManager.ts +11 -11
- package/src/client/managers/RequestManager.ts +79 -47
- package/src/client/managers/index.ts +3 -3
- package/src/config/ConfigurationSchema.ts +44 -44
- package/src/config/ServerConfiguration.ts +39 -39
- package/src/docs/DocumentationGenerator.ts +402 -295
- package/src/docs/MarkdownFormatter.ts +94 -69
- package/src/docs/index.ts +4 -4
- package/src/index.ts +24 -21
- package/src/performance/MetricsCollector.ts +90 -58
- package/src/performance/PerformanceAnalytics.ts +386 -262
- package/src/performance/PerformanceMonitor.ts +152 -118
- package/src/performance/index.ts +9 -9
- package/src/security/InputValidator.ts +148 -91
- package/src/security/SecurityConfig.ts +94 -94
- package/src/server/ConnectionTester.ts +21 -15
- package/src/server/ToolRegistry.ts +64 -51
- package/src/server.ts +2 -2
- package/src/tools/BaseToolManager.ts +6 -6
- package/src/tools/auth.ts +42 -37
- package/src/tools/cache.ts +85 -81
- package/src/tools/comments.ts +93 -91
- package/src/tools/index.ts +10 -10
- package/src/tools/media.ts +89 -89
- package/src/tools/pages.ts +89 -87
- package/src/tools/performance.ts +443 -352
- package/src/tools/posts.ts +109 -107
- package/src/tools/site.ts +86 -77
- package/src/tools/taxonomies.ts +102 -102
- package/src/tools/users.ts +77 -77
- package/src/types/client.ts +157 -60
- package/src/types/index.ts +49 -27
- package/src/types/mcp.ts +15 -15
- package/src/types/wordpress.ts +57 -29
- package/src/utils/debug.ts +37 -37
- package/src/utils/error.ts +47 -25
- package/src/utils/toolWrapper.ts +12 -8
- package/src/utils/validation.ts +116 -65
- package/dist/client/WordPressClient.d.ts +0 -81
- package/dist/client/WordPressClient.d.ts.map +0 -1
- package/dist/client/WordPressClient.js +0 -354
- package/dist/client/WordPressClient.js.map +0 -1
- package/dist/performance/AnomalyDetector.d.ts +0 -63
- package/dist/performance/AnomalyDetector.d.ts.map +0 -1
- package/dist/performance/AnomalyDetector.js +0 -222
- package/dist/performance/AnomalyDetector.js.map +0 -1
- package/dist/performance/BenchmarkAnalyzer.d.ts +0 -67
- package/dist/performance/BenchmarkAnalyzer.d.ts.map +0 -1
- package/dist/performance/BenchmarkAnalyzer.js +0 -301
- package/dist/performance/BenchmarkAnalyzer.js.map +0 -1
- package/dist/performance/TrendAnalyzer.d.ts +0 -69
- package/dist/performance/TrendAnalyzer.d.ts.map +0 -1
- package/dist/performance/TrendAnalyzer.js +0 -203
- package/dist/performance/TrendAnalyzer.js.map +0 -1
- package/dist/tools/BaseToolClass.d.ts +0 -76
- package/dist/tools/BaseToolClass.d.ts.map +0 -1
- package/dist/tools/BaseToolClass.js +0 -104
- package/dist/tools/BaseToolClass.js.map +0 -1
- package/dist/tools/base.d.ts +0 -37
- package/dist/tools/base.d.ts.map +0 -1
- package/dist/tools/base.js +0 -60
- package/dist/tools/base.js.map +0 -1
- package/docs/user-guides/CLAUDE_DESKTOP_SETUP.md +0 -187
package/README.md
CHANGED
|
@@ -7,9 +7,9 @@
|
|
|
7
7
|
A comprehensive Model Context Protocol (MCP) server for WordPress management through the WordPress REST API v2. Completely written in TypeScript with modular architecture and 95%+ test coverage.
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/mcp-wordpress)
|
|
10
|
-
[](https://github.com/
|
|
11
|
-
[](https://github.com/
|
|
12
|
-
[](https://github.com/
|
|
10
|
+
[](https://github.com/docdyhr/mcp-wordpress)
|
|
11
|
+
[](https://github.com/docdyhr/mcp-wordpress)
|
|
12
|
+
[](https://github.com/docdyhr/mcp-wordpress/blob/main/REFACTORING.md)
|
|
13
13
|
|
|
14
14
|
## ๐ Features
|
|
15
15
|
|
|
@@ -30,36 +30,28 @@ A comprehensive Model Context Protocol (MCP) server for WordPress management thr
|
|
|
30
30
|
|
|
31
31
|
## โก Quick Start
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
Choose your preferred setup method:
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
- ๐ **[NPX Setup](docs/user-guides/NPX_SETUP.md)** - Zero installation, always latest version
|
|
36
|
+
- ๐ป **[NPM Setup](docs/user-guides/NPM_SETUP.md)** - Local development and customization
|
|
37
|
+
- ๐ณ **[Docker Setup](docs/user-guides/DOCKER_SETUP.md)** - Containerized deployment
|
|
38
|
+
- ๐ฆ **[DTX Setup](docs/user-guides/DTX_SETUP.md)** - Claude Desktop Extension package
|
|
39
|
+
|
|
40
|
+
### Ultra-Quick NPX Start
|
|
36
41
|
|
|
37
42
|
```bash
|
|
38
|
-
# Run directly with NPX
|
|
39
|
-
npx mcp-wordpress
|
|
43
|
+
# Run directly with NPX (recommended)
|
|
44
|
+
npx -y mcp-wordpress
|
|
40
45
|
|
|
41
46
|
# Or install globally
|
|
42
47
|
npm install -g mcp-wordpress
|
|
43
48
|
mcp-wordpress
|
|
44
49
|
```
|
|
45
50
|
|
|
46
|
-
### Option 2: Local Development
|
|
47
|
-
|
|
48
|
-
```bash
|
|
49
|
-
git clone https://github.com/thomasdyhr/mcp-wordpress.git
|
|
50
|
-
cd mcp-wordpress
|
|
51
|
-
npm install
|
|
52
|
-
npm run setup
|
|
53
|
-
npm start
|
|
54
|
-
```
|
|
55
|
-
|
|
56
51
|
### Setup Wizard
|
|
57
52
|
|
|
58
53
|
```bash
|
|
59
|
-
# For
|
|
60
|
-
npx mcp-wordpress setup
|
|
61
|
-
|
|
62
|
-
# For local installation
|
|
54
|
+
# For any installation method
|
|
63
55
|
npm run setup
|
|
64
56
|
```
|
|
65
57
|
|
|
@@ -128,17 +120,17 @@ We've implemented a **comprehensive performance monitoring system**, **intellige
|
|
|
128
120
|
- [API Documentation](./docs/api/README.md)
|
|
129
121
|
- [Docker Deployment Guide](./docs/DOCKER.md)
|
|
130
122
|
|
|
131
|
-
## ๐ Authentication & Testing Status (v1.2.
|
|
123
|
+
## ๐ Authentication & Testing Status (v1.2.4+)
|
|
132
124
|
|
|
133
125
|
โ
**Application Passwords** - Tested and working perfectly
|
|
134
126
|
โ
**JWT Authentication** - Supported with plugin
|
|
135
127
|
โ
**Basic Authentication** - Development ready
|
|
136
128
|
โ
**API Key Authentication** - Plugin-based support
|
|
137
|
-
โ
**
|
|
138
|
-
โ
**Multi-Site Tests** - 100% success rate (3/3 sites verified)
|
|
129
|
+
โ
**Main Test Suite** - 100% success rate (144/144 tests passing)
|
|
139
130
|
โ
**Security Tests** - 100% success rate (40/40 tests passing)
|
|
140
131
|
โ
**Performance Tests** - 100% success rate (8/8 tests passing)
|
|
141
132
|
โ
**Tool Tests** - 100% success rate (14/14 tools working)
|
|
133
|
+
โ
**CI/CD Pipeline** - Fully functional with automated publishing
|
|
142
134
|
|
|
143
135
|
The setup wizard guides you through:
|
|
144
136
|
|
|
@@ -147,55 +139,47 @@ The setup wizard guides you through:
|
|
|
147
139
|
- Connection testing
|
|
148
140
|
- Claude Desktop configuration
|
|
149
141
|
|
|
150
|
-
## ๐
|
|
142
|
+
## ๐ Claude Desktop Integration
|
|
151
143
|
|
|
152
|
-
###
|
|
144
|
+
### ๐ Complete Setup Guides
|
|
153
145
|
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
```text
|
|
157
|
-
Set up the MCP WordPress server using NPX for my Claude Desktop.
|
|
146
|
+
For detailed setup instructions, see our comprehensive guides:
|
|
158
147
|
|
|
159
|
-
|
|
160
|
-
-
|
|
161
|
-
-
|
|
148
|
+
- **[NPX Setup Guide](docs/user-guides/NPX_SETUP.md)** - Zero installation method
|
|
149
|
+
- **[NPM Setup Guide](docs/user-guides/NPM_SETUP.md)** - Local development
|
|
150
|
+
- **[Docker Setup Guide](docs/user-guides/DOCKER_SETUP.md)** - Containerized deployment
|
|
151
|
+
- **[DTX Setup Guide](docs/user-guides/DTX_SETUP.md)** - Desktop Extension package
|
|
162
152
|
|
|
163
|
-
|
|
164
|
-
1. Help me create a WordPress Application Password
|
|
165
|
-
2. Configure my Claude Desktop mcp.json file with the NPX command
|
|
166
|
-
3. Test the connection to make sure everything works
|
|
167
|
-
4. Show me how to use the WordPress tools
|
|
153
|
+
### ๐ค Claude Desktop Quick Prompts
|
|
168
154
|
|
|
169
|
-
|
|
155
|
+
**For NPX Users (Easiest):**
|
|
156
|
+
```text
|
|
157
|
+
Set up MCP WordPress using NPX. My site: [YOUR_SITE_URL], username: [YOUR_USERNAME]. Help with application password creation and Claude Desktop configuration.
|
|
170
158
|
```
|
|
171
159
|
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
For local development and customization:
|
|
175
|
-
|
|
160
|
+
**For Local Development:**
|
|
176
161
|
```text
|
|
177
|
-
|
|
162
|
+
Set up MCP WordPress locally from GitHub. Clone, install, configure for my site: [YOUR_SITE_URL], username: [YOUR_USERNAME]. Include Claude Desktop setup.
|
|
163
|
+
```
|
|
178
164
|
|
|
179
|
-
|
|
180
|
-
1. Clone the repository to an appropriate directory
|
|
181
|
-
2. Install all dependencies
|
|
182
|
-
3. Run the setup wizard and help me configure my WordPress connection
|
|
183
|
-
4. Test the connection to make sure everything works
|
|
184
|
-
5. Set up the Claude Desktop MCP configuration
|
|
185
|
-
6. Run a quick test to verify all tools are working
|
|
165
|
+
**Replace placeholders with your actual WordPress details - Claude will handle the rest!**
|
|
186
166
|
|
|
187
|
-
|
|
188
|
-
My WordPress username is: [YOUR_USERNAME]
|
|
167
|
+
## ๐ง Configuration
|
|
189
168
|
|
|
190
|
-
|
|
191
|
-
```
|
|
169
|
+
The MCP WordPress server supports multiple configuration methods to fit different needs.
|
|
192
170
|
|
|
193
|
-
|
|
171
|
+
### Setup Methods Overview
|
|
194
172
|
|
|
195
|
-
|
|
173
|
+
| Method | Best For | Configuration File |
|
|
174
|
+
|--------|----------|---------------------|
|
|
175
|
+
| **NPX** | Quick start, always latest | Claude Desktop config only |
|
|
176
|
+
| **NPM** | Local development | `.env` or Claude Desktop config |
|
|
177
|
+
| **Docker** | Production deployment | Environment variables or mounted config |
|
|
178
|
+
| **DTX** | Simple GUI setup | DTX config + optional multi-site file |
|
|
196
179
|
|
|
197
|
-
### Environment Variables
|
|
180
|
+
### Environment Variables
|
|
198
181
|
|
|
182
|
+
**Core Configuration:**
|
|
199
183
|
```env
|
|
200
184
|
WORDPRESS_SITE_URL=https://your-wordpress-site.com
|
|
201
185
|
WORDPRESS_USERNAME=your-username
|
|
@@ -204,118 +188,38 @@ WORDPRESS_AUTH_METHOD=app-password
|
|
|
204
188
|
DEBUG=false
|
|
205
189
|
```
|
|
206
190
|
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
```json
|
|
214
|
-
{
|
|
215
|
-
"mcpServers": {
|
|
216
|
-
"mcp-wordpress": {
|
|
217
|
-
"command": "npx",
|
|
218
|
-
"args": ["mcp-wordpress"],
|
|
219
|
-
"env": {
|
|
220
|
-
"WORDPRESS_SITE_URL": "https://your-site.com",
|
|
221
|
-
"WORDPRESS_USERNAME": "your-username",
|
|
222
|
-
"WORDPRESS_APP_PASSWORD": "your-app-password",
|
|
223
|
-
"WORDPRESS_AUTH_METHOD": "app-password"
|
|
224
|
-
}
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
#### Option 2: Global Installation
|
|
231
|
-
|
|
232
|
-
```json
|
|
233
|
-
{
|
|
234
|
-
"mcpServers": {
|
|
235
|
-
"mcp-wordpress": {
|
|
236
|
-
"command": "mcp-wordpress",
|
|
237
|
-
"env": {
|
|
238
|
-
"WORDPRESS_SITE_URL": "https://your-site.com",
|
|
239
|
-
"WORDPRESS_USERNAME": "your-username",
|
|
240
|
-
"WORDPRESS_APP_PASSWORD": "your-app-password",
|
|
241
|
-
"WORDPRESS_AUTH_METHOD": "app-password"
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
}
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
#### Option 3: Local Development
|
|
191
|
+
**๐ Detailed Configuration Guides:**
|
|
192
|
+
- **[NPX Configuration](docs/user-guides/NPX_SETUP.md#quick-start)** - Claude Desktop environment variables
|
|
193
|
+
- **[NPM Configuration](docs/user-guides/NPM_SETUP.md#configuration)** - Local `.env` file setup
|
|
194
|
+
- **[Docker Configuration](docs/user-guides/DOCKER_SETUP.md#configuration)** - Container environment setup
|
|
195
|
+
- **[DTX Configuration](docs/user-guides/DTX_SETUP.md#configuration)** - Extension package setup
|
|
249
196
|
|
|
250
|
-
|
|
251
|
-
{
|
|
252
|
-
"mcpServers": {
|
|
253
|
-
"mcp-wordpress": {
|
|
254
|
-
"command": "node",
|
|
255
|
-
"args": ["/path/to/mcp-wordpress/dist/index.js"],
|
|
256
|
-
"env": {
|
|
257
|
-
"WORDPRESS_SITE_URL": "https://your-site.com",
|
|
258
|
-
"WORDPRESS_USERNAME": "your-username",
|
|
259
|
-
"WORDPRESS_APP_PASSWORD": "your-app-password",
|
|
260
|
-
"WORDPRESS_AUTH_METHOD": "app-password"
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
}
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
#### Using .env File (Any Option)
|
|
268
|
-
|
|
269
|
-
If you prefer to use a `.env` file instead of environment variables in the config:
|
|
270
|
-
|
|
271
|
-
```json
|
|
272
|
-
{
|
|
273
|
-
"mcpServers": {
|
|
274
|
-
"mcp-wordpress": {
|
|
275
|
-
"command": "npx",
|
|
276
|
-
"args": ["mcp-wordpress"],
|
|
277
|
-
"env": {
|
|
278
|
-
"NODE_ENV": "production"
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
### Claude Desktop Configuration File Locations
|
|
197
|
+
### Claude Desktop Integration
|
|
286
198
|
|
|
199
|
+
**Configuration File Locations:**
|
|
287
200
|
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
288
201
|
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
289
202
|
- **Linux**: `~/.config/Claude/claude_desktop_config.json`
|
|
290
203
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
1. **Create or locate your Claude Desktop config file** at the path above
|
|
294
|
-
2. **Add the MCP server configuration** using one of the options above
|
|
295
|
-
3. **Restart Claude Desktop** for changes to take effect
|
|
296
|
-
4. **Verify the connection** - you should see WordPress tools available in Claude Desktop
|
|
297
|
-
|
|
298
|
-
### Example Complete Configuration
|
|
299
|
-
|
|
300
|
-
Here's a complete `claude_desktop_config.json` file with MCP WordPress:
|
|
301
|
-
|
|
204
|
+
**Quick NPX Example:**
|
|
302
205
|
```json
|
|
303
206
|
{
|
|
304
207
|
"mcpServers": {
|
|
305
208
|
"mcp-wordpress": {
|
|
306
209
|
"command": "npx",
|
|
307
|
-
"args": ["mcp-wordpress"],
|
|
210
|
+
"args": ["-y", "mcp-wordpress"],
|
|
308
211
|
"env": {
|
|
309
212
|
"WORDPRESS_SITE_URL": "https://your-site.com",
|
|
310
213
|
"WORDPRESS_USERNAME": "your-username",
|
|
311
|
-
"WORDPRESS_APP_PASSWORD": "your-app-password"
|
|
312
|
-
"WORDPRESS_AUTH_METHOD": "app-password"
|
|
214
|
+
"WORDPRESS_APP_PASSWORD": "your-app-password"
|
|
313
215
|
}
|
|
314
216
|
}
|
|
315
217
|
}
|
|
316
218
|
}
|
|
317
219
|
```
|
|
318
220
|
|
|
221
|
+
๐ **See the detailed setup guides above for complete configuration examples for each method.**
|
|
222
|
+
|
|
319
223
|
## ๐ Multi-Site Configuration
|
|
320
224
|
|
|
321
225
|
MCP WordPress Server supports managing multiple WordPress sites from a single configuration. This is perfect for agencies, developers managing multiple client sites, or anyone with multiple WordPress installations.
|
|
@@ -603,12 +507,14 @@ WORDPRESS_API_KEY=your-api-key
|
|
|
603
507
|
|
|
604
508
|
### Current Test Status โ
|
|
605
509
|
|
|
606
|
-
- **
|
|
607
|
-
- **
|
|
608
|
-
- **
|
|
609
|
-
- **
|
|
610
|
-
- **
|
|
611
|
-
- **
|
|
510
|
+
- **Main Test Suite**: 144/144 passed (100%) - Optimized for CI/CD reliability
|
|
511
|
+
- **TypeScript Build Tests**: 21/21 passed (100%)
|
|
512
|
+
- **Security Tests**: 40/40 passed (100%) - Comprehensive vulnerability testing
|
|
513
|
+
- **Configuration Tests**: 27/27 passed (100%) - Multi-site validation
|
|
514
|
+
- **Property-Based Tests**: 12/12 passed (100%) - Generative testing
|
|
515
|
+
- **Performance Tests**: 8/8 passed (100%) - Regression detection
|
|
516
|
+
- **Contract Tests**: Available via dedicated command when needed
|
|
517
|
+
- **Overall Success Rate**: 100% - All critical functionality verified
|
|
612
518
|
|
|
613
519
|
### Test Commands
|
|
614
520
|
|
|
@@ -781,43 +687,61 @@ DEBUG=true npm run dev
|
|
|
781
687
|
|
|
782
688
|
## ๐ณ Docker Support
|
|
783
689
|
|
|
690
|
+
Docker support with production-ready containers and Claude Desktop integration.
|
|
691
|
+
|
|
784
692
|
### Quick Docker Start
|
|
785
693
|
|
|
786
694
|
```bash
|
|
787
|
-
#
|
|
788
|
-
docker run -
|
|
789
|
-
--name mcp-wordpress \
|
|
695
|
+
# Single-site with environment variables
|
|
696
|
+
docker run --rm -i \
|
|
790
697
|
-e WORDPRESS_SITE_URL=https://your-site.com \
|
|
791
698
|
-e WORDPRESS_USERNAME=your-username \
|
|
792
699
|
-e WORDPRESS_APP_PASSWORD=your-app-password \
|
|
793
|
-
|
|
700
|
+
docdyhr/mcp-wordpress:latest
|
|
794
701
|
|
|
795
|
-
#
|
|
796
|
-
|
|
797
|
-
|
|
702
|
+
# Multi-site with config file
|
|
703
|
+
docker run --rm -i \
|
|
704
|
+
-v ./mcp-wordpress.config.json:/app/mcp-wordpress.config.json:ro \
|
|
705
|
+
docdyhr/mcp-wordpress:latest
|
|
798
706
|
```
|
|
799
707
|
|
|
800
|
-
###
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
708
|
+
### Claude Desktop Docker Integration
|
|
709
|
+
|
|
710
|
+
**Single-Site:**
|
|
711
|
+
```json
|
|
712
|
+
{
|
|
713
|
+
"mcpServers": {
|
|
714
|
+
"mcp-wordpress": {
|
|
715
|
+
"command": "docker",
|
|
716
|
+
"args": [
|
|
717
|
+
"run", "--rm", "-i",
|
|
718
|
+
"-e", "WORDPRESS_SITE_URL=https://your-site.com",
|
|
719
|
+
"-e", "WORDPRESS_USERNAME=your-username",
|
|
720
|
+
"-e", "WORDPRESS_APP_PASSWORD=your-app-password",
|
|
721
|
+
"docdyhr/mcp-wordpress:latest"
|
|
722
|
+
]
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
```
|
|
727
|
+
|
|
728
|
+
**Multi-Site:**
|
|
729
|
+
```json
|
|
730
|
+
{
|
|
731
|
+
"mcpServers": {
|
|
732
|
+
"mcp-wordpress": {
|
|
733
|
+
"command": "docker",
|
|
734
|
+
"args": [
|
|
735
|
+
"run", "--rm", "-i",
|
|
736
|
+
"-v", "/path/to/mcp-wordpress.config.json:/app/mcp-wordpress.config.json:ro",
|
|
737
|
+
"docdyhr/mcp-wordpress:latest"
|
|
738
|
+
]
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
}
|
|
818
742
|
```
|
|
819
743
|
|
|
820
|
-
**๐
|
|
744
|
+
**๐ Complete Docker Guide**: [docs/user-guides/DOCKER_SETUP.md](docs/user-guides/DOCKER_SETUP.md)
|
|
821
745
|
|
|
822
746
|
## ๐งช Contract Testing with Live WordPress
|
|
823
747
|
|
|
@@ -888,3 +812,107 @@ npm run test:contracts
|
|
|
888
812
|
- One-command deployment to any Docker environment
|
|
889
813
|
|
|
890
814
|
**๐ Read the full release notes for all details!**
|
|
815
|
+
|
|
816
|
+
## ๐ Release & Publishing
|
|
817
|
+
|
|
818
|
+
This project uses automated semantic versioning and publishing to NPM and Docker Hub.
|
|
819
|
+
|
|
820
|
+
### ๐ฆ Installation Options
|
|
821
|
+
|
|
822
|
+
**NPM Package:**
|
|
823
|
+
|
|
824
|
+
```bash
|
|
825
|
+
# Latest stable version
|
|
826
|
+
npm install -g mcp-wordpress
|
|
827
|
+
|
|
828
|
+
# Specific version
|
|
829
|
+
npm install -g mcp-wordpress@1.2.2
|
|
830
|
+
|
|
831
|
+
# Use with npx (no installation)
|
|
832
|
+
npx mcp-wordpress
|
|
833
|
+
```
|
|
834
|
+
|
|
835
|
+
**Docker Images:**
|
|
836
|
+
|
|
837
|
+
```bash
|
|
838
|
+
# Latest stable version
|
|
839
|
+
docker pull docdyhr/mcp-wordpress:latest
|
|
840
|
+
|
|
841
|
+
# Specific version
|
|
842
|
+
docker pull docdyhr/mcp-wordpress:1.2.2
|
|
843
|
+
|
|
844
|
+
# Test container (interactive)
|
|
845
|
+
docker run --rm -i docdyhr/mcp-wordpress:latest
|
|
846
|
+
```
|
|
847
|
+
|
|
848
|
+
### ๐ท๏ธ Release Process
|
|
849
|
+
|
|
850
|
+
**Automated Releases:**
|
|
851
|
+
|
|
852
|
+
- Releases are automatically created when conventional commits are pushed to the `main` branch
|
|
853
|
+
- Semantic versioning determines the version bump automatically
|
|
854
|
+
- NPM and Docker Hub publishing happens automatically on release
|
|
855
|
+
|
|
856
|
+
**Conventional Commit Format:**
|
|
857
|
+
|
|
858
|
+
```bash
|
|
859
|
+
# Patch release (1.2.2 โ 1.2.4)
|
|
860
|
+
fix: resolve authentication timeout issue
|
|
861
|
+
|
|
862
|
+
# Minor release (1.2.2 โ 1.3.0)
|
|
863
|
+
feat: add new performance monitoring tools
|
|
864
|
+
|
|
865
|
+
# Major release (1.2.2 โ 2.0.0)
|
|
866
|
+
feat!: redesign MCP tool interface
|
|
867
|
+
BREAKING CHANGE: tool parameter structure has changed
|
|
868
|
+
```
|
|
869
|
+
|
|
870
|
+
**Manual Release (if needed):**
|
|
871
|
+
|
|
872
|
+
```bash
|
|
873
|
+
# Test release locally
|
|
874
|
+
npm run release:dry
|
|
875
|
+
|
|
876
|
+
# Create release manually (requires proper permissions)
|
|
877
|
+
npm run release
|
|
878
|
+
```
|
|
879
|
+
|
|
880
|
+
### ๐ Release Checklist
|
|
881
|
+
|
|
882
|
+
For contributors planning releases:
|
|
883
|
+
|
|
884
|
+
1. **Pre-Release Validation:**
|
|
885
|
+
- โ
All tests passing (`npm test`)
|
|
886
|
+
- โ
Documentation updated
|
|
887
|
+
- โ
Performance benchmarks within acceptable range
|
|
888
|
+
- โ
Security audit clean (`npm audit`)
|
|
889
|
+
|
|
890
|
+
2. **Commit with Conventional Format:**
|
|
891
|
+
|
|
892
|
+
```bash
|
|
893
|
+
git add .
|
|
894
|
+
git commit -m "feat: add new functionality"
|
|
895
|
+
git push origin main
|
|
896
|
+
```
|
|
897
|
+
|
|
898
|
+
3. **Automated Process Handles:**
|
|
899
|
+
- ๐ Generate release notes
|
|
900
|
+
- ๐ท๏ธ Create GitHub release
|
|
901
|
+
- ๐ฆ Publish to NPM with provenance
|
|
902
|
+
- ๐ณ Build and push Docker images (multi-arch)
|
|
903
|
+
- ๐ Update CHANGELOG.md
|
|
904
|
+
- ๐ Update Docker Hub description
|
|
905
|
+
|
|
906
|
+
### ๐ Distribution Channels
|
|
907
|
+
|
|
908
|
+
- **NPM:** [`mcp-wordpress`](https://www.npmjs.com/package/mcp-wordpress)
|
|
909
|
+
- **Docker Hub:** [`docdyhr/mcp-wordpress`](https://hub.docker.com/r/docdyhr/mcp-wordpress)
|
|
910
|
+
- **GitHub Releases:** [Latest releases](https://github.com/docdyhr/mcp-wordpress/releases)
|
|
911
|
+
|
|
912
|
+
---
|
|
913
|
+
|
|
914
|
+
## ๐ Acknowledgments
|
|
915
|
+
|
|
916
|
+
Special thanks to **[Stephan Ferraro](https://github.com/ferraro)** for the upstream main project that inspired this implementation.
|
|
917
|
+
|
|
918
|
+
> *"We are all standing on the shoulders of giants"*
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Intelligent cache invalidation strategies for WordPress MCP Server
|
|
3
3
|
* Implements event-based and pattern-based invalidation
|
|
4
4
|
*/
|
|
5
|
-
import { HttpCacheWrapper } from
|
|
5
|
+
import { HttpCacheWrapper } from "./HttpCacheWrapper.js";
|
|
6
6
|
export interface InvalidationRule {
|
|
7
7
|
trigger: string;
|
|
8
8
|
patterns: string[];
|
|
@@ -10,7 +10,7 @@ export interface InvalidationRule {
|
|
|
10
10
|
cascade?: boolean;
|
|
11
11
|
}
|
|
12
12
|
export interface InvalidationEvent {
|
|
13
|
-
type:
|
|
13
|
+
type: "create" | "update" | "delete";
|
|
14
14
|
resource: string;
|
|
15
15
|
id?: number | undefined;
|
|
16
16
|
siteId: string;
|
|
@@ -37,7 +37,7 @@ export declare class CacheInvalidation {
|
|
|
37
37
|
/**
|
|
38
38
|
* Invalidate cache for specific resource
|
|
39
39
|
*/
|
|
40
|
-
invalidateResource(resource: string, id?: number, type?:
|
|
40
|
+
invalidateResource(resource: string, id?: number, type?: "create" | "update" | "delete"): Promise<void>;
|
|
41
41
|
/**
|
|
42
42
|
* Setup default invalidation rules
|
|
43
43
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CacheInvalidation.d.ts","sourceRoot":"","sources":["../../src/cache/CacheInvalidation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ;AAED;;GAEG;AACH,qBAAa,iBAAiB;IAKhB,OAAO,CAAC,SAAS;IAJ7B,OAAO,CAAC,iBAAiB,CAA8C;IACvE,OAAO,CAAC,UAAU,CAA2B;IAC7C,OAAO,CAAC,UAAU,CAAS;gBAEP,SAAS,EAAE,gBAAgB;IAI/C;;OAEG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,GAAG,IAAI;IAO5D;;OAEG;IACG,OAAO,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAQtD;;OAEG;IACG,kBAAkB,CACtB,QAAQ,EAAE,MAAM,EAChB,EAAE,CAAC,EAAE,MAAM,EACX,IAAI,GAAE,QAAQ,GAAG,QAAQ,GAAG,QAAmB,GAC9C,OAAO,CAAC,IAAI,CAAC;IAYhB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAuLzB;;OAEG;YACW,YAAY;IAiB1B;;OAEG;YACW,YAAY;IAU1B;;OAEG;YACW,qBAAqB;
|
|
1
|
+
{"version":3,"file":"CacheInvalidation.d.ts","sourceRoot":"","sources":["../../src/cache/CacheInvalidation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ;AAED;;GAEG;AACH,qBAAa,iBAAiB;IAKhB,OAAO,CAAC,SAAS;IAJ7B,OAAO,CAAC,iBAAiB,CAA8C;IACvE,OAAO,CAAC,UAAU,CAA2B;IAC7C,OAAO,CAAC,UAAU,CAAS;gBAEP,SAAS,EAAE,gBAAgB;IAI/C;;OAEG;IACH,YAAY,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,GAAG,IAAI;IAO5D;;OAEG;IACG,OAAO,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAQtD;;OAEG;IACG,kBAAkB,CACtB,QAAQ,EAAE,MAAM,EAChB,EAAE,CAAC,EAAE,MAAM,EACX,IAAI,GAAE,QAAQ,GAAG,QAAQ,GAAG,QAAmB,GAC9C,OAAO,CAAC,IAAI,CAAC;IAYhB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAuLzB;;OAEG;YACW,YAAY;IAiB1B;;OAEG;YACW,YAAY;IAU1B;;OAEG;YACW,qBAAqB;IA0BnC;;OAEG;IACH,QAAQ,IAAI;QACV,SAAS,EAAE,MAAM,CAAC;QAClB,UAAU,EAAE,MAAM,CAAC;QACnB,UAAU,EAAE,OAAO,CAAC;KACnB;IAWH;;OAEG;IACH,UAAU,IAAI,IAAI;IAIlB;;OAEG;IACH,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,gBAAgB,EAAE,CAAC;CAO/C;AAED;;GAEG;AACH,qBAAa,sBAAsB;IACjC;;OAEG;IACH,MAAM,CAAC,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM;IAIzD;;OAEG;IACH,MAAM,CAAC,oBAAoB,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM;IAI5D;;OAEG;IACH,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM;IAIvD;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM;IAIxD;;OAEG;IACH,MAAM,CAAC,aAAa,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM;CAGtD;AAED;;GAEG;AACH,qBAAa,WAAW;IACV,OAAO,CAAC,SAAS;gBAAT,SAAS,EAAE,gBAAgB;IAE/C;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAMrC;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;IAIrC;;OAEG;IACG,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;CAGjC"}
|