bricks-mcp-server
v0.8.0
Published
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.).
Maintainers
Readme
bricks-mcp-server
Provider-agnostic MCP server that exposes Bricks Builder data — pages, templates, global classes and theme styles — as tools for any MCP-compatible AI client (Claude Code, Codex CLI, etc.).
It talks to a companion WordPress plugin (Bricks MCP Bridge) over the REST API, authenticated with a WordPress Application Password. No AI API key ever lives in WordPress; all model calls happen in your client.
Quick start
No clone or build needed — npx runs it on demand. The fastest path is the guided wizard:
npx -y bricks-mcp-server setupIt asks for your site URL, opens the Application Password authorization flow, tests the connection, and writes your client config.
Manual registration (Claude Code)
claude mcp add bricks -s user \
-e WP_URL=https://yoursite.tld \
-e WP_USER=your-wp-username \
-e WP_APP_PASSWORD="xxxx xxxx xxxx xxxx xxxx xxxx" \
-- npx -y bricks-mcp-serverOr in ~/.claude.json under mcpServers:
{
"mcpServers": {
"bricks": {
"command": "npx",
"args": ["-y", "bricks-mcp-server"],
"env": {
"WP_URL": "https://yoursite.tld",
"WP_USER": "your-wp-username",
"WP_APP_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx"
}
}
}
}Requirements
- Node.js ≥ 18
- A WordPress site running Bricks Builder with the Bricks MCP Bridge plugin installed and active.
- A WordPress Application Password for a user with the
edit_pagescapability.
Commands
| Command | Purpose |
|---|---|
| npx -y bricks-mcp-server | Run the MCP stdio server (what your client invokes). |
| npx -y bricks-mcp-server setup | Interactive setup wizard. |
| npx -y bricks-mcp-server doctor | Diagnose connection problems with specific fixes. |
Diagnostics
If the connection fails, doctor pinpoints the exact cause — unreachable site, stripped Authorization header, bad credentials, missing capability, or plugin not installed:
WP_URL=https://yoursite.tld WP_USER=you WP_APP_PASSWORD="…" npx -y bricks-mcp-server doctorTools
bricks_ping, bricks_list_pages, bricks_get_page, bricks_update_page, bricks_create_page, bricks_list_templates, bricks_create_template, bricks_get_global_classes, bricks_update_global_classes, bricks_get_theme_styles, bricks_list_media, bricks_reindex_query_filters.
Highlights (server ≥0.5.0, plugin ≥0.7.0):
- Optimistic locking —
bricks_get_pagereturnsmodified; pass it asexpected_modifiedonbricks_update_pageto get a 409 instead of overwriting edits made in the builder since you read the page. bricks_create_page— create pages/posts/CPT entries (draft by default), optionally with Bricks content.bricks_pingechoes the effectiveWP_URL/user and warns when the configured host doesn't match the site that answered (stale config, redirect, proxy).
License
GPL-2.0-or-later
