claude-plugin-wordpress-manager 1.8.0 → 1.9.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.
Files changed (28) hide show
  1. package/.claude-plugin/plugin.json +5 -3
  2. package/CHANGELOG.md +27 -0
  3. package/agents/wp-site-manager.md +26 -0
  4. package/docs/plans/2026-02-28-multisite-v1.9.0-design.md +258 -0
  5. package/docs/plans/2026-02-28-multisite-v1.9.0.md +1604 -0
  6. package/package.json +5 -3
  7. package/servers/wp-rest-bridge/build/tools/index.d.ts +260 -0
  8. package/servers/wp-rest-bridge/build/tools/index.js +6 -0
  9. package/servers/wp-rest-bridge/build/tools/multisite-network.d.ts +132 -0
  10. package/servers/wp-rest-bridge/build/tools/multisite-network.js +157 -0
  11. package/servers/wp-rest-bridge/build/tools/multisite-sites.d.ts +150 -0
  12. package/servers/wp-rest-bridge/build/tools/multisite-sites.js +160 -0
  13. package/servers/wp-rest-bridge/build/types.d.ts +13 -0
  14. package/servers/wp-rest-bridge/build/wordpress.d.ts +19 -0
  15. package/servers/wp-rest-bridge/build/wordpress.js +10 -0
  16. package/servers/wp-rest-bridge/build/wpcli.d.ts +23 -0
  17. package/servers/wp-rest-bridge/build/wpcli.js +72 -0
  18. package/skills/wordpress-router/references/decision-tree.md +4 -2
  19. package/skills/wp-multisite/SKILL.md +92 -0
  20. package/skills/wp-multisite/references/domain-mapping.md +70 -0
  21. package/skills/wp-multisite/references/migration-multisite.md +76 -0
  22. package/skills/wp-multisite/references/network-plugins.md +66 -0
  23. package/skills/wp-multisite/references/network-setup.md +69 -0
  24. package/skills/wp-multisite/references/site-management.md +67 -0
  25. package/skills/wp-multisite/references/user-roles.md +73 -0
  26. package/skills/wp-multisite/scripts/multisite_inspect.mjs +160 -0
  27. package/skills/wp-security/SKILL.md +4 -0
  28. package/skills/wp-wpcli-and-ops/SKILL.md +4 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "claude-plugin-wordpress-manager",
3
- "version": "1.8.0",
4
- "description": "Unified WordPress management and development plugin for Claude Code. Orchestrates Hostinger MCP, WP REST API bridge (71 tools incl. 30 WooCommerce), and WordPress.com MCP with 25 skills, 9 agents, and security hooks. v1.8.0 adds WooCommerce store management: products, orders, customers, coupons, analytics, and store configuration.",
3
+ "version": "1.9.0",
4
+ "description": "Unified WordPress management and development plugin for Claude Code. Orchestrates Hostinger MCP, WP REST API bridge (81 tools incl. 30 WooCommerce + 10 Multisite), and WordPress.com MCP with 26 skills, 9 agents, and security hooks. v1.9.0 adds WordPress Multisite network management via WP-CLI: sub-site CRUD, network plugins, Super Admin, domain mapping.",
5
5
  "author": {
6
6
  "name": "vinmor",
7
7
  "email": "morreale.v@gmail.com"
@@ -25,7 +25,9 @@
25
25
  "wp-env",
26
26
  "woocommerce",
27
27
  "ecommerce",
28
- "shop"
28
+ "shop",
29
+ "multisite",
30
+ "network"
29
31
  ],
30
32
  "repository": {
31
33
  "type": "git",
@@ -1,6 +1,266 @@
1
1
  import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
2
  export declare const allTools: Tool[];
3
3
  export declare const toolHandlers: {
4
+ ms_list_network_plugins: (params: import("zod").TypeOf<import("zod").ZodObject<{
5
+ site_id: import("zod").ZodOptional<import("zod").ZodString>;
6
+ }, "strict", import("zod").ZodTypeAny, {
7
+ site_id?: string | undefined;
8
+ }, {
9
+ site_id?: string | undefined;
10
+ }>>) => Promise<{
11
+ toolResult: {
12
+ content: {
13
+ type: string;
14
+ text: string;
15
+ }[];
16
+ isError?: undefined;
17
+ };
18
+ } | {
19
+ toolResult: {
20
+ isError: boolean;
21
+ content: {
22
+ type: string;
23
+ text: string;
24
+ }[];
25
+ };
26
+ }>;
27
+ ms_network_activate_plugin: (params: import("zod").TypeOf<import("zod").ZodObject<{
28
+ plugin_slug: import("zod").ZodString;
29
+ site_id: import("zod").ZodOptional<import("zod").ZodString>;
30
+ }, "strict", import("zod").ZodTypeAny, {
31
+ plugin_slug: string;
32
+ site_id?: string | undefined;
33
+ }, {
34
+ plugin_slug: string;
35
+ site_id?: string | undefined;
36
+ }>>) => Promise<{
37
+ toolResult: {
38
+ content: {
39
+ type: string;
40
+ text: string;
41
+ }[];
42
+ isError?: undefined;
43
+ };
44
+ } | {
45
+ toolResult: {
46
+ isError: boolean;
47
+ content: {
48
+ type: string;
49
+ text: string;
50
+ }[];
51
+ };
52
+ }>;
53
+ ms_network_deactivate_plugin: (params: import("zod").TypeOf<import("zod").ZodObject<{
54
+ plugin_slug: import("zod").ZodString;
55
+ site_id: import("zod").ZodOptional<import("zod").ZodString>;
56
+ }, "strict", import("zod").ZodTypeAny, {
57
+ plugin_slug: string;
58
+ site_id?: string | undefined;
59
+ }, {
60
+ plugin_slug: string;
61
+ site_id?: string | undefined;
62
+ }>>) => Promise<{
63
+ toolResult: {
64
+ content: {
65
+ type: string;
66
+ text: string;
67
+ }[];
68
+ isError?: undefined;
69
+ };
70
+ } | {
71
+ toolResult: {
72
+ isError: boolean;
73
+ content: {
74
+ type: string;
75
+ text: string;
76
+ }[];
77
+ };
78
+ }>;
79
+ ms_list_super_admins: (params: import("zod").TypeOf<import("zod").ZodObject<{
80
+ site_id: import("zod").ZodOptional<import("zod").ZodString>;
81
+ }, "strict", import("zod").ZodTypeAny, {
82
+ site_id?: string | undefined;
83
+ }, {
84
+ site_id?: string | undefined;
85
+ }>>) => Promise<{
86
+ toolResult: {
87
+ content: {
88
+ type: string;
89
+ text: string;
90
+ }[];
91
+ isError?: undefined;
92
+ };
93
+ } | {
94
+ toolResult: {
95
+ isError: boolean;
96
+ content: {
97
+ type: string;
98
+ text: string;
99
+ }[];
100
+ };
101
+ }>;
102
+ ms_get_network_settings: (params: import("zod").TypeOf<import("zod").ZodObject<{
103
+ site_id: import("zod").ZodOptional<import("zod").ZodString>;
104
+ }, "strict", import("zod").ZodTypeAny, {
105
+ site_id?: string | undefined;
106
+ }, {
107
+ site_id?: string | undefined;
108
+ }>>) => Promise<{
109
+ toolResult: {
110
+ content: {
111
+ type: string;
112
+ text: string;
113
+ }[];
114
+ isError?: undefined;
115
+ };
116
+ } | {
117
+ toolResult: {
118
+ isError: boolean;
119
+ content: {
120
+ type: string;
121
+ text: string;
122
+ }[];
123
+ };
124
+ }>;
125
+ ms_list_sites: (params: import("zod").TypeOf<import("zod").ZodObject<{
126
+ site_id: import("zod").ZodOptional<import("zod").ZodString>;
127
+ }, "strict", import("zod").ZodTypeAny, {
128
+ site_id?: string | undefined;
129
+ }, {
130
+ site_id?: string | undefined;
131
+ }>>) => Promise<{
132
+ toolResult: {
133
+ content: {
134
+ type: string;
135
+ text: string;
136
+ }[];
137
+ isError?: undefined;
138
+ };
139
+ } | {
140
+ toolResult: {
141
+ isError: boolean;
142
+ content: {
143
+ type: string;
144
+ text: string;
145
+ }[];
146
+ };
147
+ }>;
148
+ ms_get_site: (params: import("zod").TypeOf<import("zod").ZodObject<{
149
+ blog_id: import("zod").ZodNumber;
150
+ site_id: import("zod").ZodOptional<import("zod").ZodString>;
151
+ }, "strict", import("zod").ZodTypeAny, {
152
+ blog_id: number;
153
+ site_id?: string | undefined;
154
+ }, {
155
+ blog_id: number;
156
+ site_id?: string | undefined;
157
+ }>>) => Promise<{
158
+ toolResult: {
159
+ content: {
160
+ type: string;
161
+ text: string;
162
+ }[];
163
+ isError?: undefined;
164
+ };
165
+ } | {
166
+ toolResult: {
167
+ isError: boolean;
168
+ content: {
169
+ type: string;
170
+ text: string;
171
+ }[];
172
+ };
173
+ }>;
174
+ ms_create_site: (params: import("zod").TypeOf<import("zod").ZodObject<{
175
+ slug: import("zod").ZodString;
176
+ title: import("zod").ZodString;
177
+ email: import("zod").ZodString;
178
+ site_id: import("zod").ZodOptional<import("zod").ZodString>;
179
+ }, "strict", import("zod").ZodTypeAny, {
180
+ slug: string;
181
+ title: string;
182
+ email: string;
183
+ site_id?: string | undefined;
184
+ }, {
185
+ slug: string;
186
+ title: string;
187
+ email: string;
188
+ site_id?: string | undefined;
189
+ }>>) => Promise<{
190
+ toolResult: {
191
+ content: {
192
+ type: string;
193
+ text: string;
194
+ }[];
195
+ isError?: undefined;
196
+ };
197
+ } | {
198
+ toolResult: {
199
+ isError: boolean;
200
+ content: {
201
+ type: string;
202
+ text: string;
203
+ }[];
204
+ };
205
+ }>;
206
+ ms_activate_site: (params: import("zod").TypeOf<import("zod").ZodObject<{
207
+ blog_id: import("zod").ZodNumber;
208
+ active: import("zod").ZodBoolean;
209
+ site_id: import("zod").ZodOptional<import("zod").ZodString>;
210
+ }, "strict", import("zod").ZodTypeAny, {
211
+ active: boolean;
212
+ blog_id: number;
213
+ site_id?: string | undefined;
214
+ }, {
215
+ active: boolean;
216
+ blog_id: number;
217
+ site_id?: string | undefined;
218
+ }>>) => Promise<{
219
+ toolResult: {
220
+ content: {
221
+ type: string;
222
+ text: string;
223
+ }[];
224
+ isError?: undefined;
225
+ };
226
+ } | {
227
+ toolResult: {
228
+ isError: boolean;
229
+ content: {
230
+ type: string;
231
+ text: string;
232
+ }[];
233
+ };
234
+ }>;
235
+ ms_delete_site: (params: import("zod").TypeOf<import("zod").ZodObject<{
236
+ blog_id: import("zod").ZodNumber;
237
+ confirm: import("zod").ZodLiteral<true>;
238
+ site_id: import("zod").ZodOptional<import("zod").ZodString>;
239
+ }, "strict", import("zod").ZodTypeAny, {
240
+ blog_id: number;
241
+ confirm: true;
242
+ site_id?: string | undefined;
243
+ }, {
244
+ blog_id: number;
245
+ confirm: true;
246
+ site_id?: string | undefined;
247
+ }>>) => Promise<{
248
+ toolResult: {
249
+ content: {
250
+ type: string;
251
+ text: string;
252
+ }[];
253
+ isError?: undefined;
254
+ };
255
+ } | {
256
+ toolResult: {
257
+ isError: boolean;
258
+ content: {
259
+ type: string;
260
+ text: string;
261
+ }[];
262
+ };
263
+ }>;
4
264
  wc_list_payment_gateways: () => Promise<{
5
265
  toolResult: {
6
266
  content: {
@@ -12,6 +12,8 @@ import { wcCustomerTools, wcCustomerHandlers } from './wc-customers.js';
12
12
  import { wcCouponTools, wcCouponHandlers } from './wc-coupons.js';
13
13
  import { wcReportTools, wcReportHandlers } from './wc-reports.js';
14
14
  import { wcSettingTools, wcSettingHandlers } from './wc-settings.js';
15
+ import { multisiteSiteTools, multisiteSiteHandlers } from './multisite-sites.js';
16
+ import { multisiteNetworkTools, multisiteNetworkHandlers } from './multisite-network.js';
15
17
  // Combine all tools
16
18
  export const allTools = [
17
19
  ...unifiedContentTools, // 8 tools
@@ -28,6 +30,8 @@ export const allTools = [
28
30
  ...wcCouponTools, // 4 tools
29
31
  ...wcReportTools, // 5 tools
30
32
  ...wcSettingTools, // 4 tools
33
+ ...multisiteSiteTools, // 5 tools
34
+ ...multisiteNetworkTools, // 5 tools
31
35
  ];
32
36
  // Combine all handlers
33
37
  export const toolHandlers = {
@@ -45,4 +49,6 @@ export const toolHandlers = {
45
49
  ...wcCouponHandlers,
46
50
  ...wcReportHandlers,
47
51
  ...wcSettingHandlers,
52
+ ...multisiteSiteHandlers,
53
+ ...multisiteNetworkHandlers,
48
54
  };
@@ -0,0 +1,132 @@
1
+ import { Tool } from '@modelcontextprotocol/sdk/types.js';
2
+ import { z } from 'zod';
3
+ declare const msListNetworkPluginsSchema: z.ZodObject<{
4
+ site_id: z.ZodOptional<z.ZodString>;
5
+ }, "strict", z.ZodTypeAny, {
6
+ site_id?: string | undefined;
7
+ }, {
8
+ site_id?: string | undefined;
9
+ }>;
10
+ declare const msNetworkActivatePluginSchema: z.ZodObject<{
11
+ plugin_slug: z.ZodString;
12
+ site_id: z.ZodOptional<z.ZodString>;
13
+ }, "strict", z.ZodTypeAny, {
14
+ plugin_slug: string;
15
+ site_id?: string | undefined;
16
+ }, {
17
+ plugin_slug: string;
18
+ site_id?: string | undefined;
19
+ }>;
20
+ declare const msNetworkDeactivatePluginSchema: z.ZodObject<{
21
+ plugin_slug: z.ZodString;
22
+ site_id: z.ZodOptional<z.ZodString>;
23
+ }, "strict", z.ZodTypeAny, {
24
+ plugin_slug: string;
25
+ site_id?: string | undefined;
26
+ }, {
27
+ plugin_slug: string;
28
+ site_id?: string | undefined;
29
+ }>;
30
+ declare const msListSuperAdminsSchema: z.ZodObject<{
31
+ site_id: z.ZodOptional<z.ZodString>;
32
+ }, "strict", z.ZodTypeAny, {
33
+ site_id?: string | undefined;
34
+ }, {
35
+ site_id?: string | undefined;
36
+ }>;
37
+ declare const msGetNetworkSettingsSchema: z.ZodObject<{
38
+ site_id: z.ZodOptional<z.ZodString>;
39
+ }, "strict", z.ZodTypeAny, {
40
+ site_id?: string | undefined;
41
+ }, {
42
+ site_id?: string | undefined;
43
+ }>;
44
+ export declare const multisiteNetworkTools: Tool[];
45
+ export declare const multisiteNetworkHandlers: {
46
+ ms_list_network_plugins: (params: z.infer<typeof msListNetworkPluginsSchema>) => Promise<{
47
+ toolResult: {
48
+ content: {
49
+ type: string;
50
+ text: string;
51
+ }[];
52
+ isError?: undefined;
53
+ };
54
+ } | {
55
+ toolResult: {
56
+ isError: boolean;
57
+ content: {
58
+ type: string;
59
+ text: string;
60
+ }[];
61
+ };
62
+ }>;
63
+ ms_network_activate_plugin: (params: z.infer<typeof msNetworkActivatePluginSchema>) => Promise<{
64
+ toolResult: {
65
+ content: {
66
+ type: string;
67
+ text: string;
68
+ }[];
69
+ isError?: undefined;
70
+ };
71
+ } | {
72
+ toolResult: {
73
+ isError: boolean;
74
+ content: {
75
+ type: string;
76
+ text: string;
77
+ }[];
78
+ };
79
+ }>;
80
+ ms_network_deactivate_plugin: (params: z.infer<typeof msNetworkDeactivatePluginSchema>) => Promise<{
81
+ toolResult: {
82
+ content: {
83
+ type: string;
84
+ text: string;
85
+ }[];
86
+ isError?: undefined;
87
+ };
88
+ } | {
89
+ toolResult: {
90
+ isError: boolean;
91
+ content: {
92
+ type: string;
93
+ text: string;
94
+ }[];
95
+ };
96
+ }>;
97
+ ms_list_super_admins: (params: z.infer<typeof msListSuperAdminsSchema>) => Promise<{
98
+ toolResult: {
99
+ content: {
100
+ type: string;
101
+ text: string;
102
+ }[];
103
+ isError?: undefined;
104
+ };
105
+ } | {
106
+ toolResult: {
107
+ isError: boolean;
108
+ content: {
109
+ type: string;
110
+ text: string;
111
+ }[];
112
+ };
113
+ }>;
114
+ ms_get_network_settings: (params: z.infer<typeof msGetNetworkSettingsSchema>) => Promise<{
115
+ toolResult: {
116
+ content: {
117
+ type: string;
118
+ text: string;
119
+ }[];
120
+ isError?: undefined;
121
+ };
122
+ } | {
123
+ toolResult: {
124
+ isError: boolean;
125
+ content: {
126
+ type: string;
127
+ text: string;
128
+ }[];
129
+ };
130
+ }>;
131
+ };
132
+ export {};
@@ -0,0 +1,157 @@
1
+ import { makeWordPressRequest } from '../wordpress.js';
2
+ import { executeWpCli, isMultisite } from '../wpcli.js';
3
+ import { z } from 'zod';
4
+ // ── Schemas ──────────────────────────────────────────────────────────
5
+ const msListNetworkPluginsSchema = z.object({
6
+ site_id: z.string().optional().describe('Target site ID (defaults to active site)')
7
+ }).strict();
8
+ const msNetworkActivatePluginSchema = z.object({
9
+ plugin_slug: z.string().describe('Plugin slug to network-activate (e.g., "akismet", "jetpack")'),
10
+ site_id: z.string().optional().describe('Target site ID (defaults to active site)')
11
+ }).strict();
12
+ const msNetworkDeactivatePluginSchema = z.object({
13
+ plugin_slug: z.string().describe('Plugin slug to network-deactivate'),
14
+ site_id: z.string().optional().describe('Target site ID (defaults to active site)')
15
+ }).strict();
16
+ const msListSuperAdminsSchema = z.object({
17
+ site_id: z.string().optional().describe('Target site ID (defaults to active site)')
18
+ }).strict();
19
+ const msGetNetworkSettingsSchema = z.object({
20
+ site_id: z.string().optional().describe('Target site ID (defaults to active site)')
21
+ }).strict();
22
+ // ── Tools ────────────────────────────────────────────────────────────
23
+ export const multisiteNetworkTools = [
24
+ {
25
+ name: 'ms_list_network_plugins',
26
+ description: 'Lists all plugins on the multisite network with their activation status (uses REST API).',
27
+ inputSchema: { type: 'object', properties: msListNetworkPluginsSchema.shape }
28
+ },
29
+ {
30
+ name: 'ms_network_activate_plugin',
31
+ description: 'Network-activates a plugin across all sites in the multisite network (uses wp-cli).',
32
+ inputSchema: { type: 'object', properties: msNetworkActivatePluginSchema.shape }
33
+ },
34
+ {
35
+ name: 'ms_network_deactivate_plugin',
36
+ description: 'Network-deactivates a plugin from all sites in the multisite network (uses wp-cli).',
37
+ inputSchema: { type: 'object', properties: msNetworkDeactivatePluginSchema.shape }
38
+ },
39
+ {
40
+ name: 'ms_list_super_admins',
41
+ description: 'Lists all Super Admin users in the multisite network (uses wp-cli).',
42
+ inputSchema: { type: 'object', properties: msListSuperAdminsSchema.shape }
43
+ },
44
+ {
45
+ name: 'ms_get_network_settings',
46
+ description: 'Gets network-wide settings (site name, admin email, registration policy) via wp-cli.',
47
+ inputSchema: { type: 'object', properties: msGetNetworkSettingsSchema.shape }
48
+ }
49
+ ];
50
+ // ── Helpers ──────────────────────────────────────────────────────────
51
+ function requireMultisite(siteId) {
52
+ if (!isMultisite(siteId)) {
53
+ throw new Error(`Site is not configured as multisite. ` +
54
+ `Set is_multisite: true in WP_SITES_CONFIG.`);
55
+ }
56
+ }
57
+ // ── Handlers ─────────────────────────────────────────────────────────
58
+ export const multisiteNetworkHandlers = {
59
+ ms_list_network_plugins: async (params) => {
60
+ try {
61
+ requireMultisite(params.site_id);
62
+ const result = await makeWordPressRequest('GET', 'plugins', undefined, {
63
+ siteId: params.site_id
64
+ });
65
+ return {
66
+ toolResult: {
67
+ content: [{ type: 'text', text: JSON.stringify(result, null, 2) }]
68
+ }
69
+ };
70
+ }
71
+ catch (error) {
72
+ const errorMessage = error.response?.data?.message || error.message;
73
+ return {
74
+ toolResult: {
75
+ isError: true,
76
+ content: [{ type: 'text', text: `Error listing network plugins: ${errorMessage}` }]
77
+ }
78
+ };
79
+ }
80
+ },
81
+ ms_network_activate_plugin: async (params) => {
82
+ try {
83
+ requireMultisite(params.site_id);
84
+ const result = await executeWpCli(`plugin activate ${params.plugin_slug} --network`, params.site_id, { skipJson: true });
85
+ return {
86
+ toolResult: {
87
+ content: [{ type: 'text', text: result || `Plugin "${params.plugin_slug}" network-activated successfully.` }]
88
+ }
89
+ };
90
+ }
91
+ catch (error) {
92
+ return {
93
+ toolResult: {
94
+ isError: true,
95
+ content: [{ type: 'text', text: `Error network-activating plugin: ${error.message}` }]
96
+ }
97
+ };
98
+ }
99
+ },
100
+ ms_network_deactivate_plugin: async (params) => {
101
+ try {
102
+ requireMultisite(params.site_id);
103
+ const result = await executeWpCli(`plugin deactivate ${params.plugin_slug} --network`, params.site_id, { skipJson: true });
104
+ return {
105
+ toolResult: {
106
+ content: [{ type: 'text', text: result || `Plugin "${params.plugin_slug}" network-deactivated successfully.` }]
107
+ }
108
+ };
109
+ }
110
+ catch (error) {
111
+ return {
112
+ toolResult: {
113
+ isError: true,
114
+ content: [{ type: 'text', text: `Error network-deactivating plugin: ${error.message}` }]
115
+ }
116
+ };
117
+ }
118
+ },
119
+ ms_list_super_admins: async (params) => {
120
+ try {
121
+ requireMultisite(params.site_id);
122
+ const result = await executeWpCli('super-admin list', params.site_id, { skipJson: true });
123
+ return {
124
+ toolResult: {
125
+ content: [{ type: 'text', text: result }]
126
+ }
127
+ };
128
+ }
129
+ catch (error) {
130
+ return {
131
+ toolResult: {
132
+ isError: true,
133
+ content: [{ type: 'text', text: `Error listing super admins: ${error.message}` }]
134
+ }
135
+ };
136
+ }
137
+ },
138
+ ms_get_network_settings: async (params) => {
139
+ try {
140
+ requireMultisite(params.site_id);
141
+ const result = await executeWpCli('network meta list 1', params.site_id);
142
+ return {
143
+ toolResult: {
144
+ content: [{ type: 'text', text: result }]
145
+ }
146
+ };
147
+ }
148
+ catch (error) {
149
+ return {
150
+ toolResult: {
151
+ isError: true,
152
+ content: [{ type: 'text', text: `Error getting network settings: ${error.message}` }]
153
+ }
154
+ };
155
+ }
156
+ }
157
+ };