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,537 @@
|
|
|
1
|
+
# Cline Integration Guide
|
|
2
|
+
|
|
3
|
+
**Complete guide to integrating WordPress MCP Server with Cline AI assistant**
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Overview](#overview)
|
|
8
|
+
- [Installation](#installation)
|
|
9
|
+
- [Configuration](#configuration)
|
|
10
|
+
- [Usage Examples](#usage-examples)
|
|
11
|
+
- [Advanced Workflows](#advanced-workflows)
|
|
12
|
+
- [Troubleshooting](#troubleshooting)
|
|
13
|
+
|
|
14
|
+
## Overview
|
|
15
|
+
|
|
16
|
+
[Cline](https://github.com/cline/cline) is a powerful VS Code extension that brings AI assistance directly to your editor.
|
|
17
|
+
With MCP server support, Cline can interact with your WordPress sites through natural language commands.
|
|
18
|
+
|
|
19
|
+
### Benefits
|
|
20
|
+
|
|
21
|
+
- **Natural Language Interface** - Control WordPress through conversational commands
|
|
22
|
+
- **Integrated Development** - WordPress management without leaving VS Code
|
|
23
|
+
- **Automation** - Streamline content creation and site management workflows
|
|
24
|
+
- **Multi-Site Support** - Manage multiple WordPress sites from one interface
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
### Step 1: Install Cline Extension
|
|
29
|
+
|
|
30
|
+
**Via VS Code Marketplace:**
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
code --install-extension cline.cline
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
**Manual Installation:**
|
|
37
|
+
|
|
38
|
+
1. Open VS Code
|
|
39
|
+
2. Go to Extensions (Ctrl+Shift+X)
|
|
40
|
+
3. Search for "Cline"
|
|
41
|
+
4. Click "Install"
|
|
42
|
+
|
|
43
|
+
### Step 2: Install WordPress MCP Server
|
|
44
|
+
|
|
45
|
+
**Global Installation:**
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
npm install -g mcp-wordpress
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
**Or use NPX (recommended):**
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
# NPX will automatically download and run the latest version
|
|
55
|
+
npx mcp-wordpress --version
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Step 3: Verify Installation
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# Test MCP server
|
|
62
|
+
npx mcp-wordpress wp_test_auth
|
|
63
|
+
|
|
64
|
+
# Check Cline extension
|
|
65
|
+
code --list-extensions | grep cline
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Configuration
|
|
69
|
+
|
|
70
|
+
### Basic Configuration
|
|
71
|
+
|
|
72
|
+
1. **Open Cline Settings**
|
|
73
|
+
- Open Command Palette (Ctrl+Shift+P)
|
|
74
|
+
- Type "Cline: Open Settings"
|
|
75
|
+
- Or navigate to File > Preferences > Settings > Extensions > Cline
|
|
76
|
+
|
|
77
|
+
2. **Add MCP Server Configuration**
|
|
78
|
+
|
|
79
|
+
In Cline settings, add:
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"cline.mcpServers": {
|
|
84
|
+
"wordpress": {
|
|
85
|
+
"command": "npx",
|
|
86
|
+
"args": ["-y", "mcp-wordpress"],
|
|
87
|
+
"env": {
|
|
88
|
+
"WORDPRESS_SITE_URL": "https://your-site.com",
|
|
89
|
+
"WORDPRESS_USERNAME": "your-username",
|
|
90
|
+
"WORDPRESS_APP_PASSWORD": "your-app-password"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Multi-Site Configuration
|
|
98
|
+
|
|
99
|
+
For managing multiple WordPress sites:
|
|
100
|
+
|
|
101
|
+
```json
|
|
102
|
+
{
|
|
103
|
+
"cline.mcpServers": {
|
|
104
|
+
"wordpress-main": {
|
|
105
|
+
"command": "npx",
|
|
106
|
+
"args": ["-y", "mcp-wordpress"],
|
|
107
|
+
"env": {
|
|
108
|
+
"WORDPRESS_SITE_URL": "https://main-site.com",
|
|
109
|
+
"WORDPRESS_USERNAME": "admin",
|
|
110
|
+
"WORDPRESS_APP_PASSWORD": "xxxx-xxxx-xxxx-xxxx"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"wordpress-blog": {
|
|
114
|
+
"command": "npx",
|
|
115
|
+
"args": ["-y", "mcp-wordpress"],
|
|
116
|
+
"env": {
|
|
117
|
+
"WORDPRESS_SITE_URL": "https://blog.company.com",
|
|
118
|
+
"WORDPRESS_USERNAME": "editor",
|
|
119
|
+
"WORDPRESS_APP_PASSWORD": "yyyy-yyyy-yyyy-yyyy"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"wordpress-store": {
|
|
123
|
+
"command": "npx",
|
|
124
|
+
"args": ["-y", "mcp-wordpress"],
|
|
125
|
+
"env": {
|
|
126
|
+
"WORDPRESS_SITE_URL": "https://store.company.com",
|
|
127
|
+
"WORDPRESS_USERNAME": "shop-manager",
|
|
128
|
+
"WORDPRESS_APP_PASSWORD": "zzzz-zzzz-zzzz-zzzz"
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Advanced Configuration
|
|
136
|
+
|
|
137
|
+
**Performance Optimization:**
|
|
138
|
+
|
|
139
|
+
```json
|
|
140
|
+
{
|
|
141
|
+
"cline.mcpServers": {
|
|
142
|
+
"wordpress": {
|
|
143
|
+
"command": "node",
|
|
144
|
+
"args": ["./node_modules/mcp-wordpress/dist/index.js"],
|
|
145
|
+
"env": {
|
|
146
|
+
"WORDPRESS_SITE_URL": "https://your-site.com",
|
|
147
|
+
"WORDPRESS_USERNAME": "your-username",
|
|
148
|
+
"WORDPRESS_APP_PASSWORD": "your-app-password",
|
|
149
|
+
"MCP_CACHE_ENABLED": "true",
|
|
150
|
+
"MCP_CACHE_TTL": "300",
|
|
151
|
+
"MCP_REQUEST_TIMEOUT": "30000",
|
|
152
|
+
"DEBUG": "mcp-wordpress:*"
|
|
153
|
+
},
|
|
154
|
+
"timeout": 30000
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
## Usage Examples
|
|
161
|
+
|
|
162
|
+
### Basic WordPress Operations
|
|
163
|
+
|
|
164
|
+
**Test Connection:**
|
|
165
|
+
|
|
166
|
+
```text
|
|
167
|
+
You: "Test my WordPress connection"
|
|
168
|
+
Cline: "I'll test your WordPress connection using the MCP server..."
|
|
169
|
+
Result: ✅ Authentication successful! Connected to: Your Site Name
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**List Recent Posts:**
|
|
173
|
+
|
|
174
|
+
```text
|
|
175
|
+
You: "Show me my recent WordPress posts"
|
|
176
|
+
Cline: "Let me fetch your recent posts..."
|
|
177
|
+
Result: 📊 Posts Summary: 15 total posts
|
|
178
|
+
📝 Status Breakdown: publish: 12, draft: 3
|
|
179
|
+
🌐 Source: https://your-site.com
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
**Create New Post:**
|
|
183
|
+
|
|
184
|
+
```text
|
|
185
|
+
You: "Create a new WordPress post titled 'AI in Web Development' with content about modern AI tools"
|
|
186
|
+
Cline: "I'll create a new post about AI in web development..."
|
|
187
|
+
Result: ✅ Post "AI in Web Development" created successfully (ID: 123)
|
|
188
|
+
🔗 Edit: https://your-site.com/wp-admin/post.php?post=123&action=edit
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Content Management
|
|
192
|
+
|
|
193
|
+
**Search Content:**
|
|
194
|
+
|
|
195
|
+
```text
|
|
196
|
+
You: "Search for all posts containing 'tutorial' in my WordPress site"
|
|
197
|
+
Cline: "Searching for posts containing 'tutorial'..."
|
|
198
|
+
Result: Found 8 results for "tutorial":
|
|
199
|
+
- [post] Complete WordPress Tutorial
|
|
200
|
+
- [post] CSS Grid Tutorial
|
|
201
|
+
- [page] Tutorial Archive
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
**Update Existing Post:**
|
|
205
|
+
|
|
206
|
+
```text
|
|
207
|
+
You: "Update post ID 123 to change its status to published"
|
|
208
|
+
Cline: "I'll update the post status to published..."
|
|
209
|
+
Result: ✅ Post 123 updated successfully
|
|
210
|
+
Status changed from draft to publish
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
**Manage Media:**
|
|
214
|
+
|
|
215
|
+
```text
|
|
216
|
+
You: "Upload the image 'hero-banner.jpg' from my desktop to WordPress"
|
|
217
|
+
Cline: "I'll upload the image to your WordPress media library..."
|
|
218
|
+
Result: ✅ Media uploaded successfully (ID: 456)
|
|
219
|
+
📎 File: hero-banner.jpg
|
|
220
|
+
🔗 URL: https://your-site.com/wp-content/uploads/2024/01/hero-banner.jpg
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Site Management
|
|
224
|
+
|
|
225
|
+
**Check Site Health:**
|
|
226
|
+
|
|
227
|
+
```text
|
|
228
|
+
You: "Check my WordPress site health and performance"
|
|
229
|
+
Cline: "I'll check your site health and performance metrics..."
|
|
230
|
+
Result: 📊 Site Health Report:
|
|
231
|
+
- Cache hit rate: 67%
|
|
232
|
+
- Average response time: 245ms
|
|
233
|
+
- Total posts: 150
|
|
234
|
+
- Total users: 12
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
**User Management:**
|
|
238
|
+
|
|
239
|
+
```text
|
|
240
|
+
You: "List all users with admin role on my WordPress site"
|
|
241
|
+
Cline: "I'll list all administrator users..."
|
|
242
|
+
Result: 👥 Administrator Users:
|
|
243
|
+
- John Doe (john@example.com) - Last login: 2024-01-14
|
|
244
|
+
- Jane Smith (jane@example.com) - Last login: 2024-01-15
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
**Backup Content:**
|
|
248
|
+
|
|
249
|
+
```text
|
|
250
|
+
You: "Export all my WordPress posts as a backup"
|
|
251
|
+
Cline: "I'll export your WordPress posts..."
|
|
252
|
+
Result: 📦 Backup created: wordpress-posts-2024-01-15.json
|
|
253
|
+
📊 Exported: 150 posts, 25 pages, 8 media items
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Multi-Site Management
|
|
257
|
+
|
|
258
|
+
**Site-Specific Operations:**
|
|
259
|
+
|
|
260
|
+
```text
|
|
261
|
+
You: "List posts from my blog site and store site"
|
|
262
|
+
Cline: "I'll list posts from both sites..."
|
|
263
|
+
Result: 📝 Blog Site (blog.company.com): 45 posts
|
|
264
|
+
📝 Store Site (store.company.com): 23 posts
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
**Cross-Site Content:**
|
|
268
|
+
|
|
269
|
+
```text
|
|
270
|
+
You: "Create the same post on both my main site and blog site"
|
|
271
|
+
Cline: "I'll create the post on both sites..."
|
|
272
|
+
Result: ✅ Post created on main-site (ID: 123)
|
|
273
|
+
✅ Post created on blog-site (ID: 456)
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
## Advanced Workflows
|
|
277
|
+
|
|
278
|
+
### Content Creation Workflow
|
|
279
|
+
|
|
280
|
+
**AI-Powered Blog Post Creation:**
|
|
281
|
+
|
|
282
|
+
```text
|
|
283
|
+
You: "Create a comprehensive blog post about 'WordPress Security Best Practices' with:
|
|
284
|
+
- SEO-optimized title
|
|
285
|
+
- Meta description
|
|
286
|
+
- 1500+ words
|
|
287
|
+
- Proper heading structure
|
|
288
|
+
- Call-to-action"
|
|
289
|
+
|
|
290
|
+
Cline: "I'll create a comprehensive WordPress security blog post..."
|
|
291
|
+
[Generates content with AI]
|
|
292
|
+
[Uses wp_create_post with optimized content]
|
|
293
|
+
[Adds meta description and SEO elements]
|
|
294
|
+
[Sets proper categories and tags]
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
**Content Series Management:**
|
|
298
|
+
|
|
299
|
+
```text
|
|
300
|
+
You: "Create a 5-part tutorial series about 'WordPress Development' with:
|
|
301
|
+
- Sequential numbering
|
|
302
|
+
- Cross-references between posts
|
|
303
|
+
- Same category and tags
|
|
304
|
+
- Published on schedule"
|
|
305
|
+
|
|
306
|
+
Cline: "I'll create a 5-part tutorial series..."
|
|
307
|
+
[Creates multiple posts with wp_create_post]
|
|
308
|
+
[Sets up proper taxonomy structure]
|
|
309
|
+
[Schedules posts for publication]
|
|
310
|
+
```
|
|
311
|
+
|
|
312
|
+
### Site Maintenance Workflow
|
|
313
|
+
|
|
314
|
+
**Regular Maintenance Tasks:**
|
|
315
|
+
|
|
316
|
+
```text
|
|
317
|
+
You: "Perform my weekly WordPress maintenance routine:
|
|
318
|
+
- Check site performance
|
|
319
|
+
- List recent comments for moderation
|
|
320
|
+
- Clear cache
|
|
321
|
+
- Generate performance report"
|
|
322
|
+
|
|
323
|
+
Cline: "I'll perform your weekly maintenance routine..."
|
|
324
|
+
[Uses wp_performance_stats]
|
|
325
|
+
[Uses wp_list_comments with pending status]
|
|
326
|
+
[Uses wp_cache_clear]
|
|
327
|
+
[Generates comprehensive report]
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
**Security Audit Workflow:**
|
|
331
|
+
|
|
332
|
+
```text
|
|
333
|
+
You: "Perform a security audit of my WordPress site:
|
|
334
|
+
- Check user permissions
|
|
335
|
+
- Review recent login activity
|
|
336
|
+
- Validate authentication settings
|
|
337
|
+
- Generate security report"
|
|
338
|
+
|
|
339
|
+
Cline: "I'll perform a security audit..."
|
|
340
|
+
[Uses wp_list_users with role analysis]
|
|
341
|
+
[Uses wp_get_auth_status]
|
|
342
|
+
[Reviews user capabilities]
|
|
343
|
+
[Generates security recommendations]
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
### Development Integration
|
|
347
|
+
|
|
348
|
+
**Theme Development Support:**
|
|
349
|
+
|
|
350
|
+
```text
|
|
351
|
+
You: "Help me test my new WordPress theme:
|
|
352
|
+
- Create sample posts for each post format
|
|
353
|
+
- Test with different content lengths
|
|
354
|
+
- Verify category and tag display"
|
|
355
|
+
|
|
356
|
+
Cline: "I'll help test your theme with sample content..."
|
|
357
|
+
[Creates posts with various formats]
|
|
358
|
+
[Tests different content scenarios]
|
|
359
|
+
[Verifies taxonomy display]
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
**Plugin Testing:**
|
|
363
|
+
|
|
364
|
+
```text
|
|
365
|
+
You: "Test my WordPress plugin functionality:
|
|
366
|
+
- Create test posts
|
|
367
|
+
- Test plugin features
|
|
368
|
+
- Verify data integrity"
|
|
369
|
+
|
|
370
|
+
Cline: "I'll test your plugin functionality..."
|
|
371
|
+
[Creates test content]
|
|
372
|
+
[Executes plugin-specific operations]
|
|
373
|
+
[Validates results]
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
## Troubleshooting
|
|
377
|
+
|
|
378
|
+
### Common Issues
|
|
379
|
+
|
|
380
|
+
**1. MCP Server Not Responding**
|
|
381
|
+
|
|
382
|
+
```text
|
|
383
|
+
Error: "MCP server 'wordpress' is not responding"
|
|
384
|
+
|
|
385
|
+
Solution:
|
|
386
|
+
1. Check if MCP server is installed: npx mcp-wordpress --version
|
|
387
|
+
2. Verify credentials in configuration
|
|
388
|
+
3. Test connection manually: npx mcp-wordpress wp_test_auth
|
|
389
|
+
4. Check VS Code output panel for errors
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
**2. Authentication Failures**
|
|
393
|
+
|
|
394
|
+
```text
|
|
395
|
+
Error: "Authentication failed: 401 Unauthorized"
|
|
396
|
+
|
|
397
|
+
Solution:
|
|
398
|
+
1. Verify WordPress application password format (no quotes)
|
|
399
|
+
2. Check username spelling and case sensitivity
|
|
400
|
+
3. Ensure Application Passwords are enabled in WordPress
|
|
401
|
+
4. Test with curl:
|
|
402
|
+
curl -u username:app-password https://your-site.com/wp-json/wp/v2/users/me
|
|
403
|
+
```
|
|
404
|
+
|
|
405
|
+
**3. Timeout Issues**
|
|
406
|
+
|
|
407
|
+
```text
|
|
408
|
+
Error: "Request timeout after 30 seconds"
|
|
409
|
+
|
|
410
|
+
Solution:
|
|
411
|
+
1. Increase timeout in configuration:
|
|
412
|
+
"timeout": 60000
|
|
413
|
+
2. Check WordPress site performance
|
|
414
|
+
3. Verify network connectivity
|
|
415
|
+
4. Enable debug mode for detailed logs
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
### Debug Mode
|
|
419
|
+
|
|
420
|
+
**Enable Debug Logging:**
|
|
421
|
+
|
|
422
|
+
```json
|
|
423
|
+
{
|
|
424
|
+
"cline.mcpServers": {
|
|
425
|
+
"wordpress": {
|
|
426
|
+
"command": "npx",
|
|
427
|
+
"args": ["-y", "mcp-wordpress"],
|
|
428
|
+
"env": {
|
|
429
|
+
"WORDPRESS_SITE_URL": "https://your-site.com",
|
|
430
|
+
"WORDPRESS_USERNAME": "your-username",
|
|
431
|
+
"WORDPRESS_APP_PASSWORD": "your-app-password",
|
|
432
|
+
"DEBUG": "mcp-wordpress:*"
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
**View Debug Output:**
|
|
440
|
+
|
|
441
|
+
1. Open VS Code Output panel (View > Output)
|
|
442
|
+
2. Select "Cline" from the dropdown
|
|
443
|
+
3. Look for MCP server logs and errors
|
|
444
|
+
|
|
445
|
+
### Performance Optimization
|
|
446
|
+
|
|
447
|
+
**Optimize MCP Server Performance:**
|
|
448
|
+
|
|
449
|
+
```json
|
|
450
|
+
{
|
|
451
|
+
"cline.mcpServers": {
|
|
452
|
+
"wordpress": {
|
|
453
|
+
"command": "node",
|
|
454
|
+
"args": ["./node_modules/mcp-wordpress/dist/index.js"],
|
|
455
|
+
"env": {
|
|
456
|
+
"WORDPRESS_SITE_URL": "https://your-site.com",
|
|
457
|
+
"WORDPRESS_USERNAME": "your-username",
|
|
458
|
+
"WORDPRESS_APP_PASSWORD": "your-app-password",
|
|
459
|
+
"MCP_CACHE_ENABLED": "true",
|
|
460
|
+
"MCP_CACHE_TTL": "300",
|
|
461
|
+
"MCP_REQUEST_TIMEOUT": "30000",
|
|
462
|
+
"MCP_MAX_CONNECTIONS": "10"
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
**Cline Configuration Optimization:**
|
|
470
|
+
|
|
471
|
+
```json
|
|
472
|
+
{
|
|
473
|
+
"cline.autoStart": false,
|
|
474
|
+
"cline.maxConcurrentRequests": 3,
|
|
475
|
+
"cline.requestTimeout": 30000,
|
|
476
|
+
"cline.enableCaching": true
|
|
477
|
+
}
|
|
478
|
+
```
|
|
479
|
+
|
|
480
|
+
## Best Practices
|
|
481
|
+
|
|
482
|
+
### Security
|
|
483
|
+
|
|
484
|
+
- Never commit credentials to version control
|
|
485
|
+
- Use environment variables for sensitive data
|
|
486
|
+
- Regularly rotate WordPress application passwords
|
|
487
|
+
- Enable HTTPS for all WordPress connections
|
|
488
|
+
- Use minimal required user permissions
|
|
489
|
+
|
|
490
|
+
### Performance
|
|
491
|
+
|
|
492
|
+
- Enable caching for frequently accessed data
|
|
493
|
+
- Set appropriate request timeouts
|
|
494
|
+
- Use connection pooling for multiple requests
|
|
495
|
+
- Monitor resource usage
|
|
496
|
+
- Optimize WordPress site performance
|
|
497
|
+
|
|
498
|
+
### Workflow
|
|
499
|
+
|
|
500
|
+
- Use descriptive command language
|
|
501
|
+
- Be specific about site targets in multi-site setups
|
|
502
|
+
- Regularly test integrations
|
|
503
|
+
- Document custom workflows
|
|
504
|
+
- Keep extensions updated
|
|
505
|
+
|
|
506
|
+
### Collaboration
|
|
507
|
+
|
|
508
|
+
- Share workspace configuration with team
|
|
509
|
+
- Document custom MCP server configurations
|
|
510
|
+
- Use consistent naming conventions
|
|
511
|
+
- Maintain integration documentation
|
|
512
|
+
|
|
513
|
+
## Resources
|
|
514
|
+
|
|
515
|
+
### Documentation
|
|
516
|
+
|
|
517
|
+
- [Cline Documentation](https://github.com/cline/cline/wiki)
|
|
518
|
+
- [MCP Protocol Specification](https://github.com/modelcontextprotocol/protocol)
|
|
519
|
+
- [WordPress REST API](https://developer.wordpress.org/rest-api/)
|
|
520
|
+
|
|
521
|
+
### Community
|
|
522
|
+
|
|
523
|
+
- [WordPress MCP Server Discussions](https://github.com/docdyhr/mcp-wordpress/discussions)
|
|
524
|
+
- [Cline Community](https://github.com/cline/cline/discussions)
|
|
525
|
+
- [VS Code Community](https://github.com/microsoft/vscode/discussions)
|
|
526
|
+
|
|
527
|
+
### Support
|
|
528
|
+
|
|
529
|
+
- **GitHub Issues**: [Report problems](https://github.com/docdyhr/mcp-wordpress/issues)
|
|
530
|
+
- **Community Forum**: [Get help](https://github.com/docdyhr/mcp-wordpress/discussions)
|
|
531
|
+
- **Email Support**: <support@your-domain.com>
|
|
532
|
+
|
|
533
|
+
---
|
|
534
|
+
|
|
535
|
+
*This guide is regularly updated. Last updated: 2024-01-15*
|
|
536
|
+
|
|
537
|
+
*For Cline-specific questions, visit the [Cline GitHub repository](https://github.com/cline/cline)*
|