mcp-wordpress 2.10.0 → 2.10.2
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 +17 -19
- package/bin/mcp-wordpress.js +3 -3
- package/bin/setup.js +140 -141
- package/bin/status.js +112 -114
- package/dist/client/MockWordPressClient.d.ts.map +1 -1
- package/dist/client/MockWordPressClient.js.map +1 -1
- package/dist/client/SEOWordPressClient.d.ts.map +1 -1
- package/dist/client/SEOWordPressClient.js +16 -14
- package/dist/client/SEOWordPressClient.js.map +1 -1
- package/dist/client/index.d.ts +6 -6
- package/dist/client/index.js +6 -6
- package/dist/client/managers/AuthManager.d.ts.map +1 -1
- package/dist/client/managers/AuthManager.js +2 -2
- package/dist/client/managers/AuthManager.js.map +1 -1
- package/dist/client/managers/AuthenticationManager.js +1 -1
- package/dist/client/managers/JWTAuthImplementation.d.ts.map +1 -1
- package/dist/client/managers/JWTAuthImplementation.js +7 -7
- package/dist/client/managers/JWTAuthImplementation.js.map +1 -1
- package/dist/client/managers/composed/MigrationAdapter.js +1 -1
- package/dist/client/managers/composed/index.d.ts +2 -2
- package/dist/client/managers/composed/index.d.ts.map +1 -1
- package/dist/client/managers/composed/index.js +1 -1
- package/dist/client/managers/composed/index.js.map +1 -1
- package/dist/client/managers/implementations/ErrorHandlerImpl.d.ts.map +1 -1
- package/dist/client/managers/implementations/ErrorHandlerImpl.js +2 -4
- package/dist/client/managers/implementations/ErrorHandlerImpl.js.map +1 -1
- package/dist/client/managers/implementations/ParameterValidatorImpl.d.ts.map +1 -1
- package/dist/client/managers/implementations/ParameterValidatorImpl.js +1 -1
- package/dist/client/managers/implementations/ParameterValidatorImpl.js.map +1 -1
- package/dist/client/managers/interfaces/ManagerInterfaces.d.ts.map +1 -1
- package/dist/config/index.d.ts +3 -3
- package/dist/config/index.js +3 -3
- package/dist/docs/MarkdownFormatter.d.ts.map +1 -1
- package/dist/docs/MarkdownFormatter.js +7 -7
- package/dist/docs/MarkdownFormatter.js.map +1 -1
- package/dist/performance/PerformanceAnalytics.d.ts.map +1 -1
- package/dist/performance/PerformanceAnalytics.js +3 -1
- package/dist/performance/PerformanceAnalytics.js.map +1 -1
- package/dist/security/InputValidator.js +1 -1
- package/dist/security/SecurityCIPipeline.js +1 -1
- package/dist/security/SecurityCIPipeline.js.map +1 -1
- package/dist/security/SecurityConfig.d.ts.map +1 -1
- package/dist/security/SecurityConfig.js +6 -2
- package/dist/security/SecurityConfig.js.map +1 -1
- package/dist/server/index.d.ts +2 -2
- package/dist/server/index.js +2 -2
- package/dist/tools/cache.d.ts.map +1 -1
- package/dist/tools/cache.js.map +1 -1
- package/dist/tools/comments.d.ts.map +1 -1
- package/dist/tools/comments.js.map +1 -1
- package/dist/tools/performance.d.ts.map +1 -1
- package/dist/tools/performance.js.map +1 -1
- package/dist/tools/posts/PostHandlers.d.ts.map +1 -1
- package/dist/tools/posts/PostHandlers.js.map +1 -1
- package/dist/tools/seo/SEOTools.d.ts.map +1 -1
- package/dist/tools/seo/SEOTools.js.map +1 -1
- package/dist/tools/seo/analyzers/ContentAnalyzer.d.ts.map +1 -1
- package/dist/tools/seo/analyzers/ContentAnalyzer.js.map +1 -1
- package/dist/types/enhanced.d.ts +17 -17
- package/dist/types/enhanced.d.ts.map +1 -1
- package/dist/types/enhanced.js +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/requests.d.ts +16 -16
- package/dist/types/tools.d.ts +46 -46
- package/dist/types/tools.d.ts.map +1 -1
- package/dist/utils/index.d.ts +7 -7
- package/dist/utils/index.js +7 -7
- package/docs/ARCHITECTURE.md +17 -17
- package/docs/BADGE_UPDATES.md +11 -11
- package/docs/CACHING.md +2 -0
- package/docs/CI_CD_IMPROVEMENTS.md +8 -5
- package/docs/CONFIGURATION.md +76 -46
- package/docs/DOCKER_PUBLISHING_TROUBLESHOOTING.md +11 -2
- package/docs/EVALUATION.md +16 -21
- package/docs/INCREMENTAL_COVERAGE.md +7 -3
- package/docs/INSTALLATION.md +33 -19
- package/docs/PUBLISHING-TROUBLESHOOTING.md +3 -2
- package/docs/SECURITY.md +17 -15
- package/docs/SECURITY_TESTING.md +3 -0
- package/docs/TROUBLESHOOTING.md +85 -36
- package/docs/api/README.md +118 -125
- package/docs/api/categories/auth.md +3 -1
- package/docs/api/categories/cache.md +3 -1
- package/docs/api/categories/comment.md +3 -1
- package/docs/api/categories/media.md +3 -1
- package/docs/api/categories/page.md +3 -1
- package/docs/api/categories/performance.md +3 -1
- package/docs/api/categories/post.md +3 -1
- package/docs/api/categories/site.md +3 -1
- package/docs/api/categories/taxonomy.md +3 -1
- package/docs/api/categories/user.md +3 -1
- package/docs/api/openapi.json +114 -410
- package/docs/api/summary.json +1 -1
- package/docs/api/tools/wp_approve_comment.md +13 -25
- package/docs/api/tools/wp_cache_clear.md +17 -30
- package/docs/api/tools/wp_cache_info.md +16 -29
- package/docs/api/tools/wp_cache_stats.md +16 -29
- package/docs/api/tools/wp_cache_warm.md +16 -29
- package/docs/api/tools/wp_create_application_password.md +14 -26
- package/docs/api/tools/wp_create_category.md +14 -26
- package/docs/api/tools/wp_create_comment.md +18 -31
- package/docs/api/tools/wp_create_page.md +17 -29
- package/docs/api/tools/wp_create_post.md +25 -30
- package/docs/api/tools/wp_create_tag.md +13 -25
- package/docs/api/tools/wp_create_user.md +18 -30
- package/docs/api/tools/wp_delete_application_password.md +14 -26
- package/docs/api/tools/wp_delete_category.md +13 -25
- package/docs/api/tools/wp_delete_comment.md +14 -26
- package/docs/api/tools/wp_delete_media.md +14 -25
- package/docs/api/tools/wp_delete_page.md +14 -25
- package/docs/api/tools/wp_delete_post.md +17 -25
- package/docs/api/tools/wp_delete_tag.md +13 -25
- package/docs/api/tools/wp_delete_user.md +14 -25
- package/docs/api/tools/wp_get_application_passwords.md +13 -25
- package/docs/api/tools/wp_get_auth_status.md +12 -24
- package/docs/api/tools/wp_get_category.md +13 -25
- package/docs/api/tools/wp_get_comment.md +13 -25
- package/docs/api/tools/wp_get_current_user.md +17 -30
- package/docs/api/tools/wp_get_media.md +13 -25
- package/docs/api/tools/wp_get_page.md +13 -25
- package/docs/api/tools/wp_get_page_revisions.md +13 -25
- package/docs/api/tools/wp_get_post.md +16 -25
- package/docs/api/tools/wp_get_post_revisions.md +13 -25
- package/docs/api/tools/wp_get_site_settings.md +12 -23
- package/docs/api/tools/wp_get_tag.md +13 -25
- package/docs/api/tools/wp_get_user.md +13 -25
- package/docs/api/tools/wp_list_categories.md +15 -27
- package/docs/api/tools/wp_list_comments.md +15 -27
- package/docs/api/tools/wp_list_media.md +18 -31
- package/docs/api/tools/wp_list_pages.md +18 -31
- package/docs/api/tools/wp_list_posts.md +29 -41
- package/docs/api/tools/wp_list_tags.md +14 -26
- package/docs/api/tools/wp_list_users.md +20 -34
- package/docs/api/tools/wp_performance_alerts.md +22 -36
- package/docs/api/tools/wp_performance_benchmark.md +20 -34
- package/docs/api/tools/wp_performance_export.md +22 -36
- package/docs/api/tools/wp_performance_history.md +21 -35
- package/docs/api/tools/wp_performance_optimize.md +22 -36
- package/docs/api/tools/wp_performance_stats.md +20 -34
- package/docs/api/tools/wp_search_site.md +18 -32
- package/docs/api/tools/wp_spam_comment.md +13 -25
- package/docs/api/tools/wp_switch_auth_method.md +18 -31
- package/docs/api/tools/wp_test_auth.md +15 -30
- package/docs/api/tools/wp_update_category.md +14 -26
- package/docs/api/tools/wp_update_comment.md +17 -30
- package/docs/api/tools/wp_update_media.md +19 -32
- package/docs/api/tools/wp_update_page.md +18 -30
- package/docs/api/tools/wp_update_post.md +21 -30
- package/docs/api/tools/wp_update_site_settings.md +18 -31
- package/docs/api/tools/wp_update_tag.md +14 -26
- package/docs/api/tools/wp_update_user.md +17 -29
- package/docs/api/tools/wp_upload_media.md +20 -32
- package/docs/api/types/WordPressPost.md +8 -15
- package/docs/code-improvements.md +1 -0
- package/docs/developer/GITHUB_ACTIONS_SETUP.md +2 -2
- package/docs/developer/MAINTENANCE.md +4 -0
- package/docs/developer/NPM_AUTH_SETUP.md +3 -0
- package/docs/developer/RELEASE_PROCESS.md +1 -0
- package/docs/examples/multi-site-setup.md +2 -0
- package/docs/integrations/claude-desktop.md +14 -5
- package/docs/integrations/cline.md +1 -0
- package/docs/user-guides/DTX_SETUP.md +9 -8
- package/docs/user-guides/NPX_SETUP.md +5 -9
- package/docs/user-guides/SMITHERY_SETUP.md +5 -0
- package/docs/v2.2.0-resolution-demo.md +17 -2
- package/package.json +2 -1
- package/src/cache/__tests__/CacheManager.test.ts +4 -8
- package/src/client/MockWordPressClient.ts +5 -1
- package/src/client/SEOWordPressClient.ts +30 -26
- package/src/client/index.ts +6 -6
- package/src/client/managers/AuthManager.ts +16 -8
- package/src/client/managers/AuthenticationManager.ts +2 -2
- package/src/client/managers/JWTAuthImplementation.ts +24 -27
- package/src/client/managers/ManagersIndex.ts +1 -1
- package/src/client/managers/composed/MigrationAdapter.ts +1 -1
- package/src/client/managers/composed/index.ts +7 -7
- package/src/client/managers/implementations/ErrorHandlerImpl.ts +12 -26
- package/src/client/managers/implementations/ParameterValidatorImpl.ts +49 -49
- package/src/client/managers/interfaces/ManagerInterfaces.ts +13 -9
- package/src/config/index.ts +3 -3
- package/src/docs/MarkdownFormatter.ts +13 -9
- package/src/performance/PerformanceAnalytics.ts +9 -3
- package/src/security/InputValidator.ts +1 -1
- package/src/security/SecurityCIPipeline.ts +1 -1
- package/src/security/SecurityConfig.ts +9 -3
- package/src/server/index.ts +2 -2
- package/src/tools/cache.ts +3 -1
- package/src/tools/comments.ts +3 -1
- package/src/tools/performance.ts +7 -3
- package/src/tools/posts/PostHandlers.ts +3 -1
- package/src/tools/seo/SEOTools.ts +6 -2
- package/src/tools/seo/analyzers/ContentAnalyzer.ts +9 -3
- package/src/types/enhanced.ts +34 -34
- package/src/types/index.ts +13 -11
- package/src/types/requests.ts +19 -19
- package/src/types/tools.ts +137 -84
- package/src/utils/index.ts +7 -7
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
# Docker Publishing Troubleshooting Guide
|
|
2
2
|
|
|
3
|
-
This guide helps resolve Docker Hub publishing failures and provides tools for manual intervention when the automated
|
|
3
|
+
This guide helps resolve Docker Hub publishing failures and provides tools for manual intervention when the automated
|
|
4
|
+
release process encounters issues.
|
|
4
5
|
|
|
5
6
|
## 🚨 Current Status - Multiple Missing Versions
|
|
6
7
|
|
|
7
8
|
**Investigation Results:**
|
|
9
|
+
|
|
8
10
|
- NPM Publishing: ✅ All versions available (2.0.4, 2.1.0, 2.2.0, 2.3.0)
|
|
9
11
|
- Docker Hub Publishing: ❌ Multiple versions missing since v2.0.4
|
|
10
12
|
|
|
11
13
|
**Missing Docker Hub Versions:**
|
|
14
|
+
|
|
12
15
|
- v2.0.4 (original issue)
|
|
13
16
|
- v2.1.0, v2.2.0, v2.3.0 (subsequent failures)
|
|
14
17
|
|
|
15
18
|
**Root Cause:** Systemic Docker publishing failure in release workflow since v2.0.4 release.
|
|
16
19
|
|
|
17
20
|
**Available Versions on Docker Hub:**
|
|
21
|
+
|
|
18
22
|
- ✅ v2.0.0, v2.0.1, v2.0.2, v2.0.3 (working)
|
|
19
23
|
- ❌ v2.0.4, v2.1.0, v2.2.0, v2.3.0 (missing)
|
|
20
24
|
|
|
@@ -36,11 +40,13 @@ done
|
|
|
36
40
|
### Missing Docker Hub Versions
|
|
37
41
|
|
|
38
42
|
**Symptoms:**
|
|
43
|
+
|
|
39
44
|
- NPM publishing succeeds but Docker Hub fails
|
|
40
45
|
- Verification workflow reports missing versions
|
|
41
46
|
- GitHub releases exist but corresponding Docker images are absent
|
|
42
47
|
|
|
43
48
|
**Root Causes:**
|
|
49
|
+
|
|
44
50
|
- Docker Hub API rate limiting
|
|
45
51
|
- Network timeouts during multi-platform builds
|
|
46
52
|
- Docker registry authentication issues
|
|
@@ -175,6 +181,7 @@ The release workflow now includes:
|
|
|
175
181
|
### Image Integrity
|
|
176
182
|
|
|
177
183
|
All published images include:
|
|
184
|
+
|
|
178
185
|
- **Provenance**: Build attestation data
|
|
179
186
|
- **SBOM**: Software Bill of Materials
|
|
180
187
|
- **Signatures**: Cryptographic verification
|
|
@@ -208,6 +215,7 @@ curl -s https://hub.docker.com/v2/repositories/docdyhr/mcp-wordpress/tags | \
|
|
|
208
215
|
If all automated methods fail:
|
|
209
216
|
|
|
210
217
|
1. **Manual Docker Build:**
|
|
218
|
+
|
|
211
219
|
```bash
|
|
212
220
|
git checkout v2.0.4
|
|
213
221
|
docker buildx build --platform linux/amd64,linux/arm64 \
|
|
@@ -217,6 +225,7 @@ If all automated methods fail:
|
|
|
217
225
|
```
|
|
218
226
|
|
|
219
227
|
2. **Contact Repository Maintainer:**
|
|
228
|
+
|
|
220
229
|
- Create detailed issue with error logs
|
|
221
230
|
- Include attempted resolution steps
|
|
222
231
|
- Mention urgency level and impact
|
|
@@ -230,4 +239,4 @@ If all automated methods fail:
|
|
|
230
239
|
|
|
231
240
|
- **GitHub Issues**: [Create Issue](https://github.com/docdyhr/mcp-wordpress/issues/new)
|
|
232
241
|
- **Workflow Logs**: Check Actions tab for detailed error information
|
|
233
|
-
- **Docker Hub Status**: [Docker Hub Status Page](https://status.docker.com/)
|
|
242
|
+
- **Docker Hub Status**: [Docker Hub Status Page](https://status.docker.com/)
|
package/docs/EVALUATION.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# MCP WordPress Tools Evaluation Guide
|
|
2
2
|
|
|
3
|
-
This guide covers the comprehensive evaluation system for MCP WordPress tools using
|
|
3
|
+
This guide covers the comprehensive evaluation system for MCP WordPress tools using
|
|
4
|
+
[mcp-evals](https://github.com/mclenhard/mcp-evals).
|
|
4
5
|
|
|
5
6
|
## Overview
|
|
6
7
|
|
|
7
|
-
The evaluation system provides automated testing and scoring of WordPress MCP tools using LLM-based evaluation to
|
|
8
|
+
The evaluation system provides automated testing and scoring of WordPress MCP tools using LLM-based evaluation to
|
|
9
|
+
ensure:
|
|
8
10
|
|
|
9
11
|
- **Tool Reliability**: Consistent performance across different scenarios
|
|
10
12
|
- **Quality Assurance**: Comprehensive testing of all 59 WordPress tools
|
|
@@ -157,23 +159,19 @@ evals:
|
|
|
157
159
|
### TypeScript Evaluation
|
|
158
160
|
|
|
159
161
|
```typescript
|
|
160
|
-
import { EvalFunction, grade } from
|
|
161
|
-
import { openai } from
|
|
162
|
+
import { EvalFunction, grade } from "mcp-evals";
|
|
163
|
+
import { openai } from "mcp-evals/models";
|
|
162
164
|
|
|
163
165
|
export const customEval: EvalFunction = {
|
|
164
|
-
name:
|
|
165
|
-
description:
|
|
166
|
+
name: "custom_evaluation",
|
|
167
|
+
description: "Test custom functionality",
|
|
166
168
|
run: async () => {
|
|
167
|
-
const result = await grade(
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
systemPrompt: "Evaluation criteria...",
|
|
172
|
-
responseFormat: { type: "json_object" }
|
|
173
|
-
}
|
|
174
|
-
);
|
|
169
|
+
const result = await grade(openai("gpt-4o"), "Your test prompt here", {
|
|
170
|
+
systemPrompt: "Evaluation criteria...",
|
|
171
|
+
responseFormat: { type: "json_object" },
|
|
172
|
+
});
|
|
175
173
|
return JSON.parse(result);
|
|
176
|
-
}
|
|
174
|
+
},
|
|
177
175
|
};
|
|
178
176
|
```
|
|
179
177
|
|
|
@@ -314,10 +312,7 @@ open evaluations/reports/evaluation-report.html
|
|
|
314
312
|
"reason": "Error handling could be more graceful"
|
|
315
313
|
}
|
|
316
314
|
],
|
|
317
|
-
"recommendations": [
|
|
318
|
-
"Improve error handling for edge cases",
|
|
319
|
-
"Add more comprehensive validation"
|
|
320
|
-
]
|
|
315
|
+
"recommendations": ["Improve error handling for edge cases", "Add more comprehensive validation"]
|
|
321
316
|
}
|
|
322
317
|
```
|
|
323
318
|
|
|
@@ -345,7 +340,7 @@ const customScoring = {
|
|
|
345
340
|
completeness: { weight: 0.3, min: 3.5 },
|
|
346
341
|
relevance: { weight: 0.2, min: 3.0 },
|
|
347
342
|
clarity: { weight: 0.1, min: 3.0 },
|
|
348
|
-
reasoning: { weight: 0.1, min: 3.0 }
|
|
343
|
+
reasoning: { weight: 0.1, min: 3.0 },
|
|
349
344
|
};
|
|
350
345
|
```
|
|
351
346
|
|
|
@@ -394,4 +389,4 @@ npm run eval:monitor
|
|
|
394
389
|
---
|
|
395
390
|
|
|
396
391
|
**Ready to improve tool quality?** Start by running `npm run eval:quick` to see current performance, then dive into
|
|
397
|
-
writing custom evaluations for your specific use cases!
|
|
392
|
+
writing custom evaluations for your specific use cases!
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
5
|
-
The incremental coverage guardrail prevents coverage regression by comparing current PR coverage against a baseline from
|
|
5
|
+
The incremental coverage guardrail prevents coverage regression by comparing current PR coverage against a baseline from
|
|
6
|
+
the main branch. This ensures code quality and maintains test coverage standards.
|
|
6
7
|
|
|
7
8
|
## Features
|
|
8
9
|
|
|
@@ -105,7 +106,7 @@ BASELINE_FILE=coverage/baseline-main.json npm run coverage:baseline
|
|
|
105
106
|
"metric": "lines",
|
|
106
107
|
"baseline": 30.97,
|
|
107
108
|
"current": 32.17,
|
|
108
|
-
"diff": 1.
|
|
109
|
+
"diff": 1.2,
|
|
109
110
|
"passed": true,
|
|
110
111
|
"tolerance": 1
|
|
111
112
|
}
|
|
@@ -166,18 +167,21 @@ rm coverage-baseline.json && npm run coverage:baseline
|
|
|
166
167
|
## Implementation Details
|
|
167
168
|
|
|
168
169
|
### Script Location
|
|
170
|
+
|
|
169
171
|
- `scripts/incremental-coverage-guardrail.js`: Main implementation
|
|
170
172
|
- `scripts/coverage-guardrail.js`: Phase-based coverage validation
|
|
171
173
|
- `.github/workflows/coverage-guard.yml`: CI/CD workflow
|
|
172
174
|
|
|
173
175
|
### Baseline Storage
|
|
176
|
+
|
|
174
177
|
- `coverage-baseline.json`: Baseline metrics from main branch
|
|
175
178
|
- Generated automatically in CI/CD pipeline
|
|
176
179
|
- Contains timestamp, commit info, and detailed metrics
|
|
177
180
|
|
|
178
181
|
### Coverage Sources
|
|
182
|
+
|
|
179
183
|
- Primary: `coverage/coverage-final.json` (Jest output)
|
|
180
184
|
- Fallback: Estimated values from project knowledge
|
|
181
185
|
- Future: Direct TypeScript coverage collection
|
|
182
186
|
|
|
183
|
-
This incremental coverage system ensures code quality while providing flexibility for development workflows.
|
|
187
|
+
This incremental coverage system ensures code quality while providing flexibility for development workflows.
|
package/docs/INSTALLATION.md
CHANGED
|
@@ -4,20 +4,21 @@ Complete installation guide for MCP WordPress Server with all supported methods.
|
|
|
4
4
|
|
|
5
5
|
## 🎯 Choose Your Installation Method
|
|
6
6
|
|
|
7
|
-
| Method
|
|
8
|
-
|
|
9
|
-
| **[DXT Extension](#-dxt-extension-recommended)** | Most users
|
|
10
|
-
| **[NPX](#-npx-quick-start)**
|
|
11
|
-
| **[Smithery](#-smithery-package-manager)**
|
|
12
|
-
| **[NPM Global](#-npm-global-installation)**
|
|
13
|
-
| **[Docker](#-docker-deployment)**
|
|
14
|
-
| **[Development](#️-development-setup)**
|
|
7
|
+
| Method | Best For | Setup Time | Difficulty |
|
|
8
|
+
| ------------------------------------------------ | ------------ | ---------- | ------------ |
|
|
9
|
+
| **[DXT Extension](#-dxt-extension-recommended)** | Most users | 2 minutes | Beginner |
|
|
10
|
+
| **[NPX](#-npx-quick-start)** | Power users | 5 minutes | Beginner |
|
|
11
|
+
| **[Smithery](#-smithery-package-manager)** | MCP users | 3 minutes | Beginner |
|
|
12
|
+
| **[NPM Global](#-npm-global-installation)** | Developers | 10 minutes | Intermediate |
|
|
13
|
+
| **[Docker](#-docker-deployment)** | Production | 15 minutes | Intermediate |
|
|
14
|
+
| **[Development](#️-development-setup)** | Contributors | 20 minutes | Advanced |
|
|
15
15
|
|
|
16
16
|
## 🏆 DXT Extension (Recommended)
|
|
17
17
|
|
|
18
18
|
The easiest way to get started with WordPress MCP in Claude Desktop.
|
|
19
19
|
|
|
20
20
|
### Prerequisites
|
|
21
|
+
|
|
21
22
|
- Claude Desktop application
|
|
22
23
|
- WordPress site with REST API enabled
|
|
23
24
|
- WordPress Application Password
|
|
@@ -25,6 +26,7 @@ The easiest way to get started with WordPress MCP in Claude Desktop.
|
|
|
25
26
|
### Installation Steps
|
|
26
27
|
|
|
27
28
|
1. **Download DXT Package**
|
|
29
|
+
|
|
28
30
|
```bash
|
|
29
31
|
# Download the latest DXT package
|
|
30
32
|
curl -L -o mcp-wordpress.dxt \
|
|
@@ -32,6 +34,7 @@ The easiest way to get started with WordPress MCP in Claude Desktop.
|
|
|
32
34
|
```
|
|
33
35
|
|
|
34
36
|
2. **Install in Claude Desktop**
|
|
37
|
+
|
|
35
38
|
- Open Claude Desktop
|
|
36
39
|
- Go to Extensions menu
|
|
37
40
|
- Click "Install Extension"
|
|
@@ -59,6 +62,7 @@ The easiest way to get started with WordPress MCP in Claude Desktop.
|
|
|
59
62
|
Best for users who want the latest version without installation.
|
|
60
63
|
|
|
61
64
|
### NPX Prerequisites
|
|
65
|
+
|
|
62
66
|
- Node.js 16+ and npm
|
|
63
67
|
- WordPress site with REST API enabled
|
|
64
68
|
- WordPress Application Password
|
|
@@ -100,6 +104,7 @@ Add to your Claude Desktop config:
|
|
|
100
104
|
Smithery is a dedicated package manager for MCP servers, providing easy installation and management.
|
|
101
105
|
|
|
102
106
|
### Prerequisites
|
|
107
|
+
|
|
103
108
|
- Smithery package manager installed
|
|
104
109
|
- Claude Desktop application
|
|
105
110
|
- WordPress site with REST API enabled
|
|
@@ -202,6 +207,7 @@ WORDPRESS_AUTH_METHOD=app-password
|
|
|
202
207
|
Production-ready containerized deployment.
|
|
203
208
|
|
|
204
209
|
### Docker Prerequisites
|
|
210
|
+
|
|
205
211
|
- Docker 20.10+
|
|
206
212
|
- Docker Compose (optional)
|
|
207
213
|
|
|
@@ -223,7 +229,7 @@ docker logs mcp-wordpress
|
|
|
223
229
|
### Docker Compose
|
|
224
230
|
|
|
225
231
|
```yaml
|
|
226
|
-
version:
|
|
232
|
+
version: "3.8"
|
|
227
233
|
services:
|
|
228
234
|
mcp-wordpress:
|
|
229
235
|
image: docdyhr/mcp-wordpress:latest
|
|
@@ -243,6 +249,7 @@ services:
|
|
|
243
249
|
For contributors and custom development.
|
|
244
250
|
|
|
245
251
|
### Development Prerequisites
|
|
252
|
+
|
|
246
253
|
- Node.js 18+
|
|
247
254
|
- npm or yarn
|
|
248
255
|
- Git
|
|
@@ -287,15 +294,15 @@ WORDPRESS_APP_PASSWORD=dev-password
|
|
|
287
294
|
|
|
288
295
|
### Environment Variables
|
|
289
296
|
|
|
290
|
-
| Variable
|
|
291
|
-
|
|
292
|
-
| `WORDPRESS_SITE_URL`
|
|
293
|
-
| `WORDPRESS_USERNAME`
|
|
294
|
-
| `WORDPRESS_APP_PASSWORD` | Yes
|
|
295
|
-
| `WORDPRESS_AUTH_METHOD`
|
|
296
|
-
| `NODE_ENV`
|
|
297
|
-
| `DEBUG`
|
|
298
|
-
| `DISABLE_CACHE`
|
|
297
|
+
| Variable | Required | Default | Description |
|
|
298
|
+
| ------------------------ | -------- | -------------- | --------------------- |
|
|
299
|
+
| `WORDPRESS_SITE_URL` | Yes | - | WordPress site URL |
|
|
300
|
+
| `WORDPRESS_USERNAME` | Yes | - | WordPress username |
|
|
301
|
+
| `WORDPRESS_APP_PASSWORD` | Yes | - | Application password |
|
|
302
|
+
| `WORDPRESS_AUTH_METHOD` | No | `app-password` | Authentication method |
|
|
303
|
+
| `NODE_ENV` | No | `production` | Environment mode |
|
|
304
|
+
| `DEBUG` | No | `false` | Enable debug logging |
|
|
305
|
+
| `DISABLE_CACHE` | No | `false` | Disable caching |
|
|
299
306
|
|
|
300
307
|
### Multi-Site Configuration
|
|
301
308
|
|
|
@@ -352,11 +359,13 @@ npm run health
|
|
|
352
359
|
### Common Verification Issues
|
|
353
360
|
|
|
354
361
|
**Tools not appearing in Claude:**
|
|
362
|
+
|
|
355
363
|
- Restart Claude Desktop
|
|
356
364
|
- Check configuration file syntax
|
|
357
365
|
- Verify environment variables
|
|
358
366
|
|
|
359
367
|
**Connection failed:**
|
|
368
|
+
|
|
360
369
|
- Test WordPress REST API: `curl https://your-site.com/wp-json/wp/v2/`
|
|
361
370
|
- Verify Application Password format
|
|
362
371
|
- Check WordPress permissions
|
|
@@ -366,16 +375,19 @@ npm run health
|
|
|
366
375
|
### Common Issues
|
|
367
376
|
|
|
368
377
|
1. **"Cannot connect to WordPress"**
|
|
378
|
+
|
|
369
379
|
- Verify `WORDPRESS_SITE_URL` format
|
|
370
380
|
- Check if WordPress REST API is enabled
|
|
371
381
|
- Test manually: `curl https://your-site.com/wp-json/wp/v2/`
|
|
372
382
|
|
|
373
383
|
2. **"Authentication failed"**
|
|
384
|
+
|
|
374
385
|
- Verify Application Password format (with spaces)
|
|
375
386
|
- Check WordPress user permissions
|
|
376
387
|
- Ensure Application Passwords are enabled
|
|
377
388
|
|
|
378
389
|
3. **"Tools not working in Claude"**
|
|
390
|
+
|
|
379
391
|
- Restart Claude Desktop
|
|
380
392
|
- Check configuration file location
|
|
381
393
|
- Verify JSON syntax
|
|
@@ -390,12 +402,14 @@ npm run health
|
|
|
390
402
|
## 🔐 Security Considerations
|
|
391
403
|
|
|
392
404
|
### WordPress Security
|
|
405
|
+
|
|
393
406
|
- Use Application Passwords (recommended)
|
|
394
407
|
- Create dedicated MCP user with minimal permissions
|
|
395
408
|
- Enable HTTPS for production
|
|
396
409
|
- Regular security updates
|
|
397
410
|
|
|
398
411
|
### MCP Server Security
|
|
412
|
+
|
|
399
413
|
- Keep dependencies updated
|
|
400
414
|
- Use environment variables for secrets
|
|
401
415
|
- Enable firewall rules for Docker deployments
|
|
@@ -422,4 +436,4 @@ After successful installation:
|
|
|
422
436
|
|
|
423
437
|
**Found an issue with this guide?**
|
|
424
438
|
[Edit on GitHub](https://github.com/docdyhr/mcp-wordpress/edit/main/docs/INSTALLATION.md) or
|
|
425
|
-
[open an issue](https://github.com/docdyhr/mcp-wordpress/issues/new).
|
|
439
|
+
[open an issue](https://github.com/docdyhr/mcp-wordpress/issues/new).
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## Overview
|
|
4
4
|
|
|
5
|
-
This guide helps troubleshoot and resolve publishing issues for the MCP WordPress project. The project publishes
|
|
6
|
-
|
|
5
|
+
This guide helps troubleshoot and resolve publishing issues for the MCP WordPress project. The project publishes to two
|
|
6
|
+
main targets:
|
|
7
7
|
|
|
8
8
|
1. **NPM Registry** - Node.js package
|
|
9
9
|
2. **Docker Hub** - Container images
|
|
@@ -200,6 +200,7 @@ If all automated processes fail:
|
|
|
200
200
|
### Regular Maintenance
|
|
201
201
|
|
|
202
202
|
1. **Rotate secrets annually:**
|
|
203
|
+
|
|
203
204
|
- NPM_TOKEN
|
|
204
205
|
- DOCKER_USERNAME/DOCKER_PASSWORD
|
|
205
206
|
|
package/docs/SECURITY.md
CHANGED
|
@@ -87,12 +87,12 @@ threat mitigation, and compliance requirements.
|
|
|
87
87
|
|
|
88
88
|
### Authentication Methods Comparison
|
|
89
89
|
|
|
90
|
-
| Method
|
|
91
|
-
|
|
92
|
-
| **Application Password** | 🟢 High
|
|
93
|
-
| **JWT**
|
|
94
|
-
| **Basic Auth**
|
|
95
|
-
| **API Key**
|
|
90
|
+
| Method | Security Level | Production Ready | Use Case |
|
|
91
|
+
| ------------------------ | -------------- | -------------------- | -------------------------------- |
|
|
92
|
+
| **Application Password** | 🟢 High | ✅ Yes | Recommended for all environments |
|
|
93
|
+
| **JWT** | 🟡 Medium | ⚠️ With proper setup | API-heavy applications |
|
|
94
|
+
| **Basic Auth** | 🔴 Low | ❌ No | Development only |
|
|
95
|
+
| **API Key** | 🟡 Medium | ⚠️ Plugin dependent | Plugin-based authentication |
|
|
96
96
|
|
|
97
97
|
## Input Validation & Sanitization
|
|
98
98
|
|
|
@@ -133,18 +133,18 @@ validateSearchQuery(query);
|
|
|
133
133
|
```typescript
|
|
134
134
|
// Post creation with contextual validation
|
|
135
135
|
validatePostParams({
|
|
136
|
-
title: "My Post",
|
|
136
|
+
title: "My Post", // Required, sanitized
|
|
137
137
|
content: "<p>Safe HTML</p>", // XSS protection
|
|
138
|
-
status: "future",
|
|
138
|
+
status: "future", // Valid status
|
|
139
139
|
date: "2024-01-01T10:00:00", // Required for future posts
|
|
140
|
-
categories: [1, 2, 3]
|
|
140
|
+
categories: [1, 2, 3], // Valid category IDs
|
|
141
141
|
});
|
|
142
142
|
|
|
143
143
|
// Pagination with conflict detection
|
|
144
144
|
validatePaginationParams({
|
|
145
145
|
page: 1,
|
|
146
146
|
per_page: 10,
|
|
147
|
-
offset: 20
|
|
147
|
+
offset: 20, // ERROR: Cannot use page and offset together
|
|
148
148
|
});
|
|
149
149
|
```
|
|
150
150
|
|
|
@@ -158,7 +158,7 @@ const dangerousPatterns = [
|
|
|
158
158
|
/<script[^>]*>[\s\S]*?<\/script>/gi,
|
|
159
159
|
/<iframe[^>]*>/gi,
|
|
160
160
|
/javascript:/gi,
|
|
161
|
-
/on\w+\s*=/gi
|
|
161
|
+
/on\w+\s*=/gi, // Event handlers
|
|
162
162
|
];
|
|
163
163
|
```
|
|
164
164
|
|
|
@@ -166,10 +166,7 @@ const dangerousPatterns = [
|
|
|
166
166
|
|
|
167
167
|
```typescript
|
|
168
168
|
// Query sanitization
|
|
169
|
-
sanitized = sanitized.replace(
|
|
170
|
-
/(\b(union|select|insert|update|delete|drop|create)\b)/gi,
|
|
171
|
-
""
|
|
172
|
-
);
|
|
169
|
+
sanitized = sanitized.replace(/(\b(union|select|insert|update|delete|drop|create)\b)/gi, "");
|
|
173
170
|
```
|
|
174
171
|
|
|
175
172
|
**Path Traversal Prevention:**
|
|
@@ -421,18 +418,21 @@ grep "Security validation failed" /var/log/mcp-wordpress.log
|
|
|
421
418
|
### Security Incident Checklist
|
|
422
419
|
|
|
423
420
|
1. **Immediate Response**
|
|
421
|
+
|
|
424
422
|
- Disable affected accounts
|
|
425
423
|
- Rotate compromised credentials
|
|
426
424
|
- Enable additional logging
|
|
427
425
|
- Document incident timeline
|
|
428
426
|
|
|
429
427
|
2. **Investigation**
|
|
428
|
+
|
|
430
429
|
- Analyze access logs
|
|
431
430
|
- Check WordPress audit logs
|
|
432
431
|
- Review security monitoring
|
|
433
432
|
- Identify attack vectors
|
|
434
433
|
|
|
435
434
|
3. **Remediation**
|
|
435
|
+
|
|
436
436
|
- Patch vulnerabilities
|
|
437
437
|
- Update credentials
|
|
438
438
|
- Strengthen security controls
|
|
@@ -568,11 +568,13 @@ npm run test:security:penetration
|
|
|
568
568
|
**Security Validation:**
|
|
569
569
|
|
|
570
570
|
1. **Authentication Testing**
|
|
571
|
+
|
|
571
572
|
- Invalid credential handling
|
|
572
573
|
- Brute force protection
|
|
573
574
|
- Session management
|
|
574
575
|
|
|
575
576
|
2. **Input Validation Testing**
|
|
577
|
+
|
|
576
578
|
- XSS prevention
|
|
577
579
|
- SQL injection protection
|
|
578
580
|
- Path traversal prevention
|
package/docs/SECURITY_TESTING.md
CHANGED
|
@@ -11,17 +11,20 @@ This guide covers the comprehensive security testing and validation framework im
|
|
|
11
11
|
### Core Security Components
|
|
12
12
|
|
|
13
13
|
1. **Input Validation** (`src/security/InputValidator.ts`)
|
|
14
|
+
|
|
14
15
|
- Zod-based schema validation
|
|
15
16
|
- XSS protection patterns
|
|
16
17
|
- SQL injection prevention
|
|
17
18
|
- Path traversal protection
|
|
18
19
|
|
|
19
20
|
2. **Rate Limiting** (`SecurityLimiter` class)
|
|
21
|
+
|
|
20
22
|
- Request throttling per user/IP
|
|
21
23
|
- DoS attack prevention
|
|
22
24
|
- Automatic cleanup of expired entries
|
|
23
25
|
|
|
24
26
|
3. **Input Sanitization** (`InputSanitizer` class)
|
|
27
|
+
|
|
25
28
|
- HTML content sanitization
|
|
26
29
|
- Search query cleaning
|
|
27
30
|
- File path normalization
|