bricks-mcp-server 0.5.0 → 0.7.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/dist/index.js +70 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -33,7 +33,7 @@ if (subcommand === "doctor" || subcommand === "diagnose") {
|
|
|
33
33
|
if (process.env.WP_URL) {
|
|
34
34
|
console.error(`[bricks-mcp] target WP_URL=${process.env.WP_URL} WP_USER=${process.env.WP_USER ?? "?"}`);
|
|
35
35
|
}
|
|
36
|
-
const server = new Server({ name: "bricks-mcp-server", version: "0.
|
|
36
|
+
const server = new Server({ name: "bricks-mcp-server", version: "0.7.0" }, { capabilities: { tools: {} } });
|
|
37
37
|
const tools = [
|
|
38
38
|
{
|
|
39
39
|
name: "bricks_ping",
|
|
@@ -125,6 +125,21 @@ const tools = [
|
|
|
125
125
|
description: "The `modified` value you got from bricks_get_page. If the page changed since, the update is rejected (409) — re-fetch, merge, retry.",
|
|
126
126
|
},
|
|
127
127
|
title: { type: "string" },
|
|
128
|
+
status: {
|
|
129
|
+
type: "string",
|
|
130
|
+
description: "draft | publish | private | pending — e.g. set draft to hide a page.",
|
|
131
|
+
},
|
|
132
|
+
post_content: { type: "string", description: "Post body (WordPress editor content). HTML allowed." },
|
|
133
|
+
excerpt: { type: "string" },
|
|
134
|
+
date: { type: "string", description: "Publish date 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS' (UTC)." },
|
|
135
|
+
featured_media: {
|
|
136
|
+
type: "number",
|
|
137
|
+
description: "Attachment id for the featured image (0 to remove).",
|
|
138
|
+
},
|
|
139
|
+
terms: {
|
|
140
|
+
type: "object",
|
|
141
|
+
description: "Taxonomy terms, e.g. { \"categoria_noticia\": [\"Difusión\"] }.",
|
|
142
|
+
},
|
|
128
143
|
content: { type: "array", description: "Bricks elements array" },
|
|
129
144
|
header: { type: "array" },
|
|
130
145
|
footer: { type: "array" },
|
|
@@ -137,6 +152,12 @@ const tools = [
|
|
|
137
152
|
id: z.number().int().positive(),
|
|
138
153
|
expected_modified: z.string().optional(),
|
|
139
154
|
title: z.string().optional(),
|
|
155
|
+
status: z.string().optional(),
|
|
156
|
+
post_content: z.string().optional(),
|
|
157
|
+
excerpt: z.string().optional(),
|
|
158
|
+
date: z.string().optional(),
|
|
159
|
+
featured_media: z.number().int().nonnegative().optional(),
|
|
160
|
+
terms: z.record(z.any()).optional(),
|
|
140
161
|
content: z.array(z.any()).optional(),
|
|
141
162
|
header: z.array(z.any()).optional(),
|
|
142
163
|
footer: z.array(z.any()).optional(),
|
|
@@ -149,7 +170,7 @@ const tools = [
|
|
|
149
170
|
},
|
|
150
171
|
{
|
|
151
172
|
name: "bricks_create_page",
|
|
152
|
-
description: "Create a new page, post, or CPT entry (e.g. publicacion, noticia, evento),
|
|
173
|
+
description: "Create a new page, post, or CPT entry (e.g. publicacion, noticia, evento). For regular posts/CPTs pass post_content (the article body, HTML allowed), date, and featured_media. For Bricks-designed pages pass `content` (Bricks elements) instead. Defaults to draft so nothing goes live without review. Not for Bricks templates — use bricks_create_template.",
|
|
153
174
|
inputSchema: {
|
|
154
175
|
type: "object",
|
|
155
176
|
properties: {
|
|
@@ -163,7 +184,24 @@ const tools = [
|
|
|
163
184
|
description: "draft (default) | publish | private | pending",
|
|
164
185
|
},
|
|
165
186
|
slug: { type: "string" },
|
|
166
|
-
|
|
187
|
+
post_content: {
|
|
188
|
+
type: "string",
|
|
189
|
+
description: "Post body (WordPress editor content). HTML allowed. For regular posts/CPTs like noticia.",
|
|
190
|
+
},
|
|
191
|
+
excerpt: { type: "string" },
|
|
192
|
+
date: {
|
|
193
|
+
type: "string",
|
|
194
|
+
description: "Publish date 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS' (interpreted as UTC).",
|
|
195
|
+
},
|
|
196
|
+
featured_media: {
|
|
197
|
+
type: "number",
|
|
198
|
+
description: "Attachment id for the featured image (from bricks_list_media).",
|
|
199
|
+
},
|
|
200
|
+
terms: {
|
|
201
|
+
type: "object",
|
|
202
|
+
description: "Taxonomy terms, e.g. { \"categoria_noticia\": [\"Difusión\"] }.",
|
|
203
|
+
},
|
|
204
|
+
content: { type: "array", description: "Bricks elements array (for Bricks-designed pages)" },
|
|
167
205
|
settings: { type: "object" },
|
|
168
206
|
},
|
|
169
207
|
required: ["title"],
|
|
@@ -174,11 +212,40 @@ const tools = [
|
|
|
174
212
|
post_type: z.string().optional(),
|
|
175
213
|
status: z.string().optional(),
|
|
176
214
|
slug: z.string().optional(),
|
|
215
|
+
post_content: z.string().optional(),
|
|
216
|
+
excerpt: z.string().optional(),
|
|
217
|
+
date: z.string().optional(),
|
|
218
|
+
featured_media: z.number().int().positive().optional(),
|
|
219
|
+
terms: z.record(z.any()).optional(),
|
|
177
220
|
content: z.array(z.any()).optional(),
|
|
178
221
|
settings: z.record(z.any()).optional(),
|
|
179
222
|
}),
|
|
180
223
|
handler: async (args) => wpRequest("/pages", { method: "POST", body: args }),
|
|
181
224
|
},
|
|
225
|
+
{
|
|
226
|
+
name: "bricks_delete_page",
|
|
227
|
+
description: "Delete a page/post/CPT entry by ID. Moves it to trash by default; pass force:true to delete permanently.",
|
|
228
|
+
inputSchema: {
|
|
229
|
+
type: "object",
|
|
230
|
+
properties: {
|
|
231
|
+
id: { type: "number" },
|
|
232
|
+
force: {
|
|
233
|
+
type: "boolean",
|
|
234
|
+
description: "true = delete permanently; false/omitted = move to trash (recoverable).",
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
required: ["id"],
|
|
238
|
+
additionalProperties: false,
|
|
239
|
+
},
|
|
240
|
+
schema: z.object({
|
|
241
|
+
id: z.number().int().positive(),
|
|
242
|
+
force: z.boolean().optional(),
|
|
243
|
+
}),
|
|
244
|
+
handler: async (args) => wpRequest(`/pages/${args.id}`, {
|
|
245
|
+
method: "DELETE",
|
|
246
|
+
query: args.force ? { force: "true" } : undefined,
|
|
247
|
+
}),
|
|
248
|
+
},
|
|
182
249
|
{
|
|
183
250
|
name: "bricks_list_media",
|
|
184
251
|
description: "Search the WordPress media library (read-only). Returns attachment id, url, alt, mime, dimensions — use the id/url in Bricks image settings.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bricks-mcp-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "Provider-agnostic MCP server that exposes Bricks Builder pages, templates, global classes and theme styles as tools. Works with any MCP-compatible client (Claude Code, Codex CLI, etc.).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|