mcp-wordpress 1.5.2 → 2.0.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 +332 -61
- package/dist/cache/CacheInvalidation.d.ts.map +1 -1
- package/dist/cache/CacheInvalidation.js +4 -4
- package/dist/cache/CacheInvalidation.js.map +1 -1
- package/dist/client/MockWordPressClient.d.ts +55 -0
- package/dist/client/MockWordPressClient.d.ts.map +1 -0
- package/dist/client/MockWordPressClient.js +369 -0
- package/dist/client/MockWordPressClient.js.map +1 -0
- package/dist/client/api.d.ts +1 -0
- package/dist/client/api.d.ts.map +1 -1
- package/dist/client/api.js +26 -60
- package/dist/client/api.js.map +1 -1
- package/dist/client/managers/AuthenticationManager.d.ts.map +1 -1
- package/dist/client/managers/AuthenticationManager.js +4 -3
- package/dist/client/managers/AuthenticationManager.js.map +1 -1
- package/dist/config/ConfigurationSchema.d.ts +3 -3
- package/dist/config/ConfigurationSchema.d.ts.map +1 -1
- package/dist/config/ConfigurationSchema.js +7 -24
- package/dist/config/ConfigurationSchema.js.map +1 -1
- package/dist/config/ServerConfiguration.d.ts +8 -0
- package/dist/config/ServerConfiguration.d.ts.map +1 -1
- package/dist/config/ServerConfiguration.js +80 -31
- package/dist/config/ServerConfiguration.js.map +1 -1
- package/dist/docs/DocumentationGenerator.d.ts.map +1 -1
- package/dist/docs/DocumentationGenerator.js +5 -7
- package/dist/docs/DocumentationGenerator.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +33 -29
- package/dist/index.js.map +1 -1
- package/dist/security/InputValidator.d.ts.map +1 -1
- package/dist/security/InputValidator.js +3 -11
- package/dist/security/InputValidator.js.map +1 -1
- package/dist/server/ToolRegistry.d.ts +4 -0
- package/dist/server/ToolRegistry.d.ts.map +1 -1
- package/dist/server/ToolRegistry.js +71 -8
- package/dist/server/ToolRegistry.js.map +1 -1
- package/dist/tools/auth.d.ts.map +1 -1
- package/dist/tools/auth.js +8 -3
- package/dist/tools/auth.js.map +1 -1
- package/dist/tools/posts.d.ts.map +1 -1
- package/dist/tools/posts.js +287 -20
- package/dist/tools/posts.js.map +1 -1
- package/dist/tools/site.d.ts.map +1 -1
- package/dist/tools/site.js +47 -9
- package/dist/tools/site.js.map +1 -1
- package/dist/tools/users.d.ts.map +1 -1
- package/dist/tools/users.js +113 -10
- package/dist/tools/users.js.map +1 -1
- package/dist/utils/enhancedError.d.ts +61 -0
- package/dist/utils/enhancedError.d.ts.map +1 -0
- package/dist/utils/enhancedError.js +221 -0
- package/dist/utils/enhancedError.js.map +1 -0
- package/dist/utils/streaming.d.ts +104 -0
- package/dist/utils/streaming.d.ts.map +1 -0
- package/dist/utils/streaming.js +312 -0
- package/dist/utils/streaming.js.map +1 -0
- package/dist/utils/validation.d.ts +19 -3
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +174 -24
- package/dist/utils/validation.js.map +1 -1
- package/docs/ARCHITECTURE.md +850 -0
- package/docs/CACHING.md +20 -17
- package/docs/CONFIGURATION.md +660 -0
- package/docs/DOCKER.md +61 -60
- package/docs/EVALUATION.md +397 -0
- package/docs/INSTALLATION.md +423 -0
- package/docs/PERFORMANCE_MONITORING.md +17 -15
- package/docs/SECURITY.md +621 -0
- package/docs/SECURITY_TESTING.md +22 -26
- package/docs/TEST_SITE_SETUP.md +136 -0
- package/docs/TROUBLESHOOTING.md +578 -0
- package/docs/api/README.md +76 -91
- package/docs/api/categories/auth.md +0 -2
- package/docs/api/categories/cache.md +0 -2
- package/docs/api/categories/comment.md +0 -2
- package/docs/api/categories/media.md +0 -2
- package/docs/api/categories/page.md +0 -2
- package/docs/api/categories/performance.md +0 -2
- package/docs/api/categories/post.md +0 -2
- package/docs/api/categories/site.md +0 -2
- package/docs/api/categories/taxonomy.md +0 -2
- package/docs/api/categories/user.md +0 -2
- package/docs/api/summary.json +1 -1
- package/docs/api/tools/wp_approve_comment.md +11 -3
- package/docs/api/tools/wp_cache_clear.md +14 -5
- package/docs/api/tools/wp_cache_info.md +14 -5
- package/docs/api/tools/wp_cache_stats.md +14 -5
- package/docs/api/tools/wp_cache_warm.md +14 -5
- package/docs/api/tools/wp_create_application_password.md +11 -3
- package/docs/api/tools/wp_create_category.md +11 -3
- package/docs/api/tools/wp_create_comment.md +14 -5
- package/docs/api/tools/wp_create_page.md +13 -5
- package/docs/api/tools/wp_create_post.md +14 -7
- package/docs/api/tools/wp_create_tag.md +11 -3
- package/docs/api/tools/wp_create_user.md +13 -5
- package/docs/api/tools/wp_delete_application_password.md +11 -3
- package/docs/api/tools/wp_delete_category.md +11 -3
- package/docs/api/tools/wp_delete_comment.md +11 -3
- package/docs/api/tools/wp_delete_media.md +10 -3
- package/docs/api/tools/wp_delete_page.md +10 -3
- package/docs/api/tools/wp_delete_post.md +11 -5
- package/docs/api/tools/wp_delete_tag.md +11 -3
- package/docs/api/tools/wp_delete_user.md +10 -3
- package/docs/api/tools/wp_get_application_passwords.md +11 -3
- package/docs/api/tools/wp_get_auth_status.md +11 -3
- package/docs/api/tools/wp_get_category.md +11 -3
- package/docs/api/tools/wp_get_comment.md +11 -3
- package/docs/api/tools/wp_get_current_user.md +11 -3
- package/docs/api/tools/wp_get_media.md +11 -3
- package/docs/api/tools/wp_get_page.md +11 -3
- package/docs/api/tools/wp_get_page_revisions.md +11 -3
- package/docs/api/tools/wp_get_post.md +12 -5
- package/docs/api/tools/wp_get_post_revisions.md +11 -3
- package/docs/api/tools/wp_get_site_settings.md +10 -3
- package/docs/api/tools/wp_get_tag.md +11 -3
- package/docs/api/tools/wp_get_user.md +11 -3
- package/docs/api/tools/wp_list_categories.md +11 -3
- package/docs/api/tools/wp_list_comments.md +11 -3
- package/docs/api/tools/wp_list_media.md +14 -5
- package/docs/api/tools/wp_list_pages.md +14 -5
- package/docs/api/tools/wp_list_posts.md +15 -7
- package/docs/api/tools/wp_list_tags.md +11 -3
- package/docs/api/tools/wp_list_users.md +11 -3
- package/docs/api/tools/wp_performance_alerts.md +17 -7
- package/docs/api/tools/wp_performance_benchmark.md +17 -7
- package/docs/api/tools/wp_performance_export.md +17 -7
- package/docs/api/tools/wp_performance_history.md +17 -7
- package/docs/api/tools/wp_performance_optimize.md +17 -7
- package/docs/api/tools/wp_performance_stats.md +17 -7
- package/docs/api/tools/wp_search_site.md +11 -3
- package/docs/api/tools/wp_spam_comment.md +11 -3
- package/docs/api/tools/wp_switch_auth_method.md +14 -5
- package/docs/api/tools/wp_test_auth.md +11 -3
- package/docs/api/tools/wp_update_category.md +11 -3
- package/docs/api/tools/wp_update_comment.md +14 -5
- package/docs/api/tools/wp_update_media.md +14 -5
- package/docs/api/tools/wp_update_page.md +13 -5
- package/docs/api/tools/wp_update_post.md +14 -7
- package/docs/api/tools/wp_update_site_settings.md +14 -5
- package/docs/api/tools/wp_update_tag.md +11 -3
- package/docs/api/tools/wp_update_user.md +13 -5
- package/docs/api/tools/wp_upload_media.md +13 -5
- package/docs/api/types/WordPressPost.md +2 -0
- package/docs/code-improvements.md +40 -0
- package/docs/contract-testing.md +1 -1
- package/docs/developer/API_REFERENCE.md +19 -59
- package/docs/developer/ARCHITECTURE.md +8 -11
- package/docs/developer/BUILD_SYSTEM.md +2 -2
- package/docs/developer/CONTRIBUTING.md +3 -5
- package/docs/developer/GITHUB_ACTIONS_SETUP.md +2 -2
- package/docs/developer/MIGRATION_GUIDE.md +5 -6
- package/docs/developer/README.md +2 -1
- package/docs/developer/REFACTORING.md +9 -15
- package/docs/developer/RELEASE_PROCESS.md +4 -3
- package/docs/developer/TESTING.md +2 -2
- package/docs/examples/claude-desktop-config.md +8 -0
- package/docs/integrations/claude-desktop.md +426 -0
- package/docs/integrations/cline.md +537 -0
- package/docs/integrations/vs-code.md +515 -0
- package/docs/releases/COMMUNITY_ANNOUNCEMENT_v1.1.2.md +30 -23
- package/docs/releases/RELEASE_NOTES_v1.1.2.md +7 -6
- package/docs/testing-configurations.md +11 -0
- package/docs/user-guides/DOCKER_NPM_DTX_SETUP.md +3 -2
- package/docs/user-guides/DOCKER_SETUP.md +3 -2
- package/docs/user-guides/DTX_SETUP.md +6 -5
- package/docs/user-guides/DXT_INSTALLATION.md +4 -4
- package/docs/user-guides/NPM_SETUP.md +4 -2
- package/docs/user-guides/NPX_SETUP.md +4 -2
- package/docs/user-guides/SMITHERY_SETUP.md +402 -0
- package/docs/wordpress-rest-api-authentication-troubleshooting.md +45 -42
- package/package.json +12 -2
- package/src/cache/CacheInvalidation.ts +7 -18
- package/src/client/MockWordPressClient.ts +398 -0
- package/src/client/api.ts +77 -237
- package/src/client/managers/AuthenticationManager.ts +19 -56
- package/src/config/ConfigurationSchema.ts +14 -45
- package/src/config/ServerConfiguration.ts +98 -71
- package/src/docs/DocumentationGenerator.ts +39 -123
- package/src/dxt-entry.cjs +4 -1
- package/src/index.ts +35 -54
- package/src/security/InputValidator.ts +15 -57
- package/src/server/ToolRegistry.ts +88 -17
- package/src/tools/auth.ts +15 -22
- package/src/tools/posts.ts +347 -64
- package/src/tools/site.ts +69 -46
- package/src/tools/users.ts +142 -44
- package/src/utils/enhancedError.ts +248 -0
- package/src/utils/streaming.ts +428 -0
- package/src/utils/validation.ts +253 -92
- package/dist/mcp-wordpress-1.5.2.tgz +0 -0
|
@@ -0,0 +1,515 @@
|
|
|
1
|
+
# VS Code Integration Guide
|
|
2
|
+
|
|
3
|
+
**Complete guide to integrating WordPress MCP Server with VS Code and related tools**
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Cline Integration](#cline-integration)
|
|
8
|
+
- [GitHub Copilot Integration](#github-copilot-integration)
|
|
9
|
+
- [Continue Integration](#continue-integration)
|
|
10
|
+
- [VS Code Extensions](#vs-code-extensions)
|
|
11
|
+
- [Troubleshooting](#troubleshooting)
|
|
12
|
+
|
|
13
|
+
## Cline Integration
|
|
14
|
+
|
|
15
|
+
### Overview
|
|
16
|
+
|
|
17
|
+
[Cline](https://github.com/cline/cline) is a VS Code extension that brings AI assistance directly to your editor.
|
|
18
|
+
It supports MCP servers for extended functionality.
|
|
19
|
+
|
|
20
|
+
### Installation
|
|
21
|
+
|
|
22
|
+
1. **Install Cline Extension**
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# Install from VS Code Marketplace
|
|
26
|
+
code --install-extension cline.cline
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
2. **Configure MCP Server**
|
|
30
|
+
|
|
31
|
+
Open Cline settings and add MCP server configuration:
|
|
32
|
+
|
|
33
|
+
```json
|
|
34
|
+
{
|
|
35
|
+
"cline.mcpServers": {
|
|
36
|
+
"wordpress": {
|
|
37
|
+
"command": "npx",
|
|
38
|
+
"args": ["-y", "mcp-wordpress"],
|
|
39
|
+
"env": {
|
|
40
|
+
"WORDPRESS_SITE_URL": "https://your-site.com",
|
|
41
|
+
"WORDPRESS_USERNAME": "your-username",
|
|
42
|
+
"WORDPRESS_APP_PASSWORD": "your-app-password"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Usage Examples
|
|
50
|
+
|
|
51
|
+
**Content Creation Workflow:**
|
|
52
|
+
|
|
53
|
+
```text
|
|
54
|
+
🧑💻 You: "Create a new WordPress post about VS Code productivity tips"
|
|
55
|
+
🤖 Cline: "I'll create a new post for you using the WordPress MCP server..."
|
|
56
|
+
[Uses wp_create_post with generated content]
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Site Management:**
|
|
60
|
+
|
|
61
|
+
```text
|
|
62
|
+
🧑💻 You: "Check my WordPress site stats and list recent posts"
|
|
63
|
+
🤖 Cline: "Let me check your site statistics and recent posts..."
|
|
64
|
+
[Uses wp_get_site_settings and wp_list_posts]
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
**Media Management:**
|
|
68
|
+
|
|
69
|
+
```text
|
|
70
|
+
🧑💻 You: "Upload this image to WordPress and create a gallery post"
|
|
71
|
+
🤖 Cline: "I'll upload the image and create a gallery post..."
|
|
72
|
+
[Uses wp_upload_media and wp_create_post]
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Advanced Configuration
|
|
76
|
+
|
|
77
|
+
**Multi-Site Setup:**
|
|
78
|
+
|
|
79
|
+
```json
|
|
80
|
+
{
|
|
81
|
+
"cline.mcpServers": {
|
|
82
|
+
"wordpress-main": {
|
|
83
|
+
"command": "npx",
|
|
84
|
+
"args": ["-y", "mcp-wordpress"],
|
|
85
|
+
"env": {
|
|
86
|
+
"WORDPRESS_SITE_URL": "https://main-site.com",
|
|
87
|
+
"WORDPRESS_USERNAME": "admin",
|
|
88
|
+
"WORDPRESS_APP_PASSWORD": "xxxx-xxxx-xxxx-xxxx"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
"wordpress-blog": {
|
|
92
|
+
"command": "npx",
|
|
93
|
+
"args": ["-y", "mcp-wordpress"],
|
|
94
|
+
"env": {
|
|
95
|
+
"WORDPRESS_SITE_URL": "https://blog.example.com",
|
|
96
|
+
"WORDPRESS_USERNAME": "editor",
|
|
97
|
+
"WORDPRESS_APP_PASSWORD": "yyyy-yyyy-yyyy-yyyy"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
**Performance Optimization:**
|
|
105
|
+
|
|
106
|
+
```json
|
|
107
|
+
{
|
|
108
|
+
"cline.mcpServers": {
|
|
109
|
+
"wordpress": {
|
|
110
|
+
"command": "node",
|
|
111
|
+
"args": ["./node_modules/mcp-wordpress/dist/index.js"],
|
|
112
|
+
"env": {
|
|
113
|
+
"WORDPRESS_SITE_URL": "https://your-site.com",
|
|
114
|
+
"WORDPRESS_USERNAME": "your-username",
|
|
115
|
+
"WORDPRESS_APP_PASSWORD": "your-app-password",
|
|
116
|
+
"MCP_CACHE_ENABLED": "true",
|
|
117
|
+
"MCP_PERFORMANCE_MODE": "true"
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
## GitHub Copilot Integration
|
|
125
|
+
|
|
126
|
+
### Copilot Overview
|
|
127
|
+
|
|
128
|
+
GitHub Copilot can work with MCP servers through workspace configuration and custom prompts.
|
|
129
|
+
|
|
130
|
+
### Setup
|
|
131
|
+
|
|
132
|
+
1. **Install GitHub Copilot Extension**
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
code --install-extension github.copilot
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
2. **Create Workspace Configuration**
|
|
139
|
+
|
|
140
|
+
Create `.vscode/settings.json` in your project:
|
|
141
|
+
|
|
142
|
+
```json
|
|
143
|
+
{
|
|
144
|
+
"copilot.workspace.mcpServers": {
|
|
145
|
+
"wordpress": {
|
|
146
|
+
"command": "npx",
|
|
147
|
+
"args": ["-y", "mcp-wordpress"],
|
|
148
|
+
"env": {
|
|
149
|
+
"WORDPRESS_SITE_URL": "https://your-site.com",
|
|
150
|
+
"WORDPRESS_USERNAME": "your-username",
|
|
151
|
+
"WORDPRESS_APP_PASSWORD": "your-app-password"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
3. **Configure Custom Prompts**
|
|
159
|
+
|
|
160
|
+
Create `.vscode/copilot-prompts.json`:
|
|
161
|
+
|
|
162
|
+
```json
|
|
163
|
+
{
|
|
164
|
+
"wordpress-post": {
|
|
165
|
+
"description": "Create WordPress post with MCP",
|
|
166
|
+
"prompt": "Use the WordPress MCP server to create a new post with the following details: {{title}}, {{content}}, {{status}}"
|
|
167
|
+
},
|
|
168
|
+
"wordpress-site-check": {
|
|
169
|
+
"description": "Check WordPress site status",
|
|
170
|
+
"prompt": "Use the WordPress MCP server to check site status, list recent posts, and provide a summary"
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Usage Patterns
|
|
176
|
+
|
|
177
|
+
**Code Generation with WordPress Context:**
|
|
178
|
+
|
|
179
|
+
```typescript
|
|
180
|
+
// Copilot will suggest WordPress-aware code
|
|
181
|
+
const createPost = async (title: string, content: string) => {
|
|
182
|
+
// @copilot: Use WordPress MCP server to create post
|
|
183
|
+
const result = await mcpClient.call('wp_create_post', {
|
|
184
|
+
title,
|
|
185
|
+
content,
|
|
186
|
+
status: 'publish'
|
|
187
|
+
});
|
|
188
|
+
return result;
|
|
189
|
+
};
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
**Content Management Scripts:**
|
|
193
|
+
|
|
194
|
+
```typescript
|
|
195
|
+
// @copilot: Generate WordPress content management script
|
|
196
|
+
import { WordPressMCP } from 'mcp-wordpress';
|
|
197
|
+
|
|
198
|
+
const managePosts = async () => {
|
|
199
|
+
// Copilot will suggest WordPress-specific operations
|
|
200
|
+
const posts = await wordpress.listPosts({ status: 'draft' });
|
|
201
|
+
// Process draft posts...
|
|
202
|
+
};
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
## Continue Integration
|
|
206
|
+
|
|
207
|
+
### Continue Overview
|
|
208
|
+
|
|
209
|
+
[Continue](https://continue.dev/) is an open-source VS Code extension for AI-powered coding assistance.
|
|
210
|
+
|
|
211
|
+
### Installation & Setup
|
|
212
|
+
|
|
213
|
+
1. **Install Continue Extension**
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
code --install-extension continue.continue
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
2. **Configure MCP Server**
|
|
220
|
+
|
|
221
|
+
Edit `~/.continue/config.json`:
|
|
222
|
+
|
|
223
|
+
```json
|
|
224
|
+
{
|
|
225
|
+
"mcpServers": {
|
|
226
|
+
"wordpress": {
|
|
227
|
+
"command": "npx",
|
|
228
|
+
"args": ["-y", "mcp-wordpress"],
|
|
229
|
+
"env": {
|
|
230
|
+
"WORDPRESS_SITE_URL": "https://your-site.com",
|
|
231
|
+
"WORDPRESS_USERNAME": "your-username",
|
|
232
|
+
"WORDPRESS_APP_PASSWORD": "your-app-password"
|
|
233
|
+
},
|
|
234
|
+
"timeout": 30000
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
"contextProviders": [
|
|
238
|
+
{
|
|
239
|
+
"name": "wordpress",
|
|
240
|
+
"params": {
|
|
241
|
+
"serverName": "wordpress"
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
]
|
|
245
|
+
}
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Continue Usage Examples
|
|
249
|
+
|
|
250
|
+
**WordPress Development Workflow:**
|
|
251
|
+
|
|
252
|
+
```text
|
|
253
|
+
/wordpress What are my recent posts?
|
|
254
|
+
/wordpress Create a new post about "AI in web development"
|
|
255
|
+
/wordpress Check my site performance metrics
|
|
256
|
+
/wordpress List all users with editor role
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
**Content Creation:**
|
|
260
|
+
|
|
261
|
+
```text
|
|
262
|
+
/wordpress Generate a blog post about TypeScript best practices and publish it as a draft
|
|
263
|
+
/wordpress Upload an image from my desktop and create a photo gallery post
|
|
264
|
+
/wordpress Search for all posts containing "tutorial" and provide a summary
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**Site Management:**
|
|
268
|
+
|
|
269
|
+
```text
|
|
270
|
+
/wordpress Check my WordPress site health and security status
|
|
271
|
+
/wordpress List all plugins and their versions
|
|
272
|
+
/wordpress Create a backup of my site content
|
|
273
|
+
/wordpress Optimize my site performance settings
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
## VS Code Extensions
|
|
277
|
+
|
|
278
|
+
### Recommended Extensions
|
|
279
|
+
|
|
280
|
+
**Essential Extensions:**
|
|
281
|
+
|
|
282
|
+
- **WordPress Snippets** - Code snippets for WordPress development
|
|
283
|
+
- **PHP Intelephense** - PHP language support
|
|
284
|
+
- **REST Client** - Test WordPress REST API endpoints
|
|
285
|
+
- **GitLens** - Git integration for version control
|
|
286
|
+
|
|
287
|
+
**MCP-Compatible Extensions:**
|
|
288
|
+
|
|
289
|
+
- **Cline** - AI assistant with MCP support
|
|
290
|
+
- **Continue** - Open-source AI coding assistant
|
|
291
|
+
- **GitHub Copilot** - AI-powered code completion
|
|
292
|
+
- **Tabnine** - AI code completion
|
|
293
|
+
|
|
294
|
+
### Configuration
|
|
295
|
+
|
|
296
|
+
**Create workspace settings (`.vscode/settings.json`):**
|
|
297
|
+
|
|
298
|
+
```json
|
|
299
|
+
{
|
|
300
|
+
"php.validate.executablePath": "/usr/bin/php",
|
|
301
|
+
"wordpress.path": "/path/to/wordpress",
|
|
302
|
+
"rest-client.environmentVariables": {
|
|
303
|
+
"wordpress": {
|
|
304
|
+
"baseUrl": "https://your-site.com",
|
|
305
|
+
"username": "your-username",
|
|
306
|
+
"password": "your-app-password"
|
|
307
|
+
}
|
|
308
|
+
},
|
|
309
|
+
"cline.mcpServers": {
|
|
310
|
+
"wordpress": {
|
|
311
|
+
"command": "npx",
|
|
312
|
+
"args": ["-y", "mcp-wordpress"],
|
|
313
|
+
"env": {
|
|
314
|
+
"WORDPRESS_SITE_URL": "https://your-site.com",
|
|
315
|
+
"WORDPRESS_USERNAME": "your-username",
|
|
316
|
+
"WORDPRESS_APP_PASSWORD": "your-app-password"
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
**Create tasks (`.vscode/tasks.json`):**
|
|
324
|
+
|
|
325
|
+
```json
|
|
326
|
+
{
|
|
327
|
+
"version": "2.0.0",
|
|
328
|
+
"tasks": [
|
|
329
|
+
{
|
|
330
|
+
"label": "WordPress: Test Connection",
|
|
331
|
+
"type": "shell",
|
|
332
|
+
"command": "npx",
|
|
333
|
+
"args": ["mcp-wordpress", "test-auth"],
|
|
334
|
+
"group": "test",
|
|
335
|
+
"presentation": {
|
|
336
|
+
"echo": true,
|
|
337
|
+
"reveal": "always",
|
|
338
|
+
"focus": false,
|
|
339
|
+
"panel": "shared"
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"label": "WordPress: List Recent Posts",
|
|
344
|
+
"type": "shell",
|
|
345
|
+
"command": "npx",
|
|
346
|
+
"args": ["mcp-wordpress", "list-posts", "--per_page=10"],
|
|
347
|
+
"group": "build"
|
|
348
|
+
}
|
|
349
|
+
]
|
|
350
|
+
}
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
## Troubleshooting
|
|
354
|
+
|
|
355
|
+
### Common Issues
|
|
356
|
+
|
|
357
|
+
**1. MCP Server Not Starting**
|
|
358
|
+
|
|
359
|
+
```bash
|
|
360
|
+
# Check if MCP server is accessible
|
|
361
|
+
npx mcp-wordpress --version
|
|
362
|
+
|
|
363
|
+
# Test connection manually
|
|
364
|
+
npx mcp-wordpress wp_test_auth
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
**2. Authentication Failures**
|
|
368
|
+
|
|
369
|
+
```bash
|
|
370
|
+
# Verify credentials
|
|
371
|
+
curl -u username:app-password https://your-site.com/wp-json/wp/v2/users/me
|
|
372
|
+
|
|
373
|
+
# Check application password format
|
|
374
|
+
# ✅ Correct: xxxx-xxxx-xxxx-xxxx
|
|
375
|
+
# ❌ Wrong: "xxxx-xxxx-xxxx-xxxx" (no quotes)
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
**3. Extension Configuration Issues**
|
|
379
|
+
|
|
380
|
+
```json
|
|
381
|
+
// Check extension settings
|
|
382
|
+
{
|
|
383
|
+
"cline.debug": true,
|
|
384
|
+
"cline.logLevel": "debug",
|
|
385
|
+
"continue.telemetryEnabled": false
|
|
386
|
+
}
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
### Debug Mode
|
|
390
|
+
|
|
391
|
+
**Enable debug logging:**
|
|
392
|
+
|
|
393
|
+
```bash
|
|
394
|
+
# Set environment variable
|
|
395
|
+
export DEBUG=mcp-wordpress:*
|
|
396
|
+
|
|
397
|
+
# Run with debug output
|
|
398
|
+
npx mcp-wordpress wp_test_auth
|
|
399
|
+
```
|
|
400
|
+
|
|
401
|
+
**VS Code debugging:**
|
|
402
|
+
|
|
403
|
+
```json
|
|
404
|
+
{
|
|
405
|
+
"launch": {
|
|
406
|
+
"version": "0.2.0",
|
|
407
|
+
"configurations": [
|
|
408
|
+
{
|
|
409
|
+
"name": "Debug MCP WordPress",
|
|
410
|
+
"type": "node",
|
|
411
|
+
"request": "launch",
|
|
412
|
+
"program": "${workspaceFolder}/node_modules/mcp-wordpress/dist/index.js",
|
|
413
|
+
"env": {
|
|
414
|
+
"DEBUG": "mcp-wordpress:*",
|
|
415
|
+
"WORDPRESS_SITE_URL": "https://your-site.com",
|
|
416
|
+
"WORDPRESS_USERNAME": "your-username",
|
|
417
|
+
"WORDPRESS_APP_PASSWORD": "your-app-password"
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
]
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
### Performance Optimization
|
|
426
|
+
|
|
427
|
+
**Optimize MCP server performance:**
|
|
428
|
+
|
|
429
|
+
```json
|
|
430
|
+
{
|
|
431
|
+
"cline.mcpServers": {
|
|
432
|
+
"wordpress": {
|
|
433
|
+
"command": "node",
|
|
434
|
+
"args": ["./node_modules/mcp-wordpress/dist/index.js"],
|
|
435
|
+
"env": {
|
|
436
|
+
"WORDPRESS_SITE_URL": "https://your-site.com",
|
|
437
|
+
"WORDPRESS_USERNAME": "your-username",
|
|
438
|
+
"WORDPRESS_APP_PASSWORD": "your-app-password",
|
|
439
|
+
"MCP_CACHE_TTL": "300",
|
|
440
|
+
"MCP_REQUEST_TIMEOUT": "30000",
|
|
441
|
+
"MCP_MAX_CONNECTIONS": "10"
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
**Reduce extension overhead:**
|
|
449
|
+
|
|
450
|
+
```json
|
|
451
|
+
{
|
|
452
|
+
"cline.autoStart": false,
|
|
453
|
+
"cline.maxConcurrentRequests": 3,
|
|
454
|
+
"continue.maxConcurrentRequests": 2
|
|
455
|
+
}
|
|
456
|
+
```
|
|
457
|
+
|
|
458
|
+
## Best Practices
|
|
459
|
+
|
|
460
|
+
### Security
|
|
461
|
+
|
|
462
|
+
- Never commit credentials to version control
|
|
463
|
+
- Use environment variables for sensitive data
|
|
464
|
+
- Regularly rotate WordPress application passwords
|
|
465
|
+
- Enable HTTPS for all WordPress connections
|
|
466
|
+
|
|
467
|
+
### Performance
|
|
468
|
+
|
|
469
|
+
- Use caching for frequently accessed data
|
|
470
|
+
- Implement connection pooling
|
|
471
|
+
- Set appropriate timeouts
|
|
472
|
+
- Monitor resource usage
|
|
473
|
+
|
|
474
|
+
### Development Workflow
|
|
475
|
+
|
|
476
|
+
- Use version control for configuration files
|
|
477
|
+
- Test integrations in development environment
|
|
478
|
+
- Document custom prompts and workflows
|
|
479
|
+
- Keep extensions updated
|
|
480
|
+
|
|
481
|
+
### Collaboration
|
|
482
|
+
|
|
483
|
+
- Share workspace configuration with team
|
|
484
|
+
- Document custom MCP server configurations
|
|
485
|
+
- Use consistent naming conventions
|
|
486
|
+
- Maintain integration documentation
|
|
487
|
+
|
|
488
|
+
---
|
|
489
|
+
|
|
490
|
+
## Resources
|
|
491
|
+
|
|
492
|
+
### Documentation
|
|
493
|
+
|
|
494
|
+
- [Cline Documentation](https://github.com/cline/cline/wiki)
|
|
495
|
+
- [Continue Documentation](https://continue.dev/docs)
|
|
496
|
+
- [GitHub Copilot Documentation](https://docs.github.com/copilot)
|
|
497
|
+
- [VS Code Extension API](https://code.visualstudio.com/api)
|
|
498
|
+
|
|
499
|
+
### Community
|
|
500
|
+
|
|
501
|
+
- [WordPress MCP Server Discussions](https://github.com/docdyhr/mcp-wordpress/discussions)
|
|
502
|
+
- [VS Code Community](https://github.com/microsoft/vscode/discussions)
|
|
503
|
+
- [MCP Protocol Discussions](https://github.com/modelcontextprotocol/protocol/discussions)
|
|
504
|
+
|
|
505
|
+
### Support
|
|
506
|
+
|
|
507
|
+
- GitHub Issues: [Report integration problems](https://github.com/docdyhr/mcp-wordpress/issues)
|
|
508
|
+
- Email Support: <support@example.com>
|
|
509
|
+
- Community Forum: [WordPress MCP Community](https://community.example.com)
|
|
510
|
+
|
|
511
|
+
---
|
|
512
|
+
|
|
513
|
+
*This guide is regularly updated. Last updated: 2024-01-15*
|
|
514
|
+
|
|
515
|
+
*For VS Code integration questions, visit our [GitHub Discussions](https://github.com/docdyhr/mcp-wordpress/discussions)*
|
|
@@ -6,11 +6,13 @@
|
|
|
6
6
|
|
|
7
7
|
Hey WordPress community! 👋
|
|
8
8
|
|
|
9
|
-
I'm excited to share that we've just released **MCP WordPress v1.1.2**, featuring a major technical debt refactoring
|
|
9
|
+
I'm excited to share that we've just released **MCP WordPress v1.1.2**, featuring a major technical debt refactoring
|
|
10
|
+
that achieved a **94% reduction in our core API module** (from 1,043 lines to just 59 lines)!
|
|
10
11
|
|
|
11
12
|
### What is MCP WordPress?
|
|
12
13
|
|
|
13
|
-
It's a Model Context Protocol server that provides 54 tools for managing WordPress sites through the REST API. Perfect
|
|
14
|
+
It's a Model Context Protocol server that provides 54 tools for managing WordPress sites through the REST API. Perfect
|
|
15
|
+
for automation, AI assistants, and developers who want programmatic WordPress control.
|
|
14
16
|
|
|
15
17
|
### What's New in v1.1.2?
|
|
16
18
|
|
|
@@ -32,8 +34,7 @@ npx mcp-wordpress
|
|
|
32
34
|
- [Docker Setup](../user-guides/DOCKER_SETUP.md) - Containerized deployment
|
|
33
35
|
- [DTX Setup](../user-guides/DTX_SETUP.md) - Desktop Extension
|
|
34
36
|
|
|
35
|
-
**GitHub**: <https://github.com/docdyhr/mcp-wordpress>
|
|
36
|
-
**NPM**: <https://www.npmjs.com/package/mcp-wordpress>
|
|
37
|
+
**GitHub**: <https://github.com/docdyhr/mcp-wordpress> **NPM**: <https://www.npmjs.com/package/mcp-wordpress>
|
|
37
38
|
|
|
38
39
|
Would love your feedback and contributions! 🚀
|
|
39
40
|
|
|
@@ -43,16 +44,16 @@ Would love your feedback and contributions! 🚀
|
|
|
43
44
|
|
|
44
45
|
🎉 Just released MCP WordPress v1.1.2!
|
|
45
46
|
|
|
46
|
-
Major achievement: 94% code reduction through modular refactoring (1043→59 lines) while maintaining 100% backward
|
|
47
|
+
Major achievement: 94% code reduction through modular refactoring (1043→59 lines) while maintaining 100% backward
|
|
48
|
+
compatibility.
|
|
47
49
|
|
|
48
|
-
✅ 95%+ test coverage
|
|
49
|
-
🏗️ Clean architecture
|
|
50
|
-
⚡ Better performance
|
|
51
|
-
🔐 Multi-site support
|
|
50
|
+
✅ 95%+ test coverage 🏗️ Clean architecture ⚡ Better performance 🔐 Multi-site support
|
|
52
51
|
|
|
53
52
|
Try it: npx mcp-wordpress
|
|
54
53
|
|
|
55
|
-
|
|
54
|
+
## Tags
|
|
55
|
+
|
|
56
|
+
WordPress #TypeScript #OpenSource
|
|
56
57
|
|
|
57
58
|
---
|
|
58
59
|
|
|
@@ -60,33 +61,38 @@ Try it: npx mcp-wordpress
|
|
|
60
61
|
|
|
61
62
|
**Excited to announce MCP WordPress v1.1.2 - A Technical Debt Success Story**
|
|
62
63
|
|
|
63
|
-
We've just completed a major refactoring that reduced our core API module by 94% (from 1,043 to 59 lines) while
|
|
64
|
+
We've just completed a major refactoring that reduced our core API module by 94% (from 1,043 to 59 lines) while
|
|
65
|
+
maintaining 100% backward compatibility.
|
|
64
66
|
|
|
65
|
-
Key achievements:
|
|
66
|
-
•
|
|
67
|
-
• 95%+ test coverage across all functionality
|
|
68
|
-
• Standardized error handling patterns
|
|
69
|
-
• Improved performance and memory management
|
|
67
|
+
Key achievements: • Modular manager-based architecture • 95%+ test coverage across all functionality • Standardized
|
|
68
|
+
error handling patterns • Improved performance and memory management
|
|
70
69
|
|
|
71
|
-
This release demonstrates how technical debt can be addressed systematically without disrupting users. The refactoring
|
|
70
|
+
This release demonstrates how technical debt can be addressed systematically without disrupting users. The refactoring
|
|
71
|
+
sets a solid foundation for future features while making the codebase more maintainable and contributor-friendly.
|
|
72
72
|
|
|
73
|
-
MCP WordPress provides 54 tools for managing WordPress sites programmatically, supporting multi-site configurations and
|
|
73
|
+
MCP WordPress provides 54 tools for managing WordPress sites programmatically, supporting multi-site configurations and
|
|
74
|
+
multiple authentication methods.
|
|
74
75
|
|
|
75
76
|
Try it today: <https://www.npmjs.com/package/mcp-wordpress>
|
|
76
77
|
|
|
77
|
-
|
|
78
|
+
## LinkedIn Tags
|
|
79
|
+
|
|
80
|
+
SoftwareEngineering #OpenSource #WordPress #TypeScript #TechnicalDebt
|
|
78
81
|
|
|
79
82
|
---
|
|
80
83
|
|
|
81
84
|
## For Dev.to / Medium Article Intro
|
|
82
85
|
|
|
83
|
-
|
|
86
|
+
## How We Achieved 94% Code Reduction: MCP WordPress v1.1.2 Refactoring Story
|
|
84
87
|
|
|
85
|
-
When we looked at our 1,043-line monolithic API client, we knew it was time for change. Today, I'm excited to share how
|
|
88
|
+
When we looked at our 1,043-line monolithic API client, we knew it was time for change. Today, I'm excited to share how
|
|
89
|
+
we transformed MCP WordPress through systematic refactoring, achieving dramatic improvements while maintaining complete
|
|
90
|
+
backward compatibility.
|
|
86
91
|
|
|
87
92
|
## The Challenge
|
|
88
93
|
|
|
89
|
-
Our `api.ts` file had grown organically to over 1,000 lines, violating multiple SOLID principles and making maintenance
|
|
94
|
+
Our `api.ts` file had grown organically to over 1,000 lines, violating multiple SOLID principles and making maintenance
|
|
95
|
+
increasingly difficult. The technical debt was clear:
|
|
90
96
|
|
|
91
97
|
- Single file handling authentication, requests, and business logic
|
|
92
98
|
- Repetitive error handling patterns (49 try-catch blocks!)
|
|
@@ -138,6 +144,7 @@ Installation:
|
|
|
138
144
|
npx mcp-wordpress
|
|
139
145
|
```
|
|
140
146
|
|
|
141
|
-
Check out the modular architecture that makes it easy to extend and maintain. Would love feedback from the Claude
|
|
147
|
+
Check out the modular architecture that makes it easy to extend and maintain. Would love feedback from the Claude
|
|
148
|
+
community on how you're using it!
|
|
142
149
|
|
|
143
150
|
GitHub: <https://github.com/docdyhr/mcp-wordpress>
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## 🏆 Major Technical Debt Refactoring Achievement
|
|
4
4
|
|
|
5
|
-
We're excited to announce **v1.1.2**, a major milestone featuring comprehensive technical debt refactoring that
|
|
5
|
+
We're excited to announce **v1.1.2**, a major milestone featuring comprehensive technical debt refactoring that
|
|
6
|
+
dramatically improves code maintainability while preserving 100% backward compatibility.
|
|
6
7
|
|
|
7
8
|
---
|
|
8
9
|
|
|
@@ -152,9 +153,11 @@ We're excited to announce **v1.1.2**, a major milestone featuring comprehensive
|
|
|
152
153
|
|
|
153
154
|
## 🙏 Acknowledgments
|
|
154
155
|
|
|
155
|
-
This refactoring represents months of careful planning and implementation, ensuring that we could dramatically improve
|
|
156
|
+
This refactoring represents months of careful planning and implementation, ensuring that we could dramatically improve
|
|
157
|
+
the codebase while maintaining complete compatibility for our users.
|
|
156
158
|
|
|
157
|
-
**Special thanks to all community members** who have been using and testing the WordPress MCP server, providing valuable
|
|
159
|
+
**Special thanks to all community members** who have been using and testing the WordPress MCP server, providing valuable
|
|
160
|
+
feedback that guided this refactoring effort.
|
|
158
161
|
|
|
159
162
|
---
|
|
160
163
|
|
|
@@ -194,6 +197,4 @@ npm update -g mcp-wordpress
|
|
|
194
197
|
|
|
195
198
|
**🤖 Generated with [Claude Code](https://claude.ai/code)**
|
|
196
199
|
|
|
197
|
-
_Release Date: June 29, 2025_
|
|
198
|
-
_Version: 1.1.2_
|
|
199
|
-
_Codename: "Modular Foundation"_
|
|
200
|
+
_Release Date: June 29, 2025_ _Version: 1.1.2_ _Codename: "Modular Foundation"_
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# Jest Configuration Documentation
|
|
2
|
+
|
|
3
|
+
This project uses multiple Jest configurations for different testing scenarios:
|
|
4
|
+
|
|
5
|
+
- **jest.config.cjs**: Main Jest configuration (default)
|
|
6
|
+
- **jest.typescript.config.json**: TypeScript test configuration (used by npm test)
|
|
7
|
+
- **jest.ci.config.json**: CI-specific configuration with limited test scope
|
|
8
|
+
- **jest.test-env.config.json**: Environment testing configuration
|
|
9
|
+
- **jest.vscode.config.json**: VS Code integration configuration
|
|
10
|
+
|
|
11
|
+
Each configuration serves a specific purpose and is optimized for its use case.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Docker, NPM, and DTX Setup Guide
|
|
2
2
|
|
|
3
|
-
This guide provides step-by-step instructions for setting up the MCP WordPress server using Docker, NPM, and DTX,
|
|
3
|
+
This guide provides step-by-step instructions for setting up the MCP WordPress server using Docker, NPM, and DTX,
|
|
4
|
+
including Claude Desktop configuration.
|
|
4
5
|
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -67,7 +68,7 @@ For multi-site setups, mount a configuration file:
|
|
|
67
68
|
}
|
|
68
69
|
```
|
|
69
70
|
|
|
70
|
-
|
|
71
|
+
1. Run the container with the configuration file:
|
|
71
72
|
|
|
72
73
|
```bash
|
|
73
74
|
# For Claude Desktop MCP integration (recommended)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
# Docker Setup Guide
|
|
2
2
|
|
|
3
|
-
This guide provides step-by-step instructions for setting up the MCP WordPress server using Docker, specifically for
|
|
3
|
+
This guide provides step-by-step instructions for setting up the MCP WordPress server using Docker, specifically for
|
|
4
|
+
Claude Desktop integration.
|
|
4
5
|
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -71,7 +72,7 @@ Add this to your Claude Desktop configuration file (`~/Library/Application Suppo
|
|
|
71
72
|
}
|
|
72
73
|
```
|
|
73
74
|
|
|
74
|
-
|
|
75
|
+
1. **Add to Claude Desktop configuration**:
|
|
75
76
|
|
|
76
77
|
```json
|
|
77
78
|
{
|