mcp-wordpress 1.4.0 โ 1.5.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 +20 -1
- package/dist/cache/CacheInvalidation.d.ts.map +1 -1
- package/dist/client/CachedWordPressClient.d.ts.map +1 -1
- package/dist/client/CachedWordPressClient.js.map +1 -1
- package/dist/client/api.d.ts.map +1 -1
- package/dist/client/api.js +11 -3
- package/dist/client/api.js.map +1 -1
- package/dist/client/auth.js.map +1 -1
- package/dist/client/managers/AuthenticationManager.js.map +1 -1
- package/dist/client/managers/RequestManager.js +0 -1
- package/dist/client/managers/RequestManager.js.map +1 -1
- package/dist/config/ServerConfiguration.d.ts.map +1 -1
- package/dist/config/ServerConfiguration.js +18 -0
- package/dist/config/ServerConfiguration.js.map +1 -1
- package/dist/docs/MarkdownFormatter.js.map +1 -1
- package/dist/dxt-entry.d.ts +6 -0
- package/dist/dxt-entry.d.ts.map +1 -0
- package/dist/dxt-entry.js +38 -0
- package/dist/dxt-entry.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +34 -2
- package/dist/index.js.map +1 -1
- package/dist/mcp-wordpress-1.5.0.tgz +0 -0
- package/dist/performance/MetricsCollector.d.ts.map +1 -1
- package/dist/performance/PerformanceAnalytics.d.ts.map +1 -1
- package/dist/performance/PerformanceAnalytics.js.map +1 -1
- package/dist/performance/PerformanceMonitor.d.ts.map +1 -1
- package/dist/security/InputValidator.js.map +1 -1
- package/dist/security/SecurityConfig.d.ts.map +1 -1
- package/dist/server/ToolRegistry.js.map +1 -1
- package/dist/tools/cache.js +1 -1
- package/dist/tools/cache.js.map +1 -1
- package/dist/tools/performance.js.map +1 -1
- package/docs/developer/API_REFERENCE.md +97 -57
- package/docs/developer/ARCHITECTURE.md +7 -7
- package/docs/developer/BUILD_SYSTEM.md +8 -13
- package/docs/developer/CONTRIBUTING.md +29 -23
- package/docs/developer/DXT-DEBUG-BEST-PRACTICES.md +212 -0
- package/docs/developer/README.md +24 -1
- package/docs/developer/RELEASE_PROCESS.md +33 -28
- package/docs/developer/TESTING.md +122 -118
- package/docs/user-guides/DXT_INSTALLATION.md +149 -0
- package/package.json +4 -3
- package/src/cache/CacheInvalidation.ts +1 -1
- package/src/client/CachedWordPressClient.ts +15 -15
- package/src/client/api.ts +54 -47
- package/src/client/auth.ts +88 -88
- package/src/client/managers/AuthenticationManager.ts +112 -112
- package/src/client/managers/RequestManager.ts +1 -1
- package/src/config/ServerConfiguration.ts +39 -0
- package/src/docs/MarkdownFormatter.ts +4 -4
- package/src/dxt-entry.cjs +55 -0
- package/src/dxt-entry.ts +55 -0
- package/src/index.ts +55 -2
- package/src/performance/MetricsCollector.ts +3 -3
- package/src/performance/PerformanceAnalytics.ts +16 -16
- package/src/performance/PerformanceMonitor.ts +1 -1
- package/src/security/InputValidator.ts +4 -4
- package/src/security/SecurityConfig.ts +1 -1
- package/src/server/ToolRegistry.ts +12 -12
- package/src/tools/cache.ts +1 -1
- package/src/tools/performance.ts +17 -17
- package/dist/mcp-wordpress-1.4.0.tgz +0 -0
|
@@ -138,7 +138,7 @@ export class PostTools {
|
|
|
138
138
|
constructor(private client: WordPressClient) {}
|
|
139
139
|
|
|
140
140
|
async createPost(params: CreatePostParams): Promise<PostResult> {
|
|
141
|
-
return toolWrapper(this.client,
|
|
141
|
+
return toolWrapper(this.client, "create_post", params, async () => {
|
|
142
142
|
const validatedParams = createPostSchema.parse(params);
|
|
143
143
|
return await this.client.posts.create(validatedParams);
|
|
144
144
|
});
|
|
@@ -191,31 +191,33 @@ async function listPosts(params: any) {
|
|
|
191
191
|
|
|
192
192
|
```typescript
|
|
193
193
|
// โ
Good: Comprehensive test coverage
|
|
194
|
-
describe(
|
|
195
|
-
describe(
|
|
196
|
-
test(
|
|
194
|
+
describe("PostTools", () => {
|
|
195
|
+
describe("createPost", () => {
|
|
196
|
+
test("should create post with valid parameters", async () => {
|
|
197
197
|
const params = {
|
|
198
|
-
title:
|
|
199
|
-
content:
|
|
200
|
-
status:
|
|
198
|
+
title: "Test Post",
|
|
199
|
+
content: "Test content",
|
|
200
|
+
status: "publish" as PostStatus,
|
|
201
201
|
};
|
|
202
|
-
|
|
202
|
+
|
|
203
203
|
const result = await postTools.createPost(params);
|
|
204
|
-
|
|
204
|
+
|
|
205
205
|
expect(result.success).toBe(true);
|
|
206
|
-
expect(result.data.title).toBe(
|
|
206
|
+
expect(result.data.title).toBe("Test Post");
|
|
207
207
|
});
|
|
208
208
|
|
|
209
|
-
test(
|
|
210
|
-
const params = { title:
|
|
211
|
-
|
|
209
|
+
test("should handle invalid parameters", async () => {
|
|
210
|
+
const params = { title: "" }; // Invalid empty title
|
|
211
|
+
|
|
212
212
|
await expect(postTools.createPost(params)).rejects.toThrow();
|
|
213
213
|
});
|
|
214
214
|
|
|
215
|
-
test(
|
|
216
|
-
mockClient.posts.create.mockRejectedValue(new Error(
|
|
217
|
-
|
|
218
|
-
await expect(postTools.createPost(validParams)).rejects.toThrow(
|
|
215
|
+
test("should handle API errors gracefully", async () => {
|
|
216
|
+
mockClient.posts.create.mockRejectedValue(new Error("API Error"));
|
|
217
|
+
|
|
218
|
+
await expect(postTools.createPost(validParams)).rejects.toThrow(
|
|
219
|
+
"API Error",
|
|
220
|
+
);
|
|
219
221
|
});
|
|
220
222
|
});
|
|
221
223
|
});
|
|
@@ -246,9 +248,9 @@ describe('PostTools', () => {
|
|
|
246
248
|
const createPostSchema = z.object({
|
|
247
249
|
title: z.string().min(1).max(200),
|
|
248
250
|
content: z.string().optional(),
|
|
249
|
-
status: z.enum([
|
|
251
|
+
status: z.enum(["draft", "publish", "private", "pending"]).optional(),
|
|
250
252
|
author: z.number().positive().optional(),
|
|
251
|
-
site: z.string().optional()
|
|
253
|
+
site: z.string().optional(),
|
|
252
254
|
});
|
|
253
255
|
|
|
254
256
|
// Always validate before processing
|
|
@@ -286,10 +288,10 @@ getAuthHeaders(): Record<string, string> {
|
|
|
286
288
|
|
|
287
289
|
### Code Documentation
|
|
288
290
|
|
|
289
|
-
|
|
291
|
+
````typescript
|
|
290
292
|
/**
|
|
291
293
|
* Creates a new WordPress post with the specified parameters.
|
|
292
|
-
*
|
|
294
|
+
*
|
|
293
295
|
* @param params - The post creation parameters
|
|
294
296
|
* @param params.title - The post title (required)
|
|
295
297
|
* @param params.content - The post content (optional)
|
|
@@ -297,7 +299,7 @@ getAuthHeaders(): Record<string, string> {
|
|
|
297
299
|
* @param params.site - The target site ID for multi-site setups (optional)
|
|
298
300
|
* @returns Promise resolving to the created post information
|
|
299
301
|
* @throws {Error} When post creation fails or parameters are invalid
|
|
300
|
-
*
|
|
302
|
+
*
|
|
301
303
|
* @example
|
|
302
304
|
* ```typescript
|
|
303
305
|
* const post = await postTools.createPost({
|
|
@@ -310,7 +312,7 @@ getAuthHeaders(): Record<string, string> {
|
|
|
310
312
|
async createPost(params: CreatePostParams): Promise<PostResult> {
|
|
311
313
|
// Implementation
|
|
312
314
|
}
|
|
313
|
-
|
|
315
|
+
````
|
|
314
316
|
|
|
315
317
|
### Update Documentation
|
|
316
318
|
|
|
@@ -350,9 +352,11 @@ When requesting features:
|
|
|
350
352
|
|
|
351
353
|
```markdown
|
|
352
354
|
## Description
|
|
355
|
+
|
|
353
356
|
Brief description of the changes made.
|
|
354
357
|
|
|
355
358
|
## Type of Change
|
|
359
|
+
|
|
356
360
|
- [ ] Bug fix (non-breaking change which fixes an issue)
|
|
357
361
|
- [ ] New feature (non-breaking change which adds functionality)
|
|
358
362
|
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
|
|
@@ -361,6 +365,7 @@ Brief description of the changes made.
|
|
|
361
365
|
- [ ] Security improvement
|
|
362
366
|
|
|
363
367
|
## Testing
|
|
368
|
+
|
|
364
369
|
- [ ] Unit tests added/updated
|
|
365
370
|
- [ ] Integration tests added/updated
|
|
366
371
|
- [ ] Security tests added/updated
|
|
@@ -368,6 +373,7 @@ Brief description of the changes made.
|
|
|
368
373
|
- [ ] Performance tests pass (if applicable)
|
|
369
374
|
|
|
370
375
|
## Checklist
|
|
376
|
+
|
|
371
377
|
- [ ] Code follows the established patterns
|
|
372
378
|
- [ ] Self-review completed
|
|
373
379
|
- [ ] Code is commented where necessary
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
# DXT Extension Debugging Guide
|
|
2
|
+
|
|
3
|
+
## Quick Start Debugging
|
|
4
|
+
|
|
5
|
+
**Extension failing? Run this first:**
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# 1. Check if it's a valid zip
|
|
9
|
+
unzip -t extension.dxt
|
|
10
|
+
|
|
11
|
+
# 2. Extract and inspect structure
|
|
12
|
+
unzip extension.dxt -d temp/ && ls -la temp/
|
|
13
|
+
|
|
14
|
+
# 3. Validate manifest
|
|
15
|
+
cat temp/manifest.json | jq .
|
|
16
|
+
|
|
17
|
+
# 4. Check for nested directories (common issue!)
|
|
18
|
+
unzip -l extension.dxt | head -5
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Common Error Patterns & Solutions
|
|
22
|
+
|
|
23
|
+
### 1. "Invalid zip data" / "Failed to unzip"
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
# Verify file integrity
|
|
27
|
+
file extension.dxt
|
|
28
|
+
zip -T extension.dxt
|
|
29
|
+
|
|
30
|
+
# Fix: Repackage correctly
|
|
31
|
+
cd extension-source/
|
|
32
|
+
zip -r ../extension.dxt * # NOT the directory itself!
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### 2. "Invalid manifest" errors
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Install DXT CLI first
|
|
39
|
+
npm install -g @anthropic-ai/dxt
|
|
40
|
+
|
|
41
|
+
# Validate manifest
|
|
42
|
+
dxt validate manifest.json
|
|
43
|
+
|
|
44
|
+
# Common fixes:
|
|
45
|
+
# - Missing required fields (name, version, description, type, main)
|
|
46
|
+
# - Invalid JSON syntax
|
|
47
|
+
# - Wrong structure for prompts/tools
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### 3. "Module not found" / Missing dependencies
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
# For Node.js extensions
|
|
54
|
+
npm install
|
|
55
|
+
zip -r extension.dxt manifest.json server.js package*.json node_modules/
|
|
56
|
+
|
|
57
|
+
# For Python extensions
|
|
58
|
+
pip install -r requirements.txt -t lib/
|
|
59
|
+
zip -r extension.dxt manifest.json main.py lib/
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Manifest Structure (MCP Type)
|
|
63
|
+
|
|
64
|
+
```json
|
|
65
|
+
{
|
|
66
|
+
"name": "extension-name",
|
|
67
|
+
"version": "1.0.0",
|
|
68
|
+
"description": "Clear description",
|
|
69
|
+
"type": "mcp",
|
|
70
|
+
"main": "server.js",
|
|
71
|
+
"mcp": {
|
|
72
|
+
"command": "node",
|
|
73
|
+
"args": ["server.js"],
|
|
74
|
+
"env": {}
|
|
75
|
+
},
|
|
76
|
+
"user_config": {
|
|
77
|
+
"api_key": {
|
|
78
|
+
"type": "string",
|
|
79
|
+
"title": "API Key",
|
|
80
|
+
"description": "Your service API key",
|
|
81
|
+
"sensitive": true,
|
|
82
|
+
"required": true
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
"prompts": {
|
|
86
|
+
"example_prompt": {
|
|
87
|
+
"name": "example_prompt",
|
|
88
|
+
"description": "What this prompt does",
|
|
89
|
+
"arguments": {
|
|
90
|
+
"input": {
|
|
91
|
+
"type": "string",
|
|
92
|
+
"description": "Input parameter",
|
|
93
|
+
"required": true
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Development Workflow
|
|
102
|
+
|
|
103
|
+
### 1. Initialize Extension
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
mkdir my-extension && cd my-extension
|
|
107
|
+
dxt init # Interactive setup
|
|
108
|
+
# OR
|
|
109
|
+
dxt init --yes # Quick defaults
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### 2. Develop & Test Locally
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
# Test your server directly
|
|
116
|
+
node server.js # or python main.py
|
|
117
|
+
|
|
118
|
+
# Validate manifest frequently
|
|
119
|
+
dxt validate .
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### 3. Package Extension
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# From extension directory
|
|
126
|
+
dxt pack . my-extension.dxt
|
|
127
|
+
|
|
128
|
+
# Manual packaging (if needed)
|
|
129
|
+
zip -r ../my-extension.dxt manifest.json server.js package*.json node_modules/
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### 4. Debug Installation Issues
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
# Test the package
|
|
136
|
+
unzip -t my-extension.dxt
|
|
137
|
+
|
|
138
|
+
# Verify structure (no nested dirs!)
|
|
139
|
+
unzip -l my-extension.dxt | grep -E "manifest.json|server.js|main.py"
|
|
140
|
+
|
|
141
|
+
# Should show files at root:
|
|
142
|
+
# 0 2024-01-01 12:00 manifest.json
|
|
143
|
+
# 0 2024-01-01 12:00 server.js
|
|
144
|
+
# NOT: my-extension/manifest.json
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## Quick Fixes
|
|
148
|
+
|
|
149
|
+
### Fix Nested Directory Structure
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
unzip bad.dxt
|
|
153
|
+
cd extracted-folder/
|
|
154
|
+
zip -r ../fixed.dxt *
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Fix Invalid JSON
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
# Pretty print and validate
|
|
161
|
+
jq . manifest.json > manifest-fixed.json
|
|
162
|
+
mv manifest-fixed.json manifest.json
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Add Missing Dependencies
|
|
166
|
+
|
|
167
|
+
```bash
|
|
168
|
+
# Node.js
|
|
169
|
+
npm install
|
|
170
|
+
npm list --depth=0 # Verify
|
|
171
|
+
|
|
172
|
+
# Python
|
|
173
|
+
pip freeze > requirements.txt
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Debug MCP Communication
|
|
177
|
+
|
|
178
|
+
```javascript
|
|
179
|
+
// Add logging to your server
|
|
180
|
+
console.error('[DEBUG]', JSON.stringify(request, null, 2));
|
|
181
|
+
|
|
182
|
+
// Test with stdio
|
|
183
|
+
echo '{"jsonrpc":"2.0","method":"initialize","id":1}' | node server.js
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Best Practices
|
|
187
|
+
|
|
188
|
+
1. **Always validate before packaging**: `dxt validate .`
|
|
189
|
+
2. **Test locally first**: Run your server standalone
|
|
190
|
+
3. **Use semantic versioning**: Update version on changes
|
|
191
|
+
4. **Include all dependencies**: Bundle everything needed
|
|
192
|
+
5. **Handle errors gracefully**: Don't crash on bad input
|
|
193
|
+
6. **Use user_config for secrets**: Mark sensitive fields
|
|
194
|
+
7. **Keep file structure flat**: No nested directories
|
|
195
|
+
|
|
196
|
+
## Debugging Checklist
|
|
197
|
+
|
|
198
|
+
- [ ] Valid zip file? (`unzip -t`)
|
|
199
|
+
- [ ] Correct structure? (files at root)
|
|
200
|
+
- [ ] Valid JSON? (`jq . manifest.json`)
|
|
201
|
+
- [ ] All required fields? (`dxt validate`)
|
|
202
|
+
- [ ] Dependencies included? (`node_modules/` or `lib/`)
|
|
203
|
+
- [ ] Main file exists? (`server.js` or as specified)
|
|
204
|
+
- [ ] MCP protocol implemented? (initialize, tools/prompts)
|
|
205
|
+
- [ ] Error handling in place?
|
|
206
|
+
|
|
207
|
+
## Need Help?
|
|
208
|
+
|
|
209
|
+
1. Check examples: <https://github.com/anthropics/dxt/tree/main/examples>
|
|
210
|
+
2. Use `dxt init` for correct structure
|
|
211
|
+
3. Test with `dxt validate` before packaging
|
|
212
|
+
4. Enable debug logs in Claude Desktop settings
|
package/docs/developer/README.md
CHANGED
|
@@ -5,21 +5,25 @@ This directory contains comprehensive documentation for developers contributing
|
|
|
5
5
|
## ๐ Developer Guides
|
|
6
6
|
|
|
7
7
|
### Getting Started
|
|
8
|
+
|
|
8
9
|
- **[Development Setup](DEVELOPMENT_SETUP.md)** - Local development environment setup
|
|
9
10
|
- **[Architecture Overview](ARCHITECTURE.md)** - System architecture and design patterns
|
|
10
11
|
- **[Contributing Guidelines](CONTRIBUTING.md)** - How to contribute to the project
|
|
11
12
|
|
|
12
13
|
### Technical Reference
|
|
14
|
+
|
|
13
15
|
- **[API Reference](API_REFERENCE.md)** - Complete technical API documentation
|
|
14
16
|
- **[Testing Guide](TESTING.md)** - Test suite, CI/CD, and testing best practices
|
|
15
17
|
- **[Performance Guide](PERFORMANCE_DEVELOPMENT.md)** - Performance optimization and monitoring
|
|
16
18
|
|
|
17
19
|
### Build & Deployment
|
|
20
|
+
|
|
18
21
|
- **[Build System](BUILD_SYSTEM.md)** - TypeScript compilation and build process
|
|
19
22
|
- **[Release Process](RELEASE_PROCESS.md)** - Semantic versioning and automated releases
|
|
20
23
|
- **[CI/CD Pipeline](CI_CD_PIPELINE.md)** - GitHub Actions workflows and automation
|
|
21
24
|
|
|
22
25
|
### Maintenance & Operations
|
|
26
|
+
|
|
23
27
|
- **[Maintenance Guide](MAINTENANCE.md)** - Ongoing maintenance and updates
|
|
24
28
|
- **[Migration Guide](MIGRATION_GUIDE.md)** - Breaking changes and migration paths
|
|
25
29
|
- **[Security Guidelines](SECURITY_DEVELOPMENT.md)** - Security best practices for development
|
|
@@ -53,12 +57,14 @@ mcp-wordpress/
|
|
|
53
57
|
## ๐ง Development Environment
|
|
54
58
|
|
|
55
59
|
### Prerequisites
|
|
60
|
+
|
|
56
61
|
- **Node.js 18+** - Runtime environment
|
|
57
62
|
- **TypeScript 5+** - Primary development language
|
|
58
63
|
- **Docker** - For containerization and testing
|
|
59
64
|
- **Git** - Version control
|
|
60
65
|
|
|
61
66
|
### Quick Setup
|
|
67
|
+
|
|
62
68
|
```bash
|
|
63
69
|
# Clone the repository
|
|
64
70
|
git clone https://github.com/docdyhr/mcp-wordpress.git
|
|
@@ -78,6 +84,7 @@ npm run dev
|
|
|
78
84
|
```
|
|
79
85
|
|
|
80
86
|
### Development Commands
|
|
87
|
+
|
|
81
88
|
```bash
|
|
82
89
|
# Build and compilation
|
|
83
90
|
npm run build # Compile TypeScript
|
|
@@ -103,6 +110,7 @@ npm run status # Check connection status
|
|
|
103
110
|
## ๐งช Testing Infrastructure
|
|
104
111
|
|
|
105
112
|
### Test Categories
|
|
113
|
+
|
|
106
114
|
- **Unit Tests** - Individual component testing
|
|
107
115
|
- **Integration Tests** - WordPress API integration
|
|
108
116
|
- **Security Tests** - Vulnerability and penetration testing
|
|
@@ -111,6 +119,7 @@ npm run status # Check connection status
|
|
|
111
119
|
- **Property-Based Tests** - Generative testing with edge cases
|
|
112
120
|
|
|
113
121
|
### Current Test Status โ
|
|
122
|
+
|
|
114
123
|
- **Main Test Suite**: 207/207 passed (100%)
|
|
115
124
|
- **Security Tests**: 40/40 passed (100%)
|
|
116
125
|
- **Performance Tests**: 8/8 passed (100%)
|
|
@@ -119,18 +128,21 @@ npm run status # Check connection status
|
|
|
119
128
|
## ๐๏ธ Architecture Highlights
|
|
120
129
|
|
|
121
130
|
### Modular Client Architecture
|
|
131
|
+
|
|
122
132
|
- **Manager Pattern** - Composition over inheritance
|
|
123
133
|
- **Authentication Manager** - Multiple auth method support
|
|
124
134
|
- **Request Manager** - HTTP operations with retry logic
|
|
125
135
|
- **Cache Manager** - Multi-layer caching system
|
|
126
136
|
|
|
127
137
|
### Tool System
|
|
138
|
+
|
|
128
139
|
- **Class-Based Tools** - Consistent tool implementation pattern
|
|
129
140
|
- **Type-Safe Parameters** - Comprehensive Zod validation
|
|
130
141
|
- **Error Handling** - Standardized error patterns
|
|
131
142
|
- **Multi-Site Support** - Site-specific tool execution
|
|
132
143
|
|
|
133
144
|
### Performance Systems
|
|
145
|
+
|
|
134
146
|
- **Intelligent Caching** - 50-70% performance improvement
|
|
135
147
|
- **Real-Time Monitoring** - Comprehensive metrics collection
|
|
136
148
|
- **Performance Analytics** - Trend analysis and optimization
|
|
@@ -139,12 +151,14 @@ npm run status # Check connection status
|
|
|
139
151
|
## ๐ Documentation System
|
|
140
152
|
|
|
141
153
|
### Auto-Generated Documentation
|
|
154
|
+
|
|
142
155
|
- **Tool Documentation** - Extracted from TypeScript definitions
|
|
143
156
|
- **OpenAPI Specification** - Machine-readable API spec
|
|
144
157
|
- **Markdown Generation** - User-friendly documentation
|
|
145
158
|
- **CI/CD Integration** - Automatic updates on code changes
|
|
146
159
|
|
|
147
160
|
### Documentation Standards
|
|
161
|
+
|
|
148
162
|
- **JSDoc Comments** - Comprehensive code documentation
|
|
149
163
|
- **Type Annotations** - Complete TypeScript typing
|
|
150
164
|
- **Usage Examples** - Practical implementation examples
|
|
@@ -153,6 +167,7 @@ npm run status # Check connection status
|
|
|
153
167
|
## ๐ Security Framework
|
|
154
168
|
|
|
155
169
|
### Security Measures
|
|
170
|
+
|
|
156
171
|
- **Input Validation** - Comprehensive Zod schema validation
|
|
157
172
|
- **Authentication Security** - Multiple secure auth methods
|
|
158
173
|
- **Rate Limiting** - API abuse prevention
|
|
@@ -160,6 +175,7 @@ npm run status # Check connection status
|
|
|
160
175
|
- **HTTPS Enforcement** - Secure communication
|
|
161
176
|
|
|
162
177
|
### Security Testing
|
|
178
|
+
|
|
163
179
|
- **Penetration Tests** - Automated vulnerability testing
|
|
164
180
|
- **Input Validation Tests** - Edge case and injection testing
|
|
165
181
|
- **Authentication Tests** - Security validation for all auth methods
|
|
@@ -168,12 +184,14 @@ npm run status # Check connection status
|
|
|
168
184
|
## ๐ Release & Publishing
|
|
169
185
|
|
|
170
186
|
### Automated Release Pipeline
|
|
187
|
+
|
|
171
188
|
- **Semantic Versioning** - Conventional commit-based versioning
|
|
172
189
|
- **Multi-Platform Publishing** - NPM and Docker Hub
|
|
173
190
|
- **Security Scanning** - Automated vulnerability detection
|
|
174
191
|
- **Performance Validation** - Regression testing before release
|
|
175
192
|
|
|
176
193
|
### Distribution Channels
|
|
194
|
+
|
|
177
195
|
- **NPM Package** - Node.js package manager
|
|
178
196
|
- **Docker Images** - Multi-architecture container images
|
|
179
197
|
- **GitHub Releases** - Source code and release notes
|
|
@@ -181,6 +199,7 @@ npm run status # Check connection status
|
|
|
181
199
|
## ๐ค Contributing
|
|
182
200
|
|
|
183
201
|
### Development Workflow
|
|
202
|
+
|
|
184
203
|
1. **Fork & Clone** - Create your development environment
|
|
185
204
|
2. **Feature Branch** - Create feature branches from main
|
|
186
205
|
3. **Development** - Implement changes with tests
|
|
@@ -189,6 +208,7 @@ npm run status # Check connection status
|
|
|
189
208
|
6. **Pull Request** - Submit for review
|
|
190
209
|
|
|
191
210
|
### Code Standards
|
|
211
|
+
|
|
192
212
|
- **TypeScript** - Strict mode with comprehensive typing
|
|
193
213
|
- **ESLint** - Consistent code style and best practices
|
|
194
214
|
- **Prettier** - Automated code formatting
|
|
@@ -196,6 +216,7 @@ npm run status # Check connection status
|
|
|
196
216
|
- **Conventional Commits** - Semantic commit messages
|
|
197
217
|
|
|
198
218
|
### Review Process
|
|
219
|
+
|
|
199
220
|
- **Automated Testing** - CI/CD pipeline validation
|
|
200
221
|
- **Security Scanning** - Automated vulnerability detection
|
|
201
222
|
- **Performance Testing** - Regression detection
|
|
@@ -205,15 +226,17 @@ npm run status # Check connection status
|
|
|
205
226
|
## ๐ Getting Help
|
|
206
227
|
|
|
207
228
|
### Development Support
|
|
229
|
+
|
|
208
230
|
- **GitHub Issues** - Bug reports and feature requests
|
|
209
231
|
- **GitHub Discussions** - Development questions and community
|
|
210
232
|
- **Security Issues** - Responsible disclosure process
|
|
211
233
|
|
|
212
234
|
### Resources
|
|
235
|
+
|
|
213
236
|
- **WordPress REST API** - Official WordPress API documentation
|
|
214
237
|
- **Model Context Protocol** - MCP specification and guidelines
|
|
215
238
|
- **TypeScript Handbook** - TypeScript language reference
|
|
216
239
|
|
|
217
240
|
---
|
|
218
241
|
|
|
219
|
-
**Ready to contribute?** Start with the [Development Setup](DEVELOPMENT_SETUP.md) guide and join our community of contributors!
|
|
242
|
+
**Ready to contribute?** Start with the [Development Setup](DEVELOPMENT_SETUP.md) guide and join our community of contributors!
|
|
@@ -52,7 +52,7 @@ fix: resolve authentication header issue in POST requests
|
|
|
52
52
|
fix(auth): handle JWT token expiration gracefully
|
|
53
53
|
fix(cache): fix cache invalidation for multi-site setups
|
|
54
54
|
|
|
55
|
-
# MINOR version bump
|
|
55
|
+
# MINOR version bump
|
|
56
56
|
feat: add new WordPress plugin management tool
|
|
57
57
|
feat(tools): add bulk comment moderation functionality
|
|
58
58
|
feat(api): add support for custom post types
|
|
@@ -111,11 +111,11 @@ on:
|
|
|
111
111
|
workflow_dispatch:
|
|
112
112
|
inputs:
|
|
113
113
|
release_type:
|
|
114
|
-
description:
|
|
114
|
+
description: "Release type"
|
|
115
115
|
required: true
|
|
116
|
-
default:
|
|
116
|
+
default: "patch"
|
|
117
117
|
type: choice
|
|
118
|
-
options: [
|
|
118
|
+
options: ["patch", "minor", "major", "prerelease"]
|
|
119
119
|
|
|
120
120
|
jobs:
|
|
121
121
|
release:
|
|
@@ -127,25 +127,25 @@ jobs:
|
|
|
127
127
|
with:
|
|
128
128
|
fetch-depth: 0
|
|
129
129
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
130
|
-
|
|
130
|
+
|
|
131
131
|
- name: ๐ฆ Setup Node.js
|
|
132
132
|
uses: actions/setup-node@v4
|
|
133
133
|
with:
|
|
134
|
-
node-version:
|
|
135
|
-
cache:
|
|
136
|
-
|
|
134
|
+
node-version: "20"
|
|
135
|
+
cache: "npm"
|
|
136
|
+
|
|
137
137
|
- name: ๐ฆ Install Dependencies
|
|
138
138
|
run: npm ci
|
|
139
|
-
|
|
139
|
+
|
|
140
140
|
- name: ๐งช Run Tests
|
|
141
141
|
run: npm test
|
|
142
|
-
|
|
142
|
+
|
|
143
143
|
- name: ๐ Security Audit
|
|
144
144
|
run: npm audit --audit-level=high
|
|
145
|
-
|
|
145
|
+
|
|
146
146
|
- name: ๐๏ธ Build Project
|
|
147
147
|
run: npm run build
|
|
148
|
-
|
|
148
|
+
|
|
149
149
|
- name: ๐ Semantic Release
|
|
150
150
|
env:
|
|
151
151
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
@@ -244,17 +244,17 @@ jobs:
|
|
|
244
244
|
{
|
|
245
245
|
"preset": "conventionalcommits",
|
|
246
246
|
"releaseRules": [
|
|
247
|
-
{"type": "feat", "release": "minor"},
|
|
248
|
-
{"type": "fix", "release": "patch"},
|
|
249
|
-
{"type": "perf", "release": "patch"},
|
|
250
|
-
{"type": "docs", "release": false},
|
|
251
|
-
{"type": "style", "release": false},
|
|
252
|
-
{"type": "refactor", "release": "patch"},
|
|
253
|
-
{"type": "test", "release": false},
|
|
254
|
-
{"type": "build", "release": "patch"},
|
|
255
|
-
{"type": "ci", "release": false},
|
|
256
|
-
{"type": "chore", "release": false},
|
|
257
|
-
{"breaking": true, "release": "major"}
|
|
247
|
+
{ "type": "feat", "release": "minor" },
|
|
248
|
+
{ "type": "fix", "release": "patch" },
|
|
249
|
+
{ "type": "perf", "release": "patch" },
|
|
250
|
+
{ "type": "docs", "release": false },
|
|
251
|
+
{ "type": "style", "release": false },
|
|
252
|
+
{ "type": "refactor", "release": "patch" },
|
|
253
|
+
{ "type": "test", "release": false },
|
|
254
|
+
{ "type": "build", "release": "patch" },
|
|
255
|
+
{ "type": "ci", "release": false },
|
|
256
|
+
{ "type": "chore", "release": false },
|
|
257
|
+
{ "breaking": true, "release": "major" }
|
|
258
258
|
]
|
|
259
259
|
}
|
|
260
260
|
```
|
|
@@ -421,26 +421,30 @@ npm dist-tag add mcp-wordpress@1.2.3 latest
|
|
|
421
421
|
# [1.3.0](https://github.com/docdyhr/mcp-wordpress/compare/v1.2.0...v1.3.0) (2024-01-15)
|
|
422
422
|
|
|
423
423
|
### Features
|
|
424
|
-
|
|
425
|
-
|
|
424
|
+
|
|
425
|
+
- add new WordPress plugin management tool ([abc123](https://github.com/docdyhr/mcp-wordpress/commit/abc123))
|
|
426
|
+
- improve authentication system ([def456](https://github.com/docdyhr/mcp-wordpress/commit/def456))
|
|
426
427
|
|
|
427
428
|
### Bug Fixes
|
|
428
|
-
|
|
429
|
+
|
|
430
|
+
- resolve cache invalidation issue ([ghi789](https://github.com/docdyhr/mcp-wordpress/commit/ghi789))
|
|
429
431
|
|
|
430
432
|
### BREAKING CHANGES
|
|
431
|
-
|
|
433
|
+
|
|
434
|
+
- authentication configuration format has changed
|
|
432
435
|
```
|
|
433
436
|
|
|
434
437
|
### Migration Guides
|
|
435
438
|
|
|
436
439
|
For breaking changes, create migration guides in `docs/developer/MIGRATION_GUIDE.md`:
|
|
437
440
|
|
|
438
|
-
|
|
441
|
+
````markdown
|
|
439
442
|
## Migrating from v1.x to v2.x
|
|
440
443
|
|
|
441
444
|
### Authentication Configuration Changes
|
|
442
445
|
|
|
443
446
|
**Before (v1.x)**:
|
|
447
|
+
|
|
444
448
|
```javascript
|
|
445
449
|
{
|
|
446
450
|
auth: {
|
|
@@ -449,6 +453,7 @@ For breaking changes, create migration guides in `docs/developer/MIGRATION_GUIDE
|
|
|
449
453
|
}
|
|
450
454
|
}
|
|
451
455
|
```
|
|
456
|
+
````
|
|
452
457
|
|
|
453
458
|
**After (v2.x)**:
|
|
454
459
|
|