mcp-wordpress 1.1.2 → 1.1.7
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 +8 -8
- package/bin/mcp-wordpress.js +1 -1
- package/dist/client/api.d.ts +10 -10
- package/dist/client/api.js +157 -157
- package/dist/client/api.js.map +1 -1
- package/dist/client/auth.d.ts +2 -2
- package/dist/client/auth.d.ts.map +1 -1
- package/dist/client/auth.js +72 -72
- package/dist/client/auth.js.map +1 -1
- package/dist/client/managers/AuthenticationManager.d.ts +2 -2
- package/dist/client/managers/AuthenticationManager.d.ts.map +1 -1
- package/dist/client/managers/AuthenticationManager.js +50 -46
- package/dist/client/managers/AuthenticationManager.js.map +1 -1
- package/dist/client/managers/BaseManager.d.ts +1 -1
- package/dist/client/managers/BaseManager.d.ts.map +1 -1
- package/dist/client/managers/BaseManager.js +9 -9
- package/dist/client/managers/BaseManager.js.map +1 -1
- package/dist/client/managers/RequestManager.d.ts +2 -2
- package/dist/client/managers/RequestManager.js +15 -15
- package/dist/client/managers/index.d.ts +3 -3
- package/dist/client/managers/index.js +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +78 -61
- package/dist/index.js.map +1 -1
- package/dist/tools/auth.d.ts +2 -2
- package/dist/tools/auth.js +31 -31
- package/dist/tools/auth.js.map +1 -1
- package/dist/tools/comments.d.ts +2 -2
- package/dist/tools/comments.js +79 -79
- package/dist/tools/media.d.ts +2 -2
- package/dist/tools/media.d.ts.map +1 -1
- package/dist/tools/media.js +80 -80
- package/dist/tools/media.js.map +1 -1
- package/dist/tools/pages.d.ts +2 -2
- package/dist/tools/pages.js +75 -75
- package/dist/tools/posts.d.ts +2 -2
- package/dist/tools/posts.js +94 -94
- package/dist/tools/site.d.ts +2 -2
- package/dist/tools/site.js +60 -60
- package/dist/tools/site.js.map +1 -1
- package/dist/tools/taxonomies.d.ts +2 -2
- package/dist/tools/taxonomies.js +89 -89
- package/dist/tools/users.d.ts +2 -2
- package/dist/tools/users.js +68 -68
- package/dist/tools/users.js.map +1 -1
- package/dist/types/mcp.d.ts +1 -1
- package/dist/types/mcp.d.ts.map +1 -1
- package/dist/utils/debug.d.ts.map +1 -1
- package/dist/utils/debug.js +10 -6
- package/dist/utils/debug.js.map +1 -1
- package/dist/utils/toolWrapper.js +3 -3
- package/docs/developer/GITHUB_ACTIONS_SETUP.md +208 -0
- package/docs/developer/MAINTENANCE.md +307 -0
- package/docs/developer/MIGRATION_GUIDE.md +172 -0
- package/docs/developer/NPM_AUTH_SETUP.md +142 -0
- package/docs/developer/REFACTORING.md +196 -0
- package/docs/releases/COMMUNITY_ANNOUNCEMENT_v1.1.2.md +126 -0
- package/docs/releases/RELEASE_NOTES_v1.1.2.md +173 -0
- package/docs/user-guides/CLAUDE_DESKTOP_SETUP.md +187 -0
- package/package.json +4 -3
- package/src/client/api.ts +229 -229
- package/src/client/auth.ts +135 -136
- package/src/client/managers/AuthenticationManager.ts +148 -105
- package/src/client/managers/BaseManager.ts +15 -12
- package/src/client/managers/RequestManager.ts +17 -17
- package/src/client/managers/index.ts +3 -3
- package/src/index.ts +141 -114
- package/src/server.ts +1 -1
- package/src/tools/auth.ts +36 -36
- package/src/tools/comments.ts +90 -90
- package/src/tools/media.ts +89 -91
- package/src/tools/pages.ts +86 -86
- package/src/tools/posts.ts +106 -106
- package/src/tools/site.ts +71 -71
- package/src/tools/taxonomies.ts +102 -102
- package/src/tools/users.ts +77 -77
- package/src/types/client.ts +1 -1
- package/src/types/index.ts +1 -1
- package/src/types/mcp.ts +36 -16
- package/src/types/wordpress.ts +1 -1
- package/src/utils/debug.ts +63 -39
- package/src/utils/error.ts +1 -1
- package/src/utils/toolWrapper.ts +4 -4
- package/dist/client/WordPressClient.d.ts +0 -81
- package/dist/client/WordPressClient.d.ts.map +0 -1
- package/dist/client/WordPressClient.js +0 -354
- package/dist/client/WordPressClient.js.map +0 -1
- package/dist/tools/base.d.ts +0 -37
- package/dist/tools/base.d.ts.map +0 -1
- package/dist/tools/base.js +0 -60
- package/dist/tools/base.js.map +0 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
A comprehensive Model Context Protocol (MCP) server for WordPress management through the WordPress REST API v2. Completely written in TypeScript with modular architecture and 95%+ test coverage.
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/mcp-wordpress)
|
|
6
6
|
[](https://github.com/AiondaDotCom/mcp-wordpress)
|
|
7
7
|
[](https://github.com/AiondaDotCom/mcp-wordpress)
|
|
8
8
|
[](https://github.com/AiondaDotCom/mcp-wordpress/blob/main/REFACTORING.md)
|
|
@@ -28,10 +28,10 @@ The easiest way to get started - no installation required:
|
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
30
|
# Run directly with NPX
|
|
31
|
-
npx
|
|
31
|
+
npx mcp-wordpress
|
|
32
32
|
|
|
33
33
|
# Or install globally
|
|
34
|
-
npm install -g
|
|
34
|
+
npm install -g mcp-wordpress
|
|
35
35
|
mcp-wordpress
|
|
36
36
|
```
|
|
37
37
|
|
|
@@ -49,7 +49,7 @@ npm start
|
|
|
49
49
|
|
|
50
50
|
```bash
|
|
51
51
|
# For NPX users
|
|
52
|
-
npx
|
|
52
|
+
npx mcp-wordpress setup
|
|
53
53
|
|
|
54
54
|
# For local installation
|
|
55
55
|
npm run setup
|
|
@@ -108,7 +108,7 @@ Please:
|
|
|
108
108
|
3. Test the connection to make sure everything works
|
|
109
109
|
4. Show me how to use the WordPress tools
|
|
110
110
|
|
|
111
|
-
I want to use the NPX version (
|
|
111
|
+
I want to use the NPX version (mcp-wordpress) so I don't need to install anything locally.
|
|
112
112
|
```
|
|
113
113
|
|
|
114
114
|
### Full Local Development Setup
|
|
@@ -156,7 +156,7 @@ Configure MCP WordPress Server in your Claude Desktop `mcp.json` configuration f
|
|
|
156
156
|
"mcpServers": {
|
|
157
157
|
"mcp-wordpress": {
|
|
158
158
|
"command": "npx",
|
|
159
|
-
"args": ["
|
|
159
|
+
"args": ["mcp-wordpress"],
|
|
160
160
|
"env": {
|
|
161
161
|
"WORDPRESS_SITE_URL": "https://your-site.com",
|
|
162
162
|
"WORDPRESS_USERNAME": "your-username",
|
|
@@ -211,7 +211,7 @@ If you prefer to use a `.env` file instead of environment variables in the confi
|
|
|
211
211
|
"mcpServers": {
|
|
212
212
|
"mcp-wordpress": {
|
|
213
213
|
"command": "npx",
|
|
214
|
-
"args": ["
|
|
214
|
+
"args": ["mcp-wordpress"],
|
|
215
215
|
"env": {
|
|
216
216
|
"NODE_ENV": "production"
|
|
217
217
|
}
|
|
@@ -242,7 +242,7 @@ Here's a complete `claude_desktop_config.json` file with MCP WordPress:
|
|
|
242
242
|
"mcpServers": {
|
|
243
243
|
"mcp-wordpress": {
|
|
244
244
|
"command": "npx",
|
|
245
|
-
"args": ["
|
|
245
|
+
"args": ["mcp-wordpress"],
|
|
246
246
|
"env": {
|
|
247
247
|
"WORDPRESS_SITE_URL": "https://your-site.com",
|
|
248
248
|
"WORDPRESS_USERNAME": "your-username",
|
package/bin/mcp-wordpress.js
CHANGED
package/dist/client/api.d.ts
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
* WordPress API Client
|
|
3
3
|
* Handles all REST API communication with WordPress
|
|
4
4
|
*/
|
|
5
|
-
import type { IWordPressClient, WordPressClientConfig, HTTPMethod, RequestOptions, ClientStats } from
|
|
6
|
-
import type { WordPressPost, WordPressPage, WordPressMedia, WordPressUser, WordPressComment, WordPressCategory, WordPressTag, WordPressSiteSettings, WordPressApplicationPassword, PostQueryParams, MediaQueryParams, UserQueryParams, CommentQueryParams, CreatePostRequest, UpdatePostRequest, CreatePageRequest, UpdatePageRequest, CreateUserRequest, UpdateUserRequest, CreateCommentRequest, UpdateCommentRequest, CreateCategoryRequest, UpdateCategoryRequest, CreateTagRequest, UpdateTagRequest, UploadMediaRequest, UpdateMediaRequest } from
|
|
5
|
+
import type { IWordPressClient, WordPressClientConfig, HTTPMethod, RequestOptions, ClientStats } from '../types/client.js';
|
|
6
|
+
import type { WordPressPost, WordPressPage, WordPressMedia, WordPressUser, WordPressComment, WordPressCategory, WordPressTag, WordPressSiteSettings, WordPressApplicationPassword, PostQueryParams, MediaQueryParams, UserQueryParams, CommentQueryParams, CreatePostRequest, UpdatePostRequest, CreatePageRequest, UpdatePageRequest, CreateUserRequest, UpdateUserRequest, CreateCommentRequest, UpdateCommentRequest, CreateCategoryRequest, UpdateCategoryRequest, CreateTagRequest, UpdateTagRequest, UploadMediaRequest, UpdateMediaRequest } from '../types/wordpress.js';
|
|
7
7
|
export declare class WordPressClient implements IWordPressClient {
|
|
8
8
|
private baseUrl;
|
|
9
9
|
private apiUrl;
|
|
@@ -60,7 +60,7 @@ export declare class WordPressClient implements IWordPressClient {
|
|
|
60
60
|
patch<T = any>(endpoint: string, data?: any, options?: RequestOptions): Promise<T>;
|
|
61
61
|
delete<T = any>(endpoint: string, options?: RequestOptions): Promise<T>;
|
|
62
62
|
getPosts(params?: PostQueryParams): Promise<WordPressPost[]>;
|
|
63
|
-
getPost(id: number, context?:
|
|
63
|
+
getPost(id: number, context?: 'view' | 'embed' | 'edit'): Promise<WordPressPost>;
|
|
64
64
|
createPost(data: CreatePostRequest): Promise<WordPressPost>;
|
|
65
65
|
updatePost(data: UpdatePostRequest): Promise<WordPressPost>;
|
|
66
66
|
deletePost(id: number, force?: boolean): Promise<{
|
|
@@ -69,7 +69,7 @@ export declare class WordPressClient implements IWordPressClient {
|
|
|
69
69
|
}>;
|
|
70
70
|
getPostRevisions(id: number): Promise<WordPressPost[]>;
|
|
71
71
|
getPages(params?: PostQueryParams): Promise<WordPressPage[]>;
|
|
72
|
-
getPage(id: number, context?:
|
|
72
|
+
getPage(id: number, context?: 'view' | 'embed' | 'edit'): Promise<WordPressPage>;
|
|
73
73
|
createPage(data: CreatePageRequest): Promise<WordPressPage>;
|
|
74
74
|
updatePage(data: UpdatePageRequest): Promise<WordPressPage>;
|
|
75
75
|
deletePage(id: number, force?: boolean): Promise<{
|
|
@@ -78,7 +78,7 @@ export declare class WordPressClient implements IWordPressClient {
|
|
|
78
78
|
}>;
|
|
79
79
|
getPageRevisions(id: number): Promise<WordPressPage[]>;
|
|
80
80
|
getMedia(params?: MediaQueryParams): Promise<WordPressMedia[]>;
|
|
81
|
-
getMediaItem(id: number, context?:
|
|
81
|
+
getMediaItem(id: number, context?: 'view' | 'embed' | 'edit'): Promise<WordPressMedia>;
|
|
82
82
|
uploadMedia(data: UploadMediaRequest): Promise<WordPressMedia>;
|
|
83
83
|
uploadFile(fileData: Buffer, filename: string, mimeType: string, meta?: Partial<UploadMediaRequest>, options?: RequestOptions): Promise<WordPressMedia>;
|
|
84
84
|
updateMedia(data: UpdateMediaRequest): Promise<WordPressMedia>;
|
|
@@ -87,7 +87,7 @@ export declare class WordPressClient implements IWordPressClient {
|
|
|
87
87
|
previous?: WordPressMedia;
|
|
88
88
|
}>;
|
|
89
89
|
getUsers(params?: UserQueryParams): Promise<WordPressUser[]>;
|
|
90
|
-
getUser(id: number |
|
|
90
|
+
getUser(id: number | 'me', context?: 'view' | 'embed' | 'edit'): Promise<WordPressUser>;
|
|
91
91
|
createUser(data: CreateUserRequest): Promise<WordPressUser>;
|
|
92
92
|
updateUser(data: UpdateUserRequest): Promise<WordPressUser>;
|
|
93
93
|
deleteUser(id: number, reassign?: number): Promise<{
|
|
@@ -96,7 +96,7 @@ export declare class WordPressClient implements IWordPressClient {
|
|
|
96
96
|
}>;
|
|
97
97
|
getCurrentUser(): Promise<WordPressUser>;
|
|
98
98
|
getComments(params?: CommentQueryParams): Promise<WordPressComment[]>;
|
|
99
|
-
getComment(id: number, context?:
|
|
99
|
+
getComment(id: number, context?: 'view' | 'embed' | 'edit'): Promise<WordPressComment>;
|
|
100
100
|
createComment(data: CreateCommentRequest): Promise<WordPressComment>;
|
|
101
101
|
updateComment(data: UpdateCommentRequest): Promise<WordPressComment>;
|
|
102
102
|
deleteComment(id: number, force?: boolean): Promise<{
|
|
@@ -125,9 +125,9 @@ export declare class WordPressClient implements IWordPressClient {
|
|
|
125
125
|
getSiteSettings(): Promise<WordPressSiteSettings>;
|
|
126
126
|
updateSiteSettings(settings: Partial<WordPressSiteSettings>): Promise<WordPressSiteSettings>;
|
|
127
127
|
getSiteInfo(): Promise<any>;
|
|
128
|
-
getApplicationPasswords(userId?: number |
|
|
129
|
-
createApplicationPassword(userId: number |
|
|
130
|
-
deleteApplicationPassword(userId: number |
|
|
128
|
+
getApplicationPasswords(userId?: number | 'me'): Promise<WordPressApplicationPassword[]>;
|
|
129
|
+
createApplicationPassword(userId: number | 'me', name: string, appId?: string): Promise<WordPressApplicationPassword>;
|
|
130
|
+
deleteApplicationPassword(userId: number | 'me', uuid: string): Promise<{
|
|
131
131
|
deleted: boolean;
|
|
132
132
|
}>;
|
|
133
133
|
search(query: string, types?: string[], subtype?: string): Promise<any[]>;
|