bricks-mcp-server 0.5.0 → 0.6.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 (2) hide show
  1. package/dist/index.js +49 -3
  2. 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.5.0" }, { capabilities: { tools: {} } });
36
+ const server = new Server({ name: "bricks-mcp-server", version: "0.6.0" }, { capabilities: { tools: {} } });
37
37
  const tools = [
38
38
  {
39
39
  name: "bricks_ping",
@@ -149,7 +149,7 @@ const tools = [
149
149
  },
150
150
  {
151
151
  name: "bricks_create_page",
152
- description: "Create a new page, post, or CPT entry (e.g. publicacion, noticia, evento), optionally with Bricks content. Defaults to draft status so nothing goes live without human review. Not for Bricks templates — use bricks_create_template for those.",
152
+ 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
153
  inputSchema: {
154
154
  type: "object",
155
155
  properties: {
@@ -163,7 +163,24 @@ const tools = [
163
163
  description: "draft (default) | publish | private | pending",
164
164
  },
165
165
  slug: { type: "string" },
166
- content: { type: "array", description: "Bricks elements array" },
166
+ post_content: {
167
+ type: "string",
168
+ description: "Post body (WordPress editor content). HTML allowed. For regular posts/CPTs like noticia.",
169
+ },
170
+ excerpt: { type: "string" },
171
+ date: {
172
+ type: "string",
173
+ description: "Publish date 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS' (interpreted as UTC).",
174
+ },
175
+ featured_media: {
176
+ type: "number",
177
+ description: "Attachment id for the featured image (from bricks_list_media).",
178
+ },
179
+ terms: {
180
+ type: "object",
181
+ description: "Taxonomy terms, e.g. { \"categoria_noticia\": [\"Difusión\"] }.",
182
+ },
183
+ content: { type: "array", description: "Bricks elements array (for Bricks-designed pages)" },
167
184
  settings: { type: "object" },
168
185
  },
169
186
  required: ["title"],
@@ -174,11 +191,40 @@ const tools = [
174
191
  post_type: z.string().optional(),
175
192
  status: z.string().optional(),
176
193
  slug: z.string().optional(),
194
+ post_content: z.string().optional(),
195
+ excerpt: z.string().optional(),
196
+ date: z.string().optional(),
197
+ featured_media: z.number().int().positive().optional(),
198
+ terms: z.record(z.any()).optional(),
177
199
  content: z.array(z.any()).optional(),
178
200
  settings: z.record(z.any()).optional(),
179
201
  }),
180
202
  handler: async (args) => wpRequest("/pages", { method: "POST", body: args }),
181
203
  },
204
+ {
205
+ name: "bricks_delete_page",
206
+ description: "Delete a page/post/CPT entry by ID. Moves it to trash by default; pass force:true to delete permanently.",
207
+ inputSchema: {
208
+ type: "object",
209
+ properties: {
210
+ id: { type: "number" },
211
+ force: {
212
+ type: "boolean",
213
+ description: "true = delete permanently; false/omitted = move to trash (recoverable).",
214
+ },
215
+ },
216
+ required: ["id"],
217
+ additionalProperties: false,
218
+ },
219
+ schema: z.object({
220
+ id: z.number().int().positive(),
221
+ force: z.boolean().optional(),
222
+ }),
223
+ handler: async (args) => wpRequest(`/pages/${args.id}`, {
224
+ method: "DELETE",
225
+ query: args.force ? { force: "true" } : undefined,
226
+ }),
227
+ },
182
228
  {
183
229
  name: "bricks_list_media",
184
230
  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.5.0",
3
+ "version": "0.6.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": {