mcp-wordpress 1.3.1 → 1.4.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 +149 -789
- package/dist/mcp-wordpress-1.4.0.tgz +0 -0
- package/docs/DOCKER.md +8 -1
- package/docs/api/README.md +82 -75
- package/docs/api/categories/site.md +2 -0
- package/docs/api/tools/wp_approve_comment.md +0 -6
- package/docs/api/tools/wp_cache_clear.md +5 -14
- package/docs/api/tools/wp_cache_info.md +5 -14
- package/docs/api/tools/wp_cache_stats.md +5 -14
- package/docs/api/tools/wp_cache_warm.md +5 -14
- package/docs/api/tools/wp_create_application_password.md +3 -11
- package/docs/api/tools/wp_create_category.md +3 -11
- package/docs/api/tools/wp_create_comment.md +5 -14
- package/docs/api/tools/wp_create_page.md +5 -13
- package/docs/api/tools/wp_create_post.md +6 -12
- package/docs/api/tools/wp_create_tag.md +3 -11
- package/docs/api/tools/wp_create_user.md +5 -13
- package/docs/api/tools/wp_delete_application_password.md +3 -11
- package/docs/api/tools/wp_delete_category.md +3 -11
- package/docs/api/tools/wp_delete_comment.md +3 -11
- package/docs/api/tools/wp_delete_media.md +3 -10
- package/docs/api/tools/wp_delete_page.md +3 -10
- package/docs/api/tools/wp_delete_post.md +4 -9
- package/docs/api/tools/wp_delete_tag.md +3 -11
- package/docs/api/tools/wp_delete_user.md +3 -10
- package/docs/api/tools/wp_get_application_passwords.md +3 -11
- package/docs/api/tools/wp_get_auth_status.md +3 -11
- package/docs/api/tools/wp_get_category.md +3 -11
- package/docs/api/tools/wp_get_comment.md +3 -11
- package/docs/api/tools/wp_get_current_user.md +3 -11
- package/docs/api/tools/wp_get_media.md +3 -11
- package/docs/api/tools/wp_get_page.md +3 -11
- package/docs/api/tools/wp_get_page_revisions.md +3 -11
- package/docs/api/tools/wp_get_post.md +4 -10
- package/docs/api/tools/wp_get_post_revisions.md +3 -11
- package/docs/api/tools/wp_get_site_settings.md +3 -10
- package/docs/api/tools/wp_get_tag.md +3 -11
- package/docs/api/tools/wp_get_user.md +3 -11
- package/docs/api/tools/wp_list_categories.md +3 -11
- package/docs/api/tools/wp_list_comments.md +3 -11
- package/docs/api/tools/wp_list_media.md +5 -14
- package/docs/api/tools/wp_list_pages.md +5 -14
- package/docs/api/tools/wp_list_posts.md +6 -13
- package/docs/api/tools/wp_list_tags.md +3 -11
- package/docs/api/tools/wp_list_users.md +3 -11
- package/docs/api/tools/wp_performance_alerts.md +7 -17
- package/docs/api/tools/wp_performance_benchmark.md +7 -17
- package/docs/api/tools/wp_performance_export.md +7 -17
- package/docs/api/tools/wp_performance_history.md +7 -17
- package/docs/api/tools/wp_performance_optimize.md +7 -17
- package/docs/api/tools/wp_performance_stats.md +7 -17
- package/docs/api/tools/wp_search_site.md +3 -11
- package/docs/api/tools/wp_spam_comment.md +3 -11
- package/docs/api/tools/wp_switch_auth_method.md +5 -14
- package/docs/api/tools/wp_test_auth.md +3 -11
- package/docs/api/tools/wp_update_category.md +3 -11
- package/docs/api/tools/wp_update_comment.md +5 -14
- package/docs/api/tools/wp_update_media.md +5 -14
- package/docs/api/tools/wp_update_page.md +5 -13
- package/docs/api/tools/wp_update_post.md +6 -12
- package/docs/api/tools/wp_update_site_settings.md +5 -14
- package/docs/api/tools/wp_update_tag.md +3 -11
- package/docs/api/tools/wp_update_user.md +5 -13
- package/docs/api/tools/wp_upload_media.md +5 -13
- package/docs/api/types/WordPressPost.md +0 -2
- package/docs/developer/API_REFERENCE.md +628 -0
- package/docs/developer/ARCHITECTURE.md +374 -0
- package/docs/developer/BUILD_SYSTEM.md +465 -0
- package/docs/developer/CONTRIBUTING.md +463 -0
- package/docs/developer/DEVELOPMENT_SETUP.md +463 -0
- package/docs/developer/GITHUB_ACTIONS_SETUP.md +2 -1
- package/docs/developer/MAINTENANCE.md +5 -5
- package/docs/developer/MIGRATION_GUIDE.md +7 -5
- package/docs/developer/NPM_AUTH_SETUP.md +4 -4
- package/docs/developer/README.md +219 -0
- package/docs/developer/REFACTORING.md +15 -10
- package/docs/developer/RELEASE_PROCESS.md +523 -0
- package/docs/developer/TESTING.md +730 -0
- package/docs/releases/COMMUNITY_ANNOUNCEMENT_v1.1.2.md +9 -3
- package/docs/releases/RELEASE_NOTES_v1.1.2.md +4 -4
- package/docs/user-guides/DOCKER_SETUP.md +2 -2
- package/docs/user-guides/DTX_SETUP.md +3 -3
- package/docs/user-guides/NPX_SETUP.md +2 -2
- package/package.json +2 -2
- package/dist/mcp-wordpress-1.3.1.tgz +0 -0
package/README.md
CHANGED
|
@@ -4,236 +4,61 @@
|
|
|
4
4
|
<img src="images/wordpress-mcp-logo.png" width="50%" alt="WordPress MCP Logo">
|
|
5
5
|
</div>
|
|
6
6
|
|
|
7
|
-
A comprehensive Model Context Protocol (MCP) server for WordPress management through
|
|
7
|
+
A comprehensive Model Context Protocol (MCP) server for WordPress management through Claude Desktop. Manage your WordPress sites with natural language through 59 powerful tools.
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/mcp-wordpress)
|
|
10
10
|
[](https://github.com/docdyhr/mcp-wordpress)
|
|
11
11
|
[](https://github.com/docdyhr/mcp-wordpress)
|
|
12
|
-
[](https://github.com/docdyhr/mcp-wordpress/blob/main/REFACTORING.md)
|
|
13
|
-
|
|
14
|
-
## 🚀 Features
|
|
15
|
-
|
|
16
|
-
- **59 WordPress Management Tools** across 10 categories
|
|
17
|
-
- **⚡ Intelligent Caching System** - Multi-layer response caching with 50-70% performance improvement
|
|
18
|
-
- **📊 Real-Time Performance Monitoring** - Comprehensive metrics, analytics, and optimization insights
|
|
19
|
-
- **📚 Auto-Generated API Documentation** - Complete tool documentation with OpenAPI specification
|
|
20
|
-
- **🐳 Docker Support** - Containerized deployment for production environments
|
|
21
|
-
- **🏗 Modular Architecture** - Manager-based composition pattern (94% code reduction)
|
|
22
|
-
- **Multi-Site Support** - Manage multiple WordPress sites from one configuration
|
|
23
|
-
- **100% TypeScript** - Complete type safety and IntelliSense
|
|
24
|
-
- **🎯 95%+ Test Coverage** - All critical functionality verified and tested
|
|
25
|
-
- **⚡ Performance Optimized** - Intelligent rate limiting and memory management
|
|
26
|
-
- **🔒 Flexible Authentication** - Supports App Passwords, JWT, Basic Auth, API Key
|
|
27
|
-
- **📊 Comprehensive Monitoring** - Structured logging and error tracking
|
|
28
|
-
- **🛠 Production Ready** - Security-reviewed and battle-tested
|
|
29
|
-
- **🔄 100% Backward Compatible** - Zero breaking changes during refactoring
|
|
30
12
|
|
|
31
13
|
## ⚡ Quick Start
|
|
32
14
|
|
|
33
|
-
Choose your
|
|
15
|
+
**Choose your setup method:**
|
|
34
16
|
|
|
35
|
-
- 🚀 **[NPX Setup](docs/user-guides/NPX_SETUP.md)** - Zero installation, always latest
|
|
36
|
-
- 💻 **[NPM Setup](docs/user-guides/NPM_SETUP.md)** - Local development
|
|
17
|
+
- 🚀 **[NPX Setup](docs/user-guides/NPX_SETUP.md)** - Zero installation, always latest (Recommended)
|
|
18
|
+
- 💻 **[NPM Setup](docs/user-guides/NPM_SETUP.md)** - Local development
|
|
37
19
|
- 🐳 **[Docker Setup](docs/user-guides/DOCKER_SETUP.md)** - Containerized deployment
|
|
38
|
-
- 📦 **[DTX Setup](docs/user-guides/DTX_SETUP.md)** - Claude Desktop Extension
|
|
20
|
+
- 📦 **[DTX Setup](docs/user-guides/DTX_SETUP.md)** - Claude Desktop Extension
|
|
39
21
|
|
|
40
|
-
### Ultra-Quick NPX
|
|
22
|
+
### Ultra-Quick Start (NPX)
|
|
41
23
|
|
|
42
24
|
```bash
|
|
43
25
|
# Run directly with NPX (recommended)
|
|
44
26
|
npx -y mcp-wordpress
|
|
45
27
|
|
|
46
|
-
#
|
|
47
|
-
npm install -g mcp-wordpress
|
|
48
|
-
mcp-wordpress
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Setup Wizard
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
# For any installation method
|
|
28
|
+
# Follow the setup wizard
|
|
55
29
|
npm run setup
|
|
56
30
|
```
|
|
57
31
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
Building on v1.2.0's performance monitoring and documentation features, v1.2.1 delivers **100% test reliability**, **enhanced multi-site support**, and **production-ready repository organization**:
|
|
61
|
-
|
|
62
|
-
### ✅ Test Infrastructure Overhaul (v1.2.1)
|
|
63
|
-
|
|
64
|
-
- **🔧 100% Test Success Rate**: Fixed all failing integration and tool tests
|
|
65
|
-
- **🌐 Multi-Site Testing**: Comprehensive test suite for multi-site WordPress configurations
|
|
66
|
-
- **🛡️ Enhanced Security**: Improved .gitignore and credential protection
|
|
67
|
-
- **📋 Test Organization**: Streamlined test scripts and better error reporting
|
|
68
|
-
- **⚡ Quick Validation**: New `npm run test:multisite` command for rapid configuration testing
|
|
69
|
-
|
|
70
|
-
### 🌐 Multi-Site Configuration Enhancements (v1.2.1)
|
|
71
|
-
|
|
72
|
-
- **📝 Complete Documentation**: Comprehensive Claude Desktop setup guide for multi-site usage
|
|
73
|
-
- **🔧 Fixed Configuration**: Resolved JWT authentication validation issues
|
|
74
|
-
- **✅ Site Validation**: Enhanced uniqueness checks for site URLs and IDs
|
|
75
|
-
- **🚀 Quick Testing**: Instant validation of all configured WordPress sites
|
|
76
|
-
- **📊 Status Reporting**: Clear success/failure reporting for each site configuration
|
|
77
|
-
|
|
78
|
-
---
|
|
79
|
-
|
|
80
|
-
## 🏆 Previous Achievement: v1.2.0 - Performance & Documentation Revolution
|
|
81
|
-
|
|
82
|
-
We've implemented a **comprehensive performance monitoring system**, **intelligent caching**, **auto-generated documentation**, and **Docker containerization** - all while maintaining complete backward compatibility:
|
|
83
|
-
|
|
84
|
-
### ⚡ Performance Monitoring System
|
|
85
|
-
|
|
86
|
-
- **📊 Real-Time Metrics**: Response times, cache hit rates, error tracking, system resources
|
|
87
|
-
- **📈 Historical Analytics**: Trend analysis, anomaly detection, predictive insights
|
|
88
|
-
- **🎯 Industry Benchmarks**: Compare against performance standards with optimization recommendations
|
|
89
|
-
- **🚨 Smart Alerts**: Automated performance alerts and threshold monitoring
|
|
90
|
-
- **📋 Comprehensive Reports**: Export detailed performance data in multiple formats
|
|
91
|
-
- **⚙️ Optimization Engine**: AI-powered recommendations for performance improvements
|
|
92
|
-
|
|
93
|
-
### 🏗️ Intelligent Caching System
|
|
94
|
-
|
|
95
|
-
- **🚀 50-70% Performance Improvement**: Reduced API calls for taxonomy and authentication operations
|
|
96
|
-
- **📊 Multi-Layer Architecture**: HTTP response caching + in-memory application cache + intelligent invalidation
|
|
97
|
-
- **🎯 Site-Specific Isolation**: Complete cache separation for multi-site WordPress installations
|
|
98
|
-
- **🔧 Cache Management Tools**: 4 new MCP tools for monitoring and managing cache performance
|
|
99
|
-
- **⏱️ Sub-Millisecond Operations**: Cache hits deliver responses in under 1ms
|
|
100
|
-
|
|
101
|
-
### 📚 Auto-Generated Documentation
|
|
102
|
-
|
|
103
|
-
- **📖 Complete API Documentation**: All 59 tools with examples, parameters, and usage guides
|
|
104
|
-
- **🔧 OpenAPI Specification**: Machine-readable API spec for integration
|
|
105
|
-
- **🔄 Automated CI/CD Pipeline**: Documentation updates automatically on code changes
|
|
106
|
-
- **✅ Quality Validation**: Comprehensive documentation quality checks
|
|
107
|
-
- **🌐 Multi-Format Output**: Markdown, JSON, and OpenAPI formats
|
|
108
|
-
|
|
109
|
-
### 🐳 Docker Containerization
|
|
110
|
-
|
|
111
|
-
- **📦 Production-Ready Images**: Optimized Docker containers for deployment
|
|
112
|
-
- **🔧 Development Environment**: Docker Compose for local development
|
|
113
|
-
- **⚙️ Environment Configuration**: Flexible configuration via environment variables
|
|
114
|
-
- **🚀 Easy Deployment**: One-command deployment to any Docker environment
|
|
115
|
-
|
|
116
|
-
**📚 Complete Documentation**:
|
|
117
|
-
|
|
118
|
-
- [Performance Monitoring Guide](./docs/PERFORMANCE.md)
|
|
119
|
-
- [Caching System Guide](./docs/CACHING.md)
|
|
120
|
-
- [API Documentation](./docs/api/README.md)
|
|
121
|
-
- [Docker Deployment Guide](./docs/DOCKER.md)
|
|
122
|
-
|
|
123
|
-
## 🔐 Authentication & Testing Status (v1.2.4+)
|
|
124
|
-
|
|
125
|
-
✅ **Application Passwords** - Tested and working perfectly
|
|
126
|
-
✅ **JWT Authentication** - Supported with plugin
|
|
127
|
-
✅ **Basic Authentication** - Development ready
|
|
128
|
-
✅ **API Key Authentication** - Plugin-based support
|
|
129
|
-
✅ **Main Test Suite** - 100% success rate (144/144 tests passing)
|
|
130
|
-
✅ **Security Tests** - 100% success rate (40/40 tests passing)
|
|
131
|
-
✅ **Performance Tests** - 100% success rate (8/8 tests passing)
|
|
132
|
-
✅ **Tool Tests** - 100% success rate (14/14 tools working)
|
|
133
|
-
✅ **CI/CD Pipeline** - Fully functional with automated publishing
|
|
134
|
-
|
|
135
|
-
The setup wizard guides you through:
|
|
136
|
-
|
|
137
|
-
- WordPress site configuration
|
|
138
|
-
- Authentication method selection
|
|
139
|
-
- Connection testing
|
|
140
|
-
- Claude Desktop configuration
|
|
141
|
-
|
|
142
|
-
## 🚀 Claude Desktop Integration
|
|
143
|
-
|
|
144
|
-
### 📖 Complete Setup Guides
|
|
145
|
-
|
|
146
|
-
For detailed setup instructions, see our comprehensive guides:
|
|
147
|
-
|
|
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
|
|
152
|
-
|
|
153
|
-
### 🤖 Claude Desktop Quick Prompts
|
|
154
|
-
|
|
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.
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
**For Local Development:**
|
|
161
|
-
```text
|
|
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
|
-
```
|
|
164
|
-
|
|
165
|
-
**Replace placeholders with your actual WordPress details - Claude will handle the rest!**
|
|
166
|
-
|
|
167
|
-
## 🔧 Configuration
|
|
168
|
-
|
|
169
|
-
The MCP WordPress server supports multiple configuration methods to fit different needs.
|
|
170
|
-
|
|
171
|
-
### Setup Methods Overview
|
|
172
|
-
|
|
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 |
|
|
179
|
-
|
|
180
|
-
### Environment Variables
|
|
32
|
+
**Setup takes 2 minutes** - the wizard guides you through WordPress connection and Claude Desktop configuration.
|
|
181
33
|
|
|
182
|
-
|
|
183
|
-
```env
|
|
184
|
-
WORDPRESS_SITE_URL=https://your-wordpress-site.com
|
|
185
|
-
WORDPRESS_USERNAME=your-username
|
|
186
|
-
WORDPRESS_APP_PASSWORD=xxxx xxxx xxxx xxxx xxxx xxxx
|
|
187
|
-
WORDPRESS_AUTH_METHOD=app-password
|
|
188
|
-
DEBUG=false
|
|
189
|
-
```
|
|
190
|
-
|
|
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
|
|
196
|
-
|
|
197
|
-
### Claude Desktop Integration
|
|
34
|
+
## 🚀 Features
|
|
198
35
|
|
|
199
|
-
|
|
200
|
-
- **
|
|
201
|
-
- **
|
|
202
|
-
- **
|
|
36
|
+
### WordPress Management
|
|
37
|
+
- **59 WordPress Tools** - Posts, pages, media, users, comments, categories, tags, site settings
|
|
38
|
+
- **Multi-Site Support** - Manage multiple WordPress sites from one configuration
|
|
39
|
+
- **Flexible Authentication** - App Passwords (recommended), JWT, Basic Auth, API Key
|
|
203
40
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
"mcp-wordpress": {
|
|
209
|
-
"command": "npx",
|
|
210
|
-
"args": ["-y", "mcp-wordpress"],
|
|
211
|
-
"env": {
|
|
212
|
-
"WORDPRESS_SITE_URL": "https://your-site.com",
|
|
213
|
-
"WORDPRESS_USERNAME": "your-username",
|
|
214
|
-
"WORDPRESS_APP_PASSWORD": "your-app-password"
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
```
|
|
41
|
+
### Performance & Monitoring
|
|
42
|
+
- **⚡ Intelligent Caching** - 50-70% performance improvement with multi-layer caching
|
|
43
|
+
- **📊 Real-Time Monitoring** - Performance metrics, analytics, and optimization insights
|
|
44
|
+
- **🔒 Production Ready** - Security-reviewed, 95%+ test coverage, battle-tested
|
|
220
45
|
|
|
221
|
-
|
|
46
|
+
### Developer Experience
|
|
47
|
+
- **100% TypeScript** - Complete type safety and IntelliSense
|
|
48
|
+
- **🐳 Docker Support** - Containerized deployment for production
|
|
49
|
+
- **📚 Auto-Generated Docs** - Complete API documentation with examples
|
|
50
|
+
- **🔄 100% Backward Compatible** - Zero breaking changes
|
|
222
51
|
|
|
223
52
|
## 🌐 Multi-Site Configuration
|
|
224
53
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
### Setting Up Multi-Site Configuration
|
|
228
|
-
|
|
229
|
-
1. **Create a `mcp-wordpress.config.json` file** in your project root:
|
|
54
|
+
Perfect for agencies and developers managing multiple WordPress sites:
|
|
230
55
|
|
|
231
56
|
```json
|
|
232
57
|
{
|
|
233
58
|
"sites": [
|
|
234
59
|
{
|
|
235
|
-
"id": "
|
|
236
|
-
"name": "
|
|
60
|
+
"id": "main-site",
|
|
61
|
+
"name": "Main WordPress Site",
|
|
237
62
|
"config": {
|
|
238
63
|
"WORDPRESS_SITE_URL": "https://site1.com",
|
|
239
64
|
"WORDPRESS_USERNAME": "admin",
|
|
@@ -241,678 +66,213 @@ MCP WordPress Server supports managing multiple WordPress sites from a single co
|
|
|
241
66
|
}
|
|
242
67
|
},
|
|
243
68
|
{
|
|
244
|
-
"id": "
|
|
245
|
-
"name": "
|
|
69
|
+
"id": "client-blog",
|
|
70
|
+
"name": "Client Blog",
|
|
246
71
|
"config": {
|
|
247
|
-
"WORDPRESS_SITE_URL": "https://blog.
|
|
72
|
+
"WORDPRESS_SITE_URL": "https://client-blog.com",
|
|
248
73
|
"WORDPRESS_USERNAME": "editor",
|
|
249
|
-
"WORDPRESS_APP_PASSWORD": "yyyy yyyy yyyy yyyy yyyy yyyy"
|
|
250
|
-
"WORDPRESS_AUTH_METHOD": "app-password"
|
|
251
|
-
}
|
|
252
|
-
},
|
|
253
|
-
{
|
|
254
|
-
"id": "dev",
|
|
255
|
-
"name": "Development Site",
|
|
256
|
-
"config": {
|
|
257
|
-
"WORDPRESS_SITE_URL": "http://localhost:8080",
|
|
258
|
-
"WORDPRESS_USERNAME": "dev_user",
|
|
259
|
-
"WORDPRESS_APP_PASSWORD": "zzzz zzzz zzzz zzzz zzzz zzzz"
|
|
260
|
-
}
|
|
261
|
-
}
|
|
262
|
-
]
|
|
263
|
-
}
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
1. **Configure Claude Desktop for Multi-Site**:
|
|
267
|
-
|
|
268
|
-
```json
|
|
269
|
-
{
|
|
270
|
-
"mcpServers": {
|
|
271
|
-
"mcp-wordpress": {
|
|
272
|
-
"command": "npx",
|
|
273
|
-
"args": ["mcp-wordpress"]
|
|
274
|
-
}
|
|
275
|
-
}
|
|
276
|
-
}
|
|
277
|
-
```
|
|
278
|
-
|
|
279
|
-
Note: When using multi-site configuration, you don't need to specify environment variables in Claude Desktop. The server will read from your `mcp-wordpress.config.json` file.
|
|
280
|
-
|
|
281
|
-
### Using Multi-Site Tools
|
|
282
|
-
|
|
283
|
-
When you have multiple sites configured, all tools require a `site` parameter:
|
|
284
|
-
|
|
285
|
-
```text
|
|
286
|
-
# List posts from site1
|
|
287
|
-
wp_list_posts --site="site1"
|
|
288
|
-
|
|
289
|
-
# Create a post on the blog site
|
|
290
|
-
wp_create_post --site="site2" --title="New Blog Post" --content="Content here"
|
|
291
|
-
|
|
292
|
-
# Get user info from development site
|
|
293
|
-
wp_get_current_user --site="dev"
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
### Important Multi-Site Notes
|
|
297
|
-
|
|
298
|
-
- **Site IDs must be unique** - Each site needs a unique identifier
|
|
299
|
-
- **Security**: The `mcp-wordpress.config.json` file contains sensitive credentials and should NEVER be committed to version control
|
|
300
|
-
- **Default Site**: If only one site is configured, it will be used by default without needing the `--site` parameter
|
|
301
|
-
- **Authentication**: Each site can use different authentication methods (app-password, jwt, basic, api-key)
|
|
302
|
-
|
|
303
|
-
### Example: Managing Multiple Client Sites
|
|
304
|
-
|
|
305
|
-
```json
|
|
306
|
-
{
|
|
307
|
-
"sites": [
|
|
308
|
-
{
|
|
309
|
-
"id": "client-acme",
|
|
310
|
-
"name": "ACME Corporation",
|
|
311
|
-
"config": {
|
|
312
|
-
"WORDPRESS_SITE_URL": "https://acme-corp.com",
|
|
313
|
-
"WORDPRESS_USERNAME": "mcp_admin",
|
|
314
|
-
"WORDPRESS_APP_PASSWORD": "aaaa bbbb cccc dddd eeee ffff"
|
|
315
|
-
}
|
|
316
|
-
},
|
|
317
|
-
{
|
|
318
|
-
"id": "client-tech",
|
|
319
|
-
"name": "TechStartup Blog",
|
|
320
|
-
"config": {
|
|
321
|
-
"WORDPRESS_SITE_URL": "https://blog.techstartup.io",
|
|
322
|
-
"WORDPRESS_USERNAME": "content_manager",
|
|
323
|
-
"WORDPRESS_APP_PASSWORD": "gggg hhhh iiii jjjj kkkk llll"
|
|
324
|
-
}
|
|
325
|
-
},
|
|
326
|
-
{
|
|
327
|
-
"id": "client-shop",
|
|
328
|
-
"name": "Online Shop",
|
|
329
|
-
"config": {
|
|
330
|
-
"WORDPRESS_SITE_URL": "https://shop.example.com",
|
|
331
|
-
"WORDPRESS_USERNAME": "shop_admin",
|
|
332
|
-
"WORDPRESS_APP_PASSWORD": "mmmm nnnn oooo pppp qqqq rrrr",
|
|
333
|
-
"WORDPRESS_AUTH_METHOD": "jwt",
|
|
334
|
-
"WORDPRESS_JWT_SECRET": "your-jwt-secret-here"
|
|
74
|
+
"WORDPRESS_APP_PASSWORD": "yyyy yyyy yyyy yyyy yyyy yyyy"
|
|
335
75
|
}
|
|
336
76
|
}
|
|
337
77
|
]
|
|
338
78
|
}
|
|
339
79
|
```
|
|
340
80
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
```text
|
|
344
|
-
# Check posts across all client sites
|
|
345
|
-
wp_list_posts --site="client-acme" --per_page=5
|
|
346
|
-
wp_list_posts --site="client-tech" --per_page=5
|
|
347
|
-
wp_list_posts --site="client-shop" --per_page=5
|
|
348
|
-
|
|
349
|
-
# Update content on specific sites
|
|
350
|
-
wp_update_post --site="client-acme" --id=123 --title="Updated Title"
|
|
351
|
-
|
|
352
|
-
# Manage media across sites
|
|
353
|
-
wp_list_media --site="client-shop" --media_type="image"
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
## 🛠 Build System
|
|
81
|
+
Use with site parameter: `wp_list_posts --site="main-site"`
|
|
357
82
|
|
|
358
|
-
|
|
83
|
+
📖 **[Complete Multi-Site Setup Guide](docs/user-guides/NPM_SETUP.md#multi-site-configuration)**
|
|
359
84
|
|
|
360
|
-
|
|
361
|
-
# Compile
|
|
362
|
-
npm run build
|
|
363
|
-
|
|
364
|
-
# Watch mode
|
|
365
|
-
npm run build:watch
|
|
366
|
-
|
|
367
|
-
# Type checking
|
|
368
|
-
npm run typecheck
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
### Development
|
|
372
|
-
|
|
373
|
-
```bash
|
|
374
|
-
# Development mode with debug output
|
|
375
|
-
npm run dev
|
|
376
|
-
|
|
377
|
-
# Check status
|
|
378
|
-
npm run status
|
|
379
|
-
|
|
380
|
-
# Re-run setup
|
|
381
|
-
npm run setup
|
|
382
|
-
```
|
|
383
|
-
|
|
384
|
-
## 🔐 Authentication
|
|
85
|
+
## 🔐 Authentication Setup
|
|
385
86
|
|
|
386
87
|
### WordPress Application Passwords (Recommended)
|
|
387
88
|
|
|
388
89
|
1. **WordPress Admin** → **Users** → **Profile**
|
|
389
90
|
2. Scroll to **Application Passwords**
|
|
390
|
-
3. Enter name
|
|
91
|
+
3. Enter name: "MCP WordPress Server"
|
|
391
92
|
4. Click **Add New Application Password**
|
|
392
|
-
5. Copy generated password
|
|
93
|
+
5. Copy the generated password
|
|
393
94
|
|
|
394
|
-
### Alternative
|
|
95
|
+
### Alternative Methods
|
|
96
|
+
- **JWT Authentication** - With JWT plugin
|
|
97
|
+
- **Basic Authentication** - Username/password (dev only)
|
|
98
|
+
- **API Key Authentication** - With API Key plugin
|
|
395
99
|
|
|
396
|
-
|
|
397
|
-
# JWT Authentication (requires JWT plugin)
|
|
398
|
-
WORDPRESS_AUTH_METHOD=jwt
|
|
399
|
-
WORDPRESS_JWT_SECRET=your-jwt-secret
|
|
400
|
-
|
|
401
|
-
# Basic Authentication (not recommended for production)
|
|
402
|
-
WORDPRESS_AUTH_METHOD=basic
|
|
403
|
-
WORDPRESS_PASSWORD=your-actual-password
|
|
404
|
-
|
|
405
|
-
# API Key Authentication (requires API Key plugin)
|
|
406
|
-
WORDPRESS_AUTH_METHOD=api-key
|
|
407
|
-
WORDPRESS_API_KEY=your-api-key
|
|
408
|
-
```
|
|
100
|
+
📖 **[Complete Authentication Guide](docs/user-guides/NPX_SETUP.md#authentication)**
|
|
409
101
|
|
|
410
102
|
## 📋 Available Tools (59 Tools)
|
|
411
103
|
|
|
412
|
-
###
|
|
413
|
-
|
|
414
|
-
-
|
|
415
|
-
-
|
|
416
|
-
- `wp_create_post` - Create new posts
|
|
417
|
-
- `wp_update_post` - Edit posts
|
|
418
|
-
- `wp_delete_post` - Delete posts
|
|
419
|
-
- `wp_get_post_revisions` - Get post revisions
|
|
420
|
-
|
|
421
|
-
### 📄 Pages (6 Tools)
|
|
422
|
-
|
|
423
|
-
- `wp_list_pages` - List pages
|
|
424
|
-
- `wp_get_page` - Get specific page
|
|
425
|
-
- `wp_create_page` - Create new pages
|
|
426
|
-
- `wp_update_page` - Edit pages
|
|
427
|
-
- `wp_delete_page` - Delete pages
|
|
428
|
-
- `wp_get_page_revisions` - Get page revisions
|
|
429
|
-
|
|
430
|
-
### 🖼️ Media (6 Tools)
|
|
431
|
-
|
|
432
|
-
- `wp_list_media` - Browse media library
|
|
433
|
-
- `wp_get_media` - Get media details
|
|
434
|
-
- `wp_upload_media` - Upload files
|
|
435
|
-
- `wp_update_media` - Edit media metadata
|
|
436
|
-
- `wp_delete_media` - Delete media
|
|
437
|
-
- `wp_get_media_sizes` - Get available image sizes
|
|
438
|
-
|
|
439
|
-
### 👥 Users (6 Tools)
|
|
440
|
-
|
|
441
|
-
- `wp_list_users` - List users
|
|
442
|
-
- `wp_get_user` - Get user details
|
|
443
|
-
- `wp_create_user` - Create new users
|
|
444
|
-
- `wp_update_user` - Edit user profiles
|
|
445
|
-
- `wp_delete_user` - Delete users
|
|
446
|
-
- `wp_get_current_user` - Get current user
|
|
447
|
-
|
|
448
|
-
### 💬 Comments (7 Tools)
|
|
449
|
-
|
|
450
|
-
- `wp_list_comments` - List comments
|
|
451
|
-
- `wp_get_comment` - Get comment details
|
|
452
|
-
- `wp_create_comment` - Create new comments
|
|
453
|
-
- `wp_update_comment` - Edit comments
|
|
454
|
-
- `wp_delete_comment` - Delete comments
|
|
455
|
-
- `wp_approve_comment` - Approve comments
|
|
456
|
-
- `wp_spam_comment` - Mark comments as spam
|
|
457
|
-
|
|
458
|
-
### 🏷️ Taxonomies (10 Tools)
|
|
459
|
-
|
|
460
|
-
- `wp_list_categories` - List categories
|
|
461
|
-
- `wp_get_category` - Get category details
|
|
462
|
-
- `wp_create_category` - Create new categories
|
|
463
|
-
- `wp_update_category` - Edit categories
|
|
464
|
-
- `wp_delete_category` - Delete categories
|
|
465
|
-
- `wp_list_tags` - List tags
|
|
466
|
-
- `wp_get_tag` - Get tag details
|
|
467
|
-
- `wp_create_tag` - Create new tags
|
|
468
|
-
- `wp_update_tag` - Edit tags
|
|
469
|
-
- `wp_delete_tag` - Delete tags
|
|
470
|
-
|
|
471
|
-
### ⚙️ Site Management (7 Tools)
|
|
472
|
-
|
|
473
|
-
- `wp_get_site_settings` - Get site settings
|
|
474
|
-
- `wp_update_site_settings` - Update site settings
|
|
475
|
-
- `wp_get_site_stats` - Get site statistics
|
|
476
|
-
- `wp_search_site` - Site-wide search
|
|
477
|
-
- `wp_get_application_passwords` - List app passwords
|
|
478
|
-
- `wp_create_application_password` - Create new app passwords
|
|
479
|
-
- `wp_delete_application_password` - Delete app passwords
|
|
480
|
-
|
|
481
|
-
### 🔐 Authentication (6 Tools)
|
|
482
|
-
|
|
483
|
-
- `wp_test_auth` - Test authentication
|
|
484
|
-
- `wp_get_auth_status` - Get authentication status
|
|
485
|
-
- `wp_start_oauth_flow` - Start OAuth flow
|
|
486
|
-
- `wp_complete_oauth_flow` - Complete OAuth flow
|
|
487
|
-
- `wp_refresh_oauth_token` - Refresh OAuth token
|
|
488
|
-
- `wp_switch_auth_method` - Switch authentication method
|
|
489
|
-
|
|
490
|
-
### ⚡ Cache Management (4 Tools)
|
|
491
|
-
|
|
492
|
-
- `wp_cache_stats` - Get real-time cache performance statistics
|
|
493
|
-
- `wp_cache_clear` - Clear cache entries with optional pattern matching
|
|
494
|
-
- `wp_cache_warm` - Pre-populate cache with essential data
|
|
495
|
-
- `wp_cache_info` - Get detailed cache configuration and status
|
|
496
|
-
|
|
497
|
-
### 📊 Performance Monitoring (6 Tools)
|
|
498
|
-
|
|
499
|
-
- `wp_performance_stats` - Get real-time performance statistics and metrics
|
|
500
|
-
- `wp_performance_history` - Get historical performance data and trends
|
|
501
|
-
- `wp_performance_benchmark` - Compare current performance against industry benchmarks
|
|
502
|
-
- `wp_performance_alerts` - Get performance alerts and anomaly detection results
|
|
503
|
-
- `wp_performance_optimize` - Get optimization recommendations and insights
|
|
504
|
-
- `wp_performance_export` - Export comprehensive performance report
|
|
505
|
-
|
|
506
|
-
## 🧪 Testing
|
|
104
|
+
### Content Management
|
|
105
|
+
- **📝 Posts** (6 tools) - Create, edit, delete, list posts and revisions
|
|
106
|
+
- **📄 Pages** (6 tools) - Manage static pages and revisions
|
|
107
|
+
- **🖼️ Media** (6 tools) - Upload, manage media library and files
|
|
507
108
|
|
|
508
|
-
###
|
|
109
|
+
### User & Community
|
|
110
|
+
- **👥 Users** (6 tools) - User management and profiles
|
|
111
|
+
- **💬 Comments** (7 tools) - Comment moderation and management
|
|
112
|
+
- **🏷️ Taxonomies** (10 tools) - Categories and tags management
|
|
509
113
|
|
|
510
|
-
|
|
511
|
-
- **
|
|
512
|
-
- **
|
|
513
|
-
-
|
|
514
|
-
-
|
|
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
|
|
518
|
-
|
|
519
|
-
### Test Commands
|
|
520
|
-
|
|
521
|
-
```bash
|
|
522
|
-
# Run all tests (improved)
|
|
523
|
-
npm test
|
|
524
|
-
|
|
525
|
-
# Run tests with Docker test environment (recommended)
|
|
526
|
-
npm run test:with-env
|
|
527
|
-
|
|
528
|
-
# Tests with coverage (70% threshold)
|
|
529
|
-
npm run test:coverage
|
|
530
|
-
|
|
531
|
-
# Quick tests
|
|
532
|
-
npm run test:fast
|
|
114
|
+
### Site Management
|
|
115
|
+
- **⚙️ Site Settings** (7 tools) - Site configuration and statistics
|
|
116
|
+
- **🔐 Authentication** (6 tools) - Auth testing and management
|
|
117
|
+
- **⚡ Cache Management** (4 tools) - Performance caching control
|
|
118
|
+
- **📊 Performance Monitoring** (6 tools) - Real-time metrics and optimization
|
|
533
119
|
|
|
534
|
-
|
|
535
|
-
npm run test:security # Security tests
|
|
536
|
-
npm run test:config # Configuration tests
|
|
537
|
-
npm run test:property # Property-based tests
|
|
538
|
-
npm run test:contracts # Contract tests
|
|
539
|
-
npm run test:performance # Performance regression tests
|
|
120
|
+
📖 **[Complete Tool Documentation](docs/api/README.md)**
|
|
540
121
|
|
|
541
|
-
|
|
542
|
-
npm run test:mcp # MCP protocol tests
|
|
543
|
-
npm run test:tools # Tool functionality tests
|
|
544
|
-
npm run test:auth # Authentication tests
|
|
122
|
+
## 🤖 Claude Desktop Integration
|
|
545
123
|
|
|
546
|
-
|
|
547
|
-
npm run test:contracts:live
|
|
124
|
+
### Quick Prompts for Claude
|
|
548
125
|
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
# Manual authentication check
|
|
553
|
-
./scripts/wp-auth-check.sh
|
|
126
|
+
**Setup Help:**
|
|
127
|
+
```text
|
|
128
|
+
Set up MCP WordPress using NPX. My site: https://mysite.com, username: myuser. Help with application password creation and Claude Desktop configuration.
|
|
554
129
|
```
|
|
555
130
|
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
131
|
+
**Content Management:**
|
|
132
|
+
```text
|
|
133
|
+
List my recent WordPress posts, then help me create a new post about [topic] with SEO-optimized content.
|
|
134
|
+
```
|
|
559
135
|
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
136
|
+
**Site Analysis:**
|
|
137
|
+
```text
|
|
138
|
+
Check my WordPress site performance, cache statistics, and provide optimization recommendations.
|
|
139
|
+
```
|
|
563
140
|
|
|
564
|
-
|
|
565
|
-
npm run test:with-env
|
|
141
|
+
### Configuration Example
|
|
566
142
|
|
|
567
|
-
|
|
568
|
-
|
|
143
|
+
```json
|
|
144
|
+
{
|
|
145
|
+
"mcpServers": {
|
|
146
|
+
"mcp-wordpress": {
|
|
147
|
+
"command": "npx",
|
|
148
|
+
"args": ["-y", "mcp-wordpress"],
|
|
149
|
+
"env": {
|
|
150
|
+
"WORDPRESS_SITE_URL": "https://your-site.com",
|
|
151
|
+
"WORDPRESS_USERNAME": "your-username",
|
|
152
|
+
"WORDPRESS_APP_PASSWORD": "your-app-password"
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
569
157
|
```
|
|
570
158
|
|
|
571
|
-
|
|
159
|
+
📖 **[Complete Claude Desktop Setup](docs/user-guides/NPX_SETUP.md)**
|
|
572
160
|
|
|
573
|
-
|
|
574
|
-
- MySQL database
|
|
575
|
-
- Pact broker for contract testing
|
|
576
|
-
- Automated WordPress configuration for API testing
|
|
161
|
+
## 🧪 Testing & Status
|
|
577
162
|
|
|
578
|
-
|
|
163
|
+
### Current Test Status ✅
|
|
164
|
+
- **Main Test Suite**: 207/207 passed (100%)
|
|
165
|
+
- **Security Tests**: 40/40 passed (100%)
|
|
166
|
+
- **Performance Tests**: 8/8 passed (100%)
|
|
167
|
+
- **CI/CD Pipeline**: Fully functional
|
|
579
168
|
|
|
169
|
+
### Test Your Installation
|
|
580
170
|
```bash
|
|
581
171
|
# Check connection status
|
|
582
172
|
npm run status
|
|
583
173
|
|
|
584
|
-
#
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
# Lint code
|
|
588
|
-
npm run lint
|
|
589
|
-
|
|
590
|
-
# Auto-fix linting errors
|
|
591
|
-
npm run lint:fix
|
|
592
|
-
```
|
|
174
|
+
# Run full test suite
|
|
175
|
+
npm test
|
|
593
176
|
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
```diagram
|
|
597
|
-
mcp-wordpress/
|
|
598
|
-
├── src/ # TypeScript source code
|
|
599
|
-
│ ├── index.ts # Main MCP server
|
|
600
|
-
│ ├── server.ts # Server compatibility
|
|
601
|
-
│ ├── types/ # TypeScript definitions
|
|
602
|
-
│ │ ├── wordpress.ts # WordPress API types
|
|
603
|
-
│ │ ├── mcp.ts # MCP protocol types
|
|
604
|
-
│ │ ├── client.ts # Client interface types
|
|
605
|
-
│ │ └── index.ts # Type exports
|
|
606
|
-
│ ├── client/ # WordPress API client
|
|
607
|
-
│ │ ├── api.ts # HTTP client
|
|
608
|
-
│ │ └── auth.ts # Authentication
|
|
609
|
-
│ ├── tools/ # MCP tool implementations
|
|
610
|
-
│ │ ├── posts.ts # Post management
|
|
611
|
-
│ │ ├── pages.ts # Page management
|
|
612
|
-
│ │ ├── media.ts # Media management
|
|
613
|
-
│ │ ├── users.ts # User management
|
|
614
|
-
│ │ ├── comments.ts # Comment management
|
|
615
|
-
│ │ ├── taxonomies.ts # Categories/Tags
|
|
616
|
-
│ │ ├── site.ts # Site settings
|
|
617
|
-
│ │ └── auth.ts # Authentication
|
|
618
|
-
│ └── utils/ # Utility functions
|
|
619
|
-
│ └── debug.ts # Debug logger
|
|
620
|
-
├── dist/ # Compiled JavaScript files
|
|
621
|
-
├── bin/ # Utility scripts
|
|
622
|
-
│ ├── setup.js # Setup wizard
|
|
623
|
-
│ └── status.js # Status checker
|
|
624
|
-
├── tests/ # Test suite
|
|
625
|
-
├── scripts/ # Build and test scripts
|
|
626
|
-
├── tsconfig.json # TypeScript configuration
|
|
627
|
-
├── jest.config.json # Jest test configuration
|
|
628
|
-
└── package.json # Node.js project configuration
|
|
177
|
+
# Quick validation
|
|
178
|
+
npm run test:fast
|
|
629
179
|
```
|
|
630
180
|
|
|
631
|
-
## 💡 TypeScript Features
|
|
632
|
-
|
|
633
|
-
- **Complete Type Safety** - Compile-time validation
|
|
634
|
-
- **IntelliSense Support** - Better IDE integration
|
|
635
|
-
- **Type-safe API Client** - Typed HTTP methods
|
|
636
|
-
- **Comprehensive WordPress Types** - 400+ lines of precise definitions
|
|
637
|
-
- **MCP Protocol Types** - Tool definitions and handlers
|
|
638
|
-
- **Enhanced Error Handling** - Typed exceptions
|
|
639
|
-
- **Source Maps** - Debugging support
|
|
640
|
-
|
|
641
|
-
## 🔧 WordPress Requirements
|
|
642
|
-
|
|
643
|
-
- **WordPress 5.0+** with REST API enabled
|
|
644
|
-
- **HTTPS** (recommended for production)
|
|
645
|
-
- **User with appropriate permissions**
|
|
646
|
-
- **Application Passwords** enabled (WordPress 5.6+)
|
|
647
|
-
|
|
648
|
-
### WordPress User Roles
|
|
649
|
-
|
|
650
|
-
| Role | Access |
|
|
651
|
-
|------|--------|
|
|
652
|
-
| **Administrator** | Full access to all functions |
|
|
653
|
-
| **Editor** | Posts, pages, comments, media |
|
|
654
|
-
| **Author** | Own posts and media |
|
|
655
|
-
| **Contributor** | Own posts (drafts only) |
|
|
656
|
-
| **Subscriber** | Read only |
|
|
657
|
-
|
|
658
181
|
## 🐛 Troubleshooting
|
|
659
182
|
|
|
660
183
|
### Common Issues
|
|
661
184
|
|
|
662
185
|
1. **"Cannot connect to WordPress"**
|
|
663
|
-
-
|
|
664
|
-
-
|
|
665
|
-
- Test: `curl https://your-site.com/wp-json/wp/v2/`
|
|
186
|
+
- Verify `WORDPRESS_SITE_URL`
|
|
187
|
+
- Test REST API: `curl https://your-site.com/wp-json/wp/v2/`
|
|
666
188
|
|
|
667
189
|
2. **"Authentication failed"**
|
|
668
|
-
-
|
|
190
|
+
- Check username and application password
|
|
669
191
|
- Ensure Application Passwords are enabled
|
|
670
|
-
-
|
|
192
|
+
- Run `npm run setup` to reconfigure
|
|
671
193
|
|
|
672
|
-
3. **"
|
|
673
|
-
-
|
|
674
|
-
-
|
|
675
|
-
|
|
676
|
-
### Debug Logs
|
|
194
|
+
3. **"Tools not appearing in Claude"**
|
|
195
|
+
- Restart Claude Desktop after configuration
|
|
196
|
+
- Check Claude Desktop config file format
|
|
677
197
|
|
|
198
|
+
### Get Help
|
|
678
199
|
```bash
|
|
200
|
+
# Debug mode
|
|
679
201
|
DEBUG=true npm run dev
|
|
680
|
-
```
|
|
681
|
-
|
|
682
|
-
## 📚 API Documentation
|
|
683
|
-
|
|
684
|
-
- [WordPress REST API](https://developer.wordpress.org/rest-api/)
|
|
685
|
-
- [Model Context Protocol](https://modelcontextprotocol.io/)
|
|
686
|
-
- [TypeScript Handbook](https://www.typescriptlang.org/docs/)
|
|
687
|
-
|
|
688
|
-
## 🐳 Docker Support
|
|
689
202
|
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
### Quick Docker Start
|
|
693
|
-
|
|
694
|
-
```bash
|
|
695
|
-
# Single-site with environment variables
|
|
696
|
-
docker run --rm -i \
|
|
697
|
-
-e WORDPRESS_SITE_URL=https://your-site.com \
|
|
698
|
-
-e WORDPRESS_USERNAME=your-username \
|
|
699
|
-
-e WORDPRESS_APP_PASSWORD=your-app-password \
|
|
700
|
-
docdyhr/mcp-wordpress:latest
|
|
701
|
-
|
|
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
|
|
706
|
-
```
|
|
707
|
-
|
|
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
|
-
}
|
|
742
|
-
```
|
|
743
|
-
|
|
744
|
-
**📖 Complete Docker Guide**: [docs/user-guides/DOCKER_SETUP.md](docs/user-guides/DOCKER_SETUP.md)
|
|
745
|
-
|
|
746
|
-
## 🧪 Contract Testing with Live WordPress
|
|
747
|
-
|
|
748
|
-
Test the MCP server against a real WordPress instance using our automated testing setup:
|
|
749
|
-
|
|
750
|
-
```bash copy
|
|
751
|
-
# Automated live contract testing (recommended)
|
|
752
|
-
npm run test:contracts:live
|
|
753
|
-
```
|
|
754
|
-
|
|
755
|
-
This command will:
|
|
756
|
-
|
|
757
|
-
- 🐳 Start isolated WordPress + MySQL containers (port 8081)
|
|
758
|
-
- ⚙️ Auto-configure WordPress with test data and authentication
|
|
759
|
-
- 🧪 Run contract tests against the live WordPress API
|
|
760
|
-
- 🧹 Clean up automatically when done
|
|
761
|
-
|
|
762
|
-
**Features:**
|
|
763
|
-
|
|
764
|
-
- **Zero Conflicts**: Uses isolated containers with separate ports
|
|
765
|
-
- **Fully Automated**: WordPress installation, user creation, and app password generation
|
|
766
|
-
- **Real API Testing**: Validates actual WordPress REST API behavior
|
|
767
|
-
- **CI/CD Ready**: Works in continuous integration environments
|
|
768
|
-
|
|
769
|
-
**Manual Setup Alternative:**
|
|
203
|
+
# Connection test
|
|
204
|
+
npm run status
|
|
770
205
|
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
bash scripts/test-setup-only.sh
|
|
774
|
-
|
|
775
|
-
# Use existing WordPress instance
|
|
776
|
-
export WORDPRESS_TEST_URL="https://your-wordpress-site.com"
|
|
777
|
-
export WORDPRESS_USERNAME="your-username"
|
|
778
|
-
export WORDPRESS_APP_PASSWORD="your-app-password"
|
|
779
|
-
export PACT_LIVE_TESTING="true"
|
|
780
|
-
npm run test:contracts
|
|
206
|
+
# Re-run setup wizard
|
|
207
|
+
npm run setup
|
|
781
208
|
```
|
|
782
209
|
|
|
783
|
-
|
|
210
|
+
## 📚 Documentation
|
|
784
211
|
|
|
785
|
-
|
|
212
|
+
### User Guides
|
|
213
|
+
- **[NPX Setup](docs/user-guides/NPX_SETUP.md)** - Quick start guide
|
|
214
|
+
- **[NPM Setup](docs/user-guides/NPM_SETUP.md)** - Local development
|
|
215
|
+
- **[Docker Setup](docs/user-guides/DOCKER_SETUP.md)** - Production deployment
|
|
216
|
+
- **[DTX Setup](docs/user-guides/DTX_SETUP.md)** - Desktop extension
|
|
786
217
|
|
|
787
|
-
###
|
|
218
|
+
### Technical Documentation
|
|
219
|
+
- **[API Documentation](docs/api/README.md)** - Complete tool reference
|
|
220
|
+
- **[Performance Guide](docs/PERFORMANCE_MONITORING.md)** - Monitoring and optimization
|
|
221
|
+
- **[Caching Guide](docs/CACHING.md)** - Cache configuration and management
|
|
222
|
+
- **[Security Guide](docs/SECURITY_TESTING.md)** - Security best practices
|
|
788
223
|
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
- Comprehensive performance reports with export options
|
|
795
|
-
- AI-powered optimization engine for performance improvements
|
|
796
|
-
- ⚡ **Intelligent Caching System**
|
|
797
|
-
- 50-70% performance improvement with reduced API calls
|
|
798
|
-
- Multi-layer caching architecture with intelligent invalidation
|
|
799
|
-
- Site-specific cache isolation for multi-site installations
|
|
800
|
-
- New MCP tools for cache performance monitoring and management
|
|
801
|
-
- Sub-millisecond response times for cache hits
|
|
802
|
-
- 📚 **Auto-Generated Documentation**
|
|
803
|
-
- Complete API documentation for all 59 tools with examples and usage guides
|
|
804
|
-
- Machine-readable OpenAPI specification for integration
|
|
805
|
-
- Automated CI/CD pipeline for documentation updates
|
|
806
|
-
- Comprehensive documentation quality validation
|
|
807
|
-
- Multi-format output including Markdown, JSON, and OpenAPI
|
|
808
|
-
- 🐳 **Docker Containerization**
|
|
809
|
-
- Production-ready Docker images for easy deployment
|
|
810
|
-
- Docker Compose setup for local development
|
|
811
|
-
- Flexible environment configuration via variables
|
|
812
|
-
- One-command deployment to any Docker environment
|
|
224
|
+
### Developer Resources
|
|
225
|
+
- **[Development Guide](docs/developer/README.md)** - Contributing and development
|
|
226
|
+
- **[API Reference](docs/developer/API_REFERENCE.md)** - Technical API details
|
|
227
|
+
- **[Architecture Guide](docs/developer/ARCHITECTURE.md)** - System architecture
|
|
228
|
+
- **[Testing Guide](docs/developer/TESTING.md)** - Test suite and CI/CD
|
|
813
229
|
|
|
814
|
-
|
|
230
|
+
## 🔧 Requirements
|
|
815
231
|
|
|
816
|
-
|
|
232
|
+
- **WordPress 5.0+** with REST API enabled
|
|
233
|
+
- **HTTPS recommended** for production
|
|
234
|
+
- **User with appropriate permissions**
|
|
235
|
+
- **Application Passwords enabled** (WordPress 5.6+)
|
|
817
236
|
|
|
818
|
-
|
|
237
|
+
### WordPress User Roles
|
|
819
238
|
|
|
820
|
-
|
|
239
|
+
| Role | Access |
|
|
240
|
+
| ----------------- | ----------------------------- |
|
|
241
|
+
| **Administrator** | Full access to all functions |
|
|
242
|
+
| **Editor** | Posts, pages, comments, media |
|
|
243
|
+
| **Author** | Own posts and media |
|
|
244
|
+
| **Contributor** | Own posts (drafts only) |
|
|
245
|
+
| **Subscriber** | Read only |
|
|
821
246
|
|
|
822
|
-
|
|
247
|
+
## 📦 Installation Options
|
|
823
248
|
|
|
249
|
+
### NPM Package
|
|
824
250
|
```bash
|
|
825
|
-
#
|
|
251
|
+
# Global installation
|
|
826
252
|
npm install -g mcp-wordpress
|
|
827
253
|
|
|
828
|
-
#
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
# Use with npx (no installation)
|
|
832
|
-
npx mcp-wordpress
|
|
254
|
+
# Direct usage (recommended)
|
|
255
|
+
npx -y mcp-wordpress
|
|
833
256
|
```
|
|
834
257
|
|
|
835
|
-
|
|
836
|
-
|
|
258
|
+
### Docker Images
|
|
837
259
|
```bash
|
|
838
|
-
# Latest
|
|
260
|
+
# Latest version
|
|
839
261
|
docker pull docdyhr/mcp-wordpress:latest
|
|
840
262
|
|
|
841
263
|
# Specific version
|
|
842
|
-
docker pull docdyhr/mcp-wordpress:1.
|
|
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
|
|
264
|
+
docker pull docdyhr/mcp-wordpress:1.3.1
|
|
868
265
|
```
|
|
869
266
|
|
|
870
|
-
|
|
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
|
-
|
|
267
|
+
### Distribution Channels
|
|
908
268
|
- **NPM:** [`mcp-wordpress`](https://www.npmjs.com/package/mcp-wordpress)
|
|
909
269
|
- **Docker Hub:** [`docdyhr/mcp-wordpress`](https://hub.docker.com/r/docdyhr/mcp-wordpress)
|
|
910
|
-
- **GitHub
|
|
911
|
-
|
|
912
|
-
---
|
|
270
|
+
- **GitHub:** [Latest releases](https://github.com/docdyhr/mcp-wordpress/releases)
|
|
913
271
|
|
|
914
272
|
## 🙏 Acknowledgments
|
|
915
273
|
|
|
916
|
-
Special thanks to **[Stephan Ferraro](https://github.com/ferraro)** for the upstream
|
|
274
|
+
Special thanks to **[Stephan Ferraro](https://github.com/ferraro)** for the upstream project that inspired this implementation.
|
|
275
|
+
|
|
276
|
+
---
|
|
917
277
|
|
|
918
|
-
|
|
278
|
+
**Ready to get started?** Choose your setup method above and follow the guide - you'll be managing WordPress with Claude in minutes! 🚀
|