Skip to main content
Glama

wpw-elementor-mcp

MCP server for reading and modifying Elementor page data in WordPress. Supports dual-mode operation: DDEV (local via WP-CLI) and REST (remote via bridge plugin).

Features

  • 23 tools: 12 read + 4 write + 4 CRUD + 3 search/efficiency

  • Dual-mode architecture — one codebase, two backends

  • Full Elementor data access: page tree, element settings, CSS, global kit

  • CRUD operations: add, delete, move, clone elements

  • Cross-page search and page export

  • Type-safe TypeScript with Zod schema validation

Related MCP server: elementor-mcp-agent

Quick Start

DDEV Mode (Local)

Requires a DDEV WordPress project with Elementor:

{
  "mcpServers": {
    "elementor": {
      "command": "node",
      "args": ["/path/to/wpw-elementor-mcp/build/index.js"],
      "env": {
        "DDEV_PROJECT_DIR": "/path/to/your-ddev-project"
      }
    }
  }
}

REST Mode (Remote)

Requires the bridge plugin installed on the WordPress site:

  1. Upload wordpress-plugin/elementor-mcp-bridge.php to wp-content/plugins/

  2. Activate the plugin in WordPress admin

  3. Create an Application Password in Users → Your Profile

{
  "mcpServers": {
    "elementor": {
      "command": "node",
      "args": ["/path/to/wpw-elementor-mcp/build/index.js"],
      "env": {
        "ELEMENTOR_SITE_URL": "https://your-site.com",
        "ELEMENTOR_USERNAME": "admin",
        "ELEMENTOR_APP_PASSWORD": "xxxx xxxx xxxx xxxx"
      }
    }
  }
}

Tools Reference

Read Tools (12)

Tool

Description

elementor_list_pages

List all pages with Elementor data

elementor_get_page_tree

Get element hierarchy tree for a page

elementor_get_element

Get element settings (filterable: all/layout/responsive)

elementor_find_elements

Search elements within a page by type/class/text

elementor_list_templates

List Elementor library templates

elementor_get_element_context

Get element with ancestor/sibling layout context

elementor_get_responsive_diff

Desktop vs tablet vs mobile settings diff

elementor_get_layout_debug

Container flex layout debug table

elementor_get_page_css

Read all CSS sources for a page

elementor_get_global_kit

Read global design tokens (colors, fonts, spacing)

elementor_get_compiled_css

Read Elementor-compiled CSS file

elementor_get_element_selector

Get CSS selectors and matching rules

Write Tools (4)

Tool

Description

elementor_update_element

Update element settings (merge semantics)

elementor_update_html_widget

Update HTML widget content safely

elementor_update_page_css

Append/replace WordPress Additional CSS

elementor_clear_cache

Clear Elementor CSS cache

CRUD Tools (4)

Tool

Description

elementor_add_element

Add new container or widget to a page

elementor_delete_element

Delete element and all children

elementor_move_element

Move element to different container/position

elementor_update_global_kit

Update global design tokens

Search & Efficiency Tools (3)

Tool

Description

elementor_search_all_pages

Search elements across ALL pages at once

elementor_clone_element

Deep-clone element (same page or cross-page)

elementor_export_page

Export complete page Elementor data as JSON

Architecture

wpw-elementor-mcp/
├── src/
│   ├── index.ts            # MCP server entry, tool registration (23 tools)
│   ├── elementor.ts         # Service layer (parse/validate backend output)
│   ├── backend.ts           # Backend interface (ElementorBackend)
│   ├── ddev-backend.ts      # DDEV mode: WP-CLI + PHP eval
│   ├── rest-backend.ts      # REST mode: HTTP client calls
│   ├── rest-client.ts       # Axios HTTP client with auth
│   ├── php-templates.ts     # PHP code templates for DDEV mode
│   ├── types.ts             # TypeScript interfaces
│   └── wp-cli.ts            # WP-CLI command runner
├── wordpress-plugin/
│   └── elementor-mcp-bridge.php   # REST API bridge (24 endpoints)
├── build/                   # Compiled JavaScript
├── package.json
└── tsconfig.json

Dual-Mode Design

The server auto-detects the backend mode based on environment variables:

  • REST mode activates when ELEMENTOR_SITE_URL, ELEMENTOR_USERNAME, and ELEMENTOR_APP_PASSWORD are all set

  • DDEV mode is the fallback, using WP-CLI to execute PHP directly

Both modes implement the same ElementorBackend interface, ensuring identical tool behavior regardless of the transport.

WordPress Bridge Plugin

The elementor-mcp-bridge.php file is a single-file WordPress plugin that exposes 24 REST API endpoints under the elementor-mcp/v1 namespace. It:

  • Uses WordPress Application Password authentication

  • Requires edit_posts capability

  • Returns JSON responses matching DDEV mode output format

  • Clears CSS cache after write operations

  • Works on PHP 7.4+ with no external dependencies

Development

# Install dependencies
npm install

# Build TypeScript
npm run build

# Watch mode
npm run watch

# Run tests
npm test

# Start server directly
npm start

License

MIT

Available Tools

23 tools
elementor_add_elementAdd ElementB

Add a new element (container or widget) into a target container. Creates the element with specified settings and inserts at the given position. Returns the new element's auto-generated ID.

Inputs: elType (required), postId (required), containerId (required), position, +2 more.

elementor_clear_cacheClear Elementor CacheA
Idempotent

Clear all Elementor CSS cache files. Run this after making changes if the frontend doesn't reflect updates.

Inputs: no named parameters.

elementor_clone_elementClone ElementA

Deep-clone an element (including all children) with new unique IDs. Can clone within the same page (inserts after original) or to a different page/container. Perfect for duplicating complex layouts.

Inputs: postId (required), elementId (required), targetPostId, targetContainerId.

elementor_delete_elementDelete ElementA
Destructive

Delete an element and all its children from a page. This is destructive and cannot be undone. Returns the parent container ID.

Inputs: postId (required), elementId (required).

elementor_export_pageExport Page DataA
Read-onlyIdempotent

Export a page's complete Elementor data as JSON. Returns the raw elementor_data array, page settings, and element count. Useful for backup, migration, or analysis.

Inputs: postId (required).

elementor_find_elementsSearch ElementsA
Read-onlyIdempotent

Search for elements within a page by widget type, CSS class, element ID, or content text. All filters are combined with AND logic.

Inputs: postId (required), cssClass, elementId, widgetType, +1 more.

elementor_get_compiled_cssGet Compiled CSSB
Read-onlyIdempotent

Read the Elementor-compiled CSS file for a page (post-{id}.css from /uploads/elementor/css/). Optionally filter to only rules matching a specific element ID. Use this to see the actual CSS Elementor generates from element settings.

Inputs: postId (required), elementId.

elementor_get_elementGet Element DetailsB
Read-onlyIdempotent

Get settings data for a specific Elementor element. Use filter to reduce output: 'layout' returns only flex/width/overflow/gap/padding/margin keys, 'responsive' returns only _mobile/_tablet variants, 'all' returns everything.

Inputs: postId (required), elementId (required), filter.

elementor_get_element_contextGet Element Layout ContextA
Read-onlyIdempotent

Get an element with full layout context: its own settings, all ancestor containers' layout settings (flex_direction, width, overflow, gap, margin, padding + mobile variants), and sibling element summaries. Essential for debugging layout and spacing issues.

Inputs: postId (required), elementId (required).

elementor_get_element_selectorGet Element CSS SelectorsA
Read-onlyIdempotent

Get the CSS selectors for an element (.elementor-element-{id} for outer, > .elementor-widget-container for widgets) and find all matching CSS rules from both WordPress Additional CSS and Elementor compiled CSS. Essential for understanding what CSS actually applies to an element.

Inputs: postId (required), elementId (required).

elementor_get_global_kitGet Global Kit SettingsA
Read-onlyIdempotent

Read the Elementor active kit's global settings: system/custom colors, system/custom typography (fonts), container width default, widget spacing, page background color, body typography, and ALL kit settings. Essential for understanding the site's design tokens.

Inputs: no named parameters.

elementor_get_layout_debugDebug Container LayoutA
Read-onlyIdempotent

For a container element, show its flex layout settings and all children's layout properties (width, flex_direction, overflow, margin, padding + mobile variants) in a compact table format. Perfect for debugging flex layout, overflow, and spacing issues.

Inputs: postId (required), containerId (required).

elementor_get_page_cssGet Page CSS SourcesA
Read-onlyIdempotent

Read all CSS sources that affect a page: WordPress Additional CSS (Customizer), Elementor page-level custom CSS, and Elementor global CSS. Returns the full CSS text of each source.

Inputs: postId (required).

elementor_get_page_treeGet Page Element TreeA
Read-onlyIdempotent

Get the element hierarchy tree for a page. Shows element types, IDs, widget types, content labels, and layout info (flex_direction, width, overflow, gap) on container nodes. Essential for understanding page structure.

Inputs: postId (required).

elementor_get_responsive_diffGet Responsive Settings DiffA
Read-onlyIdempotent

Show desktop vs tablet vs mobile settings diff for an element. Groups settings by breakpoint and lists which keys have mobile/tablet overrides. Use this to quickly identify responsive issues.

Inputs: postId (required), elementId (required).

elementor_list_pagesList Elementor PagesA
Read-onlyIdempotent

List all pages/posts that have Elementor data. Returns post ID, title, status, URL, and element count for each page.

Inputs: no named parameters.

elementor_list_templatesList Elementor TemplatesA
Read-onlyIdempotent

List all Elementor library templates (sections, pages, containers saved to template library).

Inputs: no named parameters.

elementor_move_elementMove ElementA

Move an element to a different container or reorder within the same container. The element is removed from its current location and inserted at the specified position in the target container.

Inputs: postId (required), elementId (required), targetContainerId (required), position.

elementor_search_all_pagesSearch All PagesA
Read-onlyIdempotent

Search for elements across ALL Elementor pages at once. Supports the same filters as elementor_find_elements (widget type, CSS class, element ID, content text). Returns results grouped by page.

Inputs: cssClass, elementId, widgetType, contentText.

elementor_update_elementUpdate Element SettingsA

Update specific settings on an Elementor element. Uses merge semantics — only the specified keys are updated, other settings are preserved. Automatically clears the page CSS cache after update.

Inputs: postId (required), settings (required), elementId (required).

elementor_update_global_kitUpdate Global KitA

Update Elementor global design tokens (colors, typography, container width, widget spacing, etc.). Uses merge semantics — only specified keys are updated. Clears Elementor cache after update.

Inputs: settings (required).

elementor_update_html_widgetUpdate HTML WidgetA
Idempotent

Update an HTML widget's content. Safely handles HTML containing tags, quotes, and special characters via base64 encoding. Optionally update custom CSS too.

Inputs: postId (required), elementId (required), htmlContent (required), customCss.

elementor_update_page_cssUpdate WordPress Additional CSSA

Write to WordPress Additional CSS (Customizer). Use 'append' mode to add new rules after existing CSS, or 'replace' mode to overwrite all CSS. Automatically clears Elementor cache after update.

Inputs: css (required), mode.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 23 tools

    Disambiguation4/5

    Each tool has a stated distinct purpose, but the read/diagnostic cluster (get_element, get_element_context, get_layout_debug, get_responsive_diff, get_element_selector, get_compiled_css, get_page_css) overlaps heavily in practice — several return portions of the same layout/CSS data, so an agent may hesitate between them. Descriptions do provide enough differentiation (context vs. diff vs. compact table vs. selector-specific CSS) to keep it mostly workable.

    Naming Consistency5/5

    Every tool uses the same namespace prefix plus a consistent snake_case verb_noun pattern (list_, get_, find_, search_, add_, update_, delete_, move_, clone_, export_, clear_). No mixing of camelCase or inconsistent verb styles.

    Tool Count3/5

    23 tools is on the heavy side for the domain, and a large share are read-only diagnostics that could be consolidated (e.g. get_element with filters subsumes much of get_layout_debug / get_element_context). Each tool has a rationale, but the surface feels broader than necessary.

    Completeness3/5

    Element lifecycle is well covered (add, update, move, clone, delete, export, search), but there are notable gaps: export_page has no matching import, template tools are read-only (list_templates only, no get/apply/insert), there is no page creation or page-settings/status update, and no widget-type/schema discovery tool to learn valid settings before calling add_element/update_element.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • -
      license
      Not graded
      quality
      Not graded
      maintenance
      Enables comprehensive WordPress and Elementor management through 60 powerful tools with modular configuration modes. Supports content creation, page building, element manipulation, file operations, and template management with enterprise-grade security and debugging capabilities.
      -
    • A
      license
      A
      quality
      C
      maintenance
      Agency-grade MCP server for WordPress Elementor — multi-site management for 120+ WordPress sites with safe edits (backup + auto-rollback + post-write verification), template export/import, global widget detection, CSS flush, WP-CLI escape hatch, and headless Chrome screenshots. 34 tools across pages, widgets, templates, bulk find/replace, and fleet operations.
      34
      80 npm
      3
      MIT