Expose WordPress + Elementor as an MCP server so AI coding agents can read Figma designs and generate Elementor pages through MCP tools.
WP MCP Plugin bridges WordPress/Elementor and AI coding agents via the Model Context Protocol. It registers Elementor pages, widgets, templates, and settings as MCP tools that an MCP client (Claude Desktop, OpenCode, Cursor, etc.) can call to inspect, build, and modify Elementor pages programmatically — including turning a Figma design into a fully structured Elementor page.
- MCP server exposed at
/wp-json/wp-mcp/mcp, authenticated via an API key. - Read tools — list/inspect pages, Elementor widgets, templates, and global design settings.
- Write tools — create/update/delete pages, add containers and widgets, batch-update elements, manage global settings.
- Schema validation — every widget/element is validated against the live Elementor widget schema.
- Render tool — generate a time-limited, authenticated preview URL for headless-browser screenshotting (Figma → Elementor visual comparison workflows).
- Drop-in — no Composer, no build step. The
vendor/directory ships in the plugin zip. - Bundled MCP Adapter —
wordpress/mcp-adapteris vendored; if a compatible standalone adapter is already active, the newer version wins automatically.
| Requirement | Version |
|---|---|
| WordPress | 6.9+ |
| PHP | 8.0+ |
| Elementor | Free or Pro |
The plugin gracefully detects a missing Elementor install and shows an admin notice instead of fatal-erroring.
- Install and activate Elementor.
- Download
wp-mcp-plugin-0.1.0.zipfrom the latest release. - WordPress Admin → Plugins → Add New → Upload Plugin → choose the zip → Install Now.
- Activate the plugin.
- Go to Settings → WP MCP, generate/copy your API key, and ensure the MCP server is enabled.
Clone this repo into wp-content/plugins/ (the vendor/ directory is committed, so no Composer is required). Activate from the WordPress admin.
The MCP endpoint is:
POST /wp-json/wp-mcp/mcp
Header: X-WP-MCP-Key: <your-api-key>
For OpenCode, add it as a remote MCP server in opencode.jsonc:
For Claude Desktop / other MCP clients, follow the client's remote-server configuration using the same URL and header.
wp-mcp/list-pages— list WordPress pages with Elementor status.wp-mcp/get-page— get a page with its full Elementor data tree.wp-mcp/list-elementor-widgets— list registered widget types.wp-mcp/get-elementor-widget-schema— full JSON schema for a widget type.wp-mcp/list-elementor-templates— list saved Elementor templates.wp-mcp/get-elementor-global-settings— active kit colors and typography.wp-mcp/get-plugin-status— adapter version, Elementor status, API-key state.
wp-mcp/create-page— create a new page (optionally with initial Elementor data).wp-mcp/update-page-elementor-data— replace a page's entire Elementor content.wp-mcp/delete-page— trash or permanently delete a page.wp-mcp/add-container— add a flex/grid container to a page.wp-mcp/add-widget— add a widget into a container.wp-mcp/update-element— update settings on a single element.wp-mcp/remove-element— remove an element and its children.wp-mcp/batch-update— update multiple elements in one save.wp-mcp/update-elementor-global-settings— update kit colors/typography.
wp-mcp/render-page— generate an authenticated, time-limited preview URL for headless-browser screenshotting.
All mutating tools require manage_options capability. The API key gates the transport; it does not authenticate as a WordPress user.
This plugin is designed to pair with a Figma MCP server. The typical loop:
- MCP client reads a Figma design via the Figma MCP.
- MCP client calls
wp-mcp/create-pageandwp-mcp/add-container/wp-mcp/add-widgetto build the Elementor page. wp-mcp/render-pageproduces a preview URL.- A headless browser (Playwright/Puppeteer) screenshots the preview.
- The screenshot is compared against the Figma design; differences are fixed with further
wp-mcp/update-element/wp-mcp/batch-updatecalls.
The plugin ships in-app documentation (container nesting limits, the full-bleed pattern, widget schemas) accessible to the MCP client as prompts.
This repository is the plugin itself. It is developed inside a Local-by-Flywheel WordPress harness; the harness is not part of the shipped artifact.
- PHP 8.0+ target (developed against 8.4).
- Composer is a dev convenience only —
vendor/is committed for the drop-in release. - WordPress coding standards: tabs, Yoda conditions,
esc_*output, nonces + capability checks.
To refresh dependencies (dev only):
composer install # with dev stubs for intelephense
composer install --no-dev --classmap-authoritative # production vendor treeGPL-2.0-or-later. See License URI.
{ "mcp": { "wp-mcp": { "type": "remote", "url": "http://your-site.test/wp-json/wp-mcp/mcp", "headers": { "X-WP-MCP-Key": "<your-api-key>" } } } }