mcp-wordpress 1.2.0 → 1.2.3

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 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
  [![NPM Version](https://img.shields.io/npm/v/mcp-wordpress)](https://www.npmjs.com/package/mcp-wordpress)
10
- [![Test Coverage](https://img.shields.io/badge/test%20coverage-95%25%2B-brightgreen)](https://github.com/thomasdyhr/mcp-wordpress)
11
- [![TypeScript](https://img.shields.io/badge/TypeScript-100%25-blue)](https://github.com/thomasdyhr/mcp-wordpress)
12
- [![Architecture](https://img.shields.io/badge/architecture-modular-orange)](https://github.com/thomasdyhr/mcp-wordpress/blob/main/REFACTORING.md)
10
+ [![Test Coverage](https://img.shields.io/badge/test%20coverage-95%25%2B-brightgreen)](https://github.com/docdyhr/mcp-wordpress)
11
+ [![TypeScript](https://img.shields.io/badge/TypeScript-100%25-blue)](https://github.com/docdyhr/mcp-wordpress)
12
+ [![Architecture](https://img.shields.io/badge/architecture-modular-orange)](https://github.com/docdyhr/mcp-wordpress/blob/main/REFACTORING.md)
13
13
 
14
14
  ## 🚀 Features
15
15
 
@@ -46,7 +46,7 @@ mcp-wordpress
46
46
  ### Option 2: Local Development
47
47
 
48
48
  ```bash
49
- git clone https://github.com/thomasdyhr/mcp-wordpress.git
49
+ git clone https://github.com/docdyhr/mcp-wordpress.git
50
50
  cd mcp-wordpress
51
51
  npm install
52
52
  npm run setup
@@ -63,7 +63,29 @@ npx mcp-wordpress setup
63
63
  npm run setup
64
64
  ```
65
65
 
66
- ## 🏆 Latest Achievement: v1.2.0 - Performance & Documentation Revolution
66
+ ## 🏆 Latest Achievement: v1.2.1 - Test Infrastructure & Multi-Site Enhancement
67
+
68
+ 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**:
69
+
70
+ ### ✅ Test Infrastructure Overhaul (v1.2.1)
71
+
72
+ - **🔧 100% Test Success Rate**: Fixed all failing integration and tool tests
73
+ - **🌐 Multi-Site Testing**: Comprehensive test suite for multi-site WordPress configurations
74
+ - **🛡️ Enhanced Security**: Improved .gitignore and credential protection
75
+ - **📋 Test Organization**: Streamlined test scripts and better error reporting
76
+ - **⚡ Quick Validation**: New `npm run test:multisite` command for rapid configuration testing
77
+
78
+ ### 🌐 Multi-Site Configuration Enhancements (v1.2.1)
79
+
80
+ - **📝 Complete Documentation**: Comprehensive Claude Desktop setup guide for multi-site usage
81
+ - **🔧 Fixed Configuration**: Resolved JWT authentication validation issues
82
+ - **✅ Site Validation**: Enhanced uniqueness checks for site URLs and IDs
83
+ - **🚀 Quick Testing**: Instant validation of all configured WordPress sites
84
+ - **📊 Status Reporting**: Clear success/failure reporting for each site configuration
85
+
86
+ ---
87
+
88
+ ## 🏆 Previous Achievement: v1.2.0 - Performance & Documentation Revolution
67
89
 
68
90
  We've implemented a **comprehensive performance monitoring system**, **intelligent caching**, **auto-generated documentation**, and **Docker containerization** - all while maintaining complete backward compatibility:
69
91
 
@@ -106,13 +128,16 @@ We've implemented a **comprehensive performance monitoring system**, **intellige
106
128
  - [API Documentation](./docs/api/README.md)
107
129
  - [Docker Deployment Guide](./docs/DOCKER.md)
108
130
 
109
- ## 🔐 Authentication & Testing Status
131
+ ## 🔐 Authentication & Testing Status (v1.2.1)
110
132
 
111
133
  ✅ **Application Passwords** - Tested and working perfectly
112
134
  ✅ **JWT Authentication** - Supported with plugin
113
135
  ✅ **Basic Authentication** - Development ready
114
136
  ✅ **API Key Authentication** - Plugin-based support
115
- ✅ **All Tests Passing** - 100% success rate (41/41 tests)
137
+ ✅ **Integration Tests** - 100% success rate (9/9 tests passing)
138
+ ✅ **Multi-Site Tests** - 100% success rate (3/3 sites verified)
139
+ ✅ **Security Tests** - 100% success rate (40/40 tests passing)
140
+ ✅ **Performance Tests** - 100% success rate (8/8 tests passing)
116
141
  ✅ **Tool Tests** - 100% success rate (14/14 tools working)
117
142
 
118
143
  The setup wizard guides you through:
@@ -148,8 +173,8 @@ I want to use the NPX version (mcp-wordpress) so I don't need to install anythin
148
173
 
149
174
  For local development and customization:
150
175
 
151
- ```
152
- Build and configure the MCP WordPress server project from https://github.com/thomasdyhr/mcp-wordpress locally on my computer.
176
+ ```text
177
+ Build and configure the MCP WordPress server project from https://github.com/docdyhr/mcp-wordpress locally on my computer.
153
178
 
154
179
  Please:
155
180
  1. Clone the repository to an appropriate directory
@@ -291,6 +316,139 @@ Here's a complete `claude_desktop_config.json` file with MCP WordPress:
291
316
  }
292
317
  ```
293
318
 
319
+ ## 🌐 Multi-Site Configuration
320
+
321
+ 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.
322
+
323
+ ### Setting Up Multi-Site Configuration
324
+
325
+ 1. **Create a `mcp-wordpress.config.json` file** in your project root:
326
+
327
+ ```json
328
+ {
329
+ "sites": [
330
+ {
331
+ "id": "site1",
332
+ "name": "My Main Site",
333
+ "config": {
334
+ "WORDPRESS_SITE_URL": "https://site1.com",
335
+ "WORDPRESS_USERNAME": "admin",
336
+ "WORDPRESS_APP_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx"
337
+ }
338
+ },
339
+ {
340
+ "id": "site2",
341
+ "name": "My Blog",
342
+ "config": {
343
+ "WORDPRESS_SITE_URL": "https://blog.site2.com",
344
+ "WORDPRESS_USERNAME": "editor",
345
+ "WORDPRESS_APP_PASSWORD": "yyyy yyyy yyyy yyyy yyyy yyyy",
346
+ "WORDPRESS_AUTH_METHOD": "app-password"
347
+ }
348
+ },
349
+ {
350
+ "id": "dev",
351
+ "name": "Development Site",
352
+ "config": {
353
+ "WORDPRESS_SITE_URL": "http://localhost:8080",
354
+ "WORDPRESS_USERNAME": "dev_user",
355
+ "WORDPRESS_APP_PASSWORD": "zzzz zzzz zzzz zzzz zzzz zzzz"
356
+ }
357
+ }
358
+ ]
359
+ }
360
+ ```
361
+
362
+ 1. **Configure Claude Desktop for Multi-Site**:
363
+
364
+ ```json
365
+ {
366
+ "mcpServers": {
367
+ "mcp-wordpress": {
368
+ "command": "npx",
369
+ "args": ["mcp-wordpress"]
370
+ }
371
+ }
372
+ }
373
+ ```
374
+
375
+ 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.
376
+
377
+ ### Using Multi-Site Tools
378
+
379
+ When you have multiple sites configured, all tools require a `site` parameter:
380
+
381
+ ```text
382
+ # List posts from site1
383
+ wp_list_posts --site="site1"
384
+
385
+ # Create a post on the blog site
386
+ wp_create_post --site="site2" --title="New Blog Post" --content="Content here"
387
+
388
+ # Get user info from development site
389
+ wp_get_current_user --site="dev"
390
+ ```
391
+
392
+ ### Important Multi-Site Notes
393
+
394
+ - **Site IDs must be unique** - Each site needs a unique identifier
395
+ - **Security**: The `mcp-wordpress.config.json` file contains sensitive credentials and should NEVER be committed to version control
396
+ - **Default Site**: If only one site is configured, it will be used by default without needing the `--site` parameter
397
+ - **Authentication**: Each site can use different authentication methods (app-password, jwt, basic, api-key)
398
+
399
+ ### Example: Managing Multiple Client Sites
400
+
401
+ ```json
402
+ {
403
+ "sites": [
404
+ {
405
+ "id": "client-acme",
406
+ "name": "ACME Corporation",
407
+ "config": {
408
+ "WORDPRESS_SITE_URL": "https://acme-corp.com",
409
+ "WORDPRESS_USERNAME": "mcp_admin",
410
+ "WORDPRESS_APP_PASSWORD": "aaaa bbbb cccc dddd eeee ffff"
411
+ }
412
+ },
413
+ {
414
+ "id": "client-tech",
415
+ "name": "TechStartup Blog",
416
+ "config": {
417
+ "WORDPRESS_SITE_URL": "https://blog.techstartup.io",
418
+ "WORDPRESS_USERNAME": "content_manager",
419
+ "WORDPRESS_APP_PASSWORD": "gggg hhhh iiii jjjj kkkk llll"
420
+ }
421
+ },
422
+ {
423
+ "id": "client-shop",
424
+ "name": "Online Shop",
425
+ "config": {
426
+ "WORDPRESS_SITE_URL": "https://shop.example.com",
427
+ "WORDPRESS_USERNAME": "shop_admin",
428
+ "WORDPRESS_APP_PASSWORD": "mmmm nnnn oooo pppp qqqq rrrr",
429
+ "WORDPRESS_AUTH_METHOD": "jwt",
430
+ "WORDPRESS_JWT_SECRET": "your-jwt-secret-here"
431
+ }
432
+ }
433
+ ]
434
+ }
435
+ ```
436
+
437
+ Then in Claude Desktop, you can manage all sites:
438
+
439
+ ```text
440
+ # Check posts across all client sites
441
+ wp_list_posts --site="client-acme" --per_page=5
442
+ wp_list_posts --site="client-tech" --per_page=5
443
+ wp_list_posts --site="client-shop" --per_page=5
444
+
445
+ # Update content on specific sites
446
+ wp_update_post --site="client-acme" --id=123 --title="Updated Title"
447
+
448
+ # Manage media across sites
449
+ wp_list_media --site="client-shop" --media_type="image"
450
+ ```
451
+
294
452
  ## 🛠 Build System
295
453
 
296
454
  ### TypeScript Build
@@ -529,7 +687,7 @@ npm run lint:fix
529
687
 
530
688
  ## 🏗 Project Structure
531
689
 
532
- ```
690
+ ```diagram
533
691
  mcp-wordpress/
534
692
  ├── src/ # TypeScript source code
535
693
  │ ├── index.ts # Main MCP server
@@ -632,10 +790,10 @@ docker run -d \
632
790
  -e WORDPRESS_SITE_URL=https://your-site.com \
633
791
  -e WORDPRESS_USERNAME=your-username \
634
792
  -e WORDPRESS_APP_PASSWORD=your-app-password \
635
- aiondadotcom/mcp-wordpress:latest
793
+ docdyhr/mcp-wordpress:latest
636
794
 
637
795
  # Using Docker Compose
638
- curl -O https://raw.githubusercontent.com/thomasdyhr/mcp-wordpress/main/docker-compose.yml
796
+ curl -O https://raw.githubusercontent.com/docdyhr/mcp-wordpress/main/docker-compose.yml
639
797
  docker-compose up -d
640
798
  ```
641
799
 
@@ -645,7 +803,7 @@ docker-compose up -d
645
803
  version: '3.8'
646
804
  services:
647
805
  mcp-wordpress:
648
- image: aiondadotcom/mcp-wordpress:latest
806
+ image: docdyhr/mcp-wordpress:latest
649
807
  restart: unless-stopped
650
808
  environment:
651
809
  - WORDPRESS_SITE_URL=https://your-site.com
@@ -665,7 +823,7 @@ services:
665
823
 
666
824
  Test the MCP server against a real WordPress instance using our automated testing setup:
667
825
 
668
- ```bash
826
+ ```bash copy
669
827
  # Automated live contract testing (recommended)
670
828
  npm run test:contracts:live
671
829
  ```
@@ -730,3 +888,99 @@ npm run test:contracts
730
888
  - One-command deployment to any Docker environment
731
889
 
732
890
  **📚 Read the full release notes for all details!**
891
+
892
+ ## 🚀 Release & Publishing
893
+
894
+ This project uses automated semantic versioning and publishing to NPM and Docker Hub.
895
+
896
+ ### 📦 Installation Options
897
+
898
+ **NPM Package:**
899
+
900
+ ```bash
901
+ # Latest stable version
902
+ npm install -g mcp-wordpress
903
+
904
+ # Specific version
905
+ npm install -g mcp-wordpress@1.2.2
906
+
907
+ # Use with npx (no installation)
908
+ npx mcp-wordpress
909
+ ```
910
+
911
+ **Docker Images:**
912
+
913
+ ```bash
914
+ # Latest stable version
915
+ docker pull docdyhr/mcp-wordpress:latest
916
+
917
+ # Specific version
918
+ docker pull docdyhr/mcp-wordpress:1.2.2
919
+
920
+ # Run directly
921
+ docker run -d docdyhr/mcp-wordpress:latest
922
+ ```
923
+
924
+ ### 🏷️ Release Process
925
+
926
+ **Automated Releases:**
927
+
928
+ - Releases are automatically created when conventional commits are pushed to the `main` branch
929
+ - Semantic versioning determines the version bump automatically
930
+ - NPM and Docker Hub publishing happens automatically on release
931
+
932
+ **Conventional Commit Format:**
933
+
934
+ ```bash
935
+ # Patch release (1.2.2 → 1.2.3)
936
+ fix: resolve authentication timeout issue
937
+
938
+ # Minor release (1.2.2 → 1.3.0)
939
+ feat: add new performance monitoring tools
940
+
941
+ # Major release (1.2.2 → 2.0.0)
942
+ feat!: redesign MCP tool interface
943
+ BREAKING CHANGE: tool parameter structure has changed
944
+ ```
945
+
946
+ **Manual Release (if needed):**
947
+
948
+ ```bash
949
+ # Test release locally
950
+ npm run release:dry
951
+
952
+ # Create release manually (requires proper permissions)
953
+ npm run release
954
+ ```
955
+
956
+ ### 📋 Release Checklist
957
+
958
+ For contributors planning releases:
959
+
960
+ 1. **Pre-Release Validation:**
961
+ - ✅ All tests passing (`npm test`)
962
+ - ✅ Documentation updated
963
+ - ✅ Performance benchmarks within acceptable range
964
+ - ✅ Security audit clean (`npm audit`)
965
+
966
+ 2. **Commit with Conventional Format:**
967
+
968
+ ```bash
969
+ git add .
970
+ git commit -m "feat: add new functionality"
971
+ git push origin main
972
+ ```
973
+
974
+ 3. **Automated Process Handles:**
975
+ - 📝 Generate release notes
976
+ - 🏷️ Create GitHub release
977
+ - 📦 Publish to NPM with provenance
978
+ - 🐳 Build and push Docker images (multi-arch)
979
+ - 📚 Update CHANGELOG.md
980
+ - 🔗 Update Docker Hub description
981
+
982
+ ### 🌍 Distribution Channels
983
+
984
+ - **NPM:** [`mcp-wordpress`](https://www.npmjs.com/package/mcp-wordpress)
985
+ - **Docker Hub:** [`docdyhr/mcp-wordpress`](https://hub.docker.com/r/docdyhr/mcp-wordpress)
986
+ - **GitHub Releases:** [Latest releases](https://github.com/docdyhr/mcp-wordpress/releases)
@@ -38,11 +38,11 @@ export declare const SecurityConfig: {
38
38
  auth: number;
39
39
  };
40
40
  headers: {
41
- "X-Content-Type-Options": string;
42
- "X-Frame-Options": string;
43
- "X-XSS-Protection": string;
44
- "Strict-Transport-Security": string;
45
- "Content-Security-Policy": string;
41
+ 'X-Content-Type-Options': string;
42
+ 'X-Frame-Options': string;
43
+ 'X-XSS-Protection': string;
44
+ 'Strict-Transport-Security': string;
45
+ 'Content-Security-Policy': string;
46
46
  };
47
47
  errorMessages: {
48
48
  authentication: string;
@@ -1 +1 @@
1
- {"version":3,"file":"SecurityConfig.d.ts","sourceRoot":"","sources":["../../src/security/SecurityConfig.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;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