### Example Composite Tool Input
Source: https://emcp.msrbuilds.com/docs/tools/composite
An example JSON structure demonstrating how to define a page with global colors, a main container with a heading and text editor, and a row container for multiple columns.
```json
{
"post_id": 42,
"globals": {
"colors": [
{ "_id": "primary", "title": "Primary", "color": "#2C1810" },
{ "_id": "secondary", "title": "Secondary", "color": "#D4A574" }
]
},
"elements": [
{
"type": "container",
"settings": { "padding": { "size": 80, "unit": "px" } },
"children": [
{ "type": "widget", "widget_type": "heading", "settings": { "title": "Welcome", "header_size": "h1" } },
{ "type": "widget", "widget_type": "text-editor", "settings": { "editor": "
Lead paragraph...
" } }
]
},
{
"type": "container",
"settings": { "flex_direction": "row", "gap": { "size": 24 } },
"children": [
{ "type": "container", "children": [ /* column 1 */ ] },
{ "type": "container", "children": [ /* column 2 */ ] },
{ "type": "container", "children": [ /* column 3 */ ] }
]
}
]
}
```
--------------------------------
### Example Authorization Header
Source: https://emcp.msrbuilds.com/docs/troubleshooting/auth-errors
This is an example of a correctly formatted Authorization header using Basic authentication with a base64 encoded username and password. Ensure there are no extra quotes around the base64 value.
```http
Authorization: Basic YWRtaW46eHh4eCB4eHh4IHh4eHggeHh4eCB4eHh4IHh4eHg=
```
--------------------------------
### Page Building Workflow Examples
Source: https://emcp.msrbuilds.com/docs/tools/page-management
Illustrates common workflows for building pages from scratch or applying templates. It also advises preferring update functions over import for existing pages.
```text
create-page → get a fresh post_id
build-page (composite) → emit the full structure in one call
```
```text
list-templates → find the template ID
create-page → fresh post_id
apply-template → copy template into the new page
```
--------------------------------
### Section List Example
Source: https://emcp.msrbuilds.com/docs/prompts/writing-your-own
Explicitly list and number each section required for the page, detailing its layout and content. This ensures the AI builds the page as intended.
```plaintext
### Section 1 — Hero
- Full-width container, background = primary color
- Heading (h1, large, white) on the left
- Subhead (white, 18px) below
- Two CTAs side-by-side: "Order online" (primary) + "View menu" (secondary)
- Image of fresh pastries on the right (search Openverse)
```
--------------------------------
### Verify WP-CLI MCP Adapter Installation
Source: https://emcp.msrbuilds.com/docs/connecting/claude-code
Verify that the WordPress MCP Adapter plugin's WP-CLI bridge is installed and accessible. This command checks for registered servers.
```bash
wp mcp-adapter list --path=/absolute/path/to/wordpress
```
--------------------------------
### Element-level CSS Tweak Example
Source: https://emcp.msrbuilds.com/docs/tools/custom-code
Demonstrates using the 'selector' keyword within custom CSS to target a specific element and its children for styling.
```css
selector .some-child {
background: red;
}
```
--------------------------------
### Atomic Element Data Structure Example
Source: https://emcp.msrbuilds.com/docs/tools/atomic-elements
Illustrates the data shape of atomic elements when retrieved via `get-page-structure`. Shows how content and style props are wrapped with `$$type`.
```json
{
"id": "abc1234",
"elType": "widget",
"widgetType": "e-heading",
"settings": {
"tag": { "$$type": "string", "value": "h2" },
"title": { "$$type": "string", "value": "Welcome" }
},
"styles": {
"abc1234-style-0": {
"variants": [
{
"props": {
"font-size": { "$$type": "string", "value": "32px" },
"color": { "$$type": "string", "value": "#111111" }
}
}
]
}
}
}
```
--------------------------------
### Color Palette Example
Source: https://emcp.msrbuilds.com/docs/prompts/writing-your-own
Define your color palette using hex values and descriptive names. This helps the AI select the appropriate color for different elements.
```plaintext
### Color Palette
- Primary: #2C1810 (rich espresso brown)
- Secondary: #D4A574 (warm caramel)
- Text: #6B5A4E (warm taupe body text)
- Accent: #B8895A (darker caramel for hover)
- Background: #FDF6EE (cream)
- Card background: #FFFFFF
```
--------------------------------
### WP-CLI on Windows with Explicit Paths
Source: https://emcp.msrbuilds.com/docs/connecting/wp-cli
On Windows, WP-CLI often requires explicit paths to PHP and the WP-CLI phar. Adjust the paths to match your specific installation.
```bash
"C:\laragon\bin\php\php-8.4.15-nts-Win32-vs17-x64\php.exe" "C:\wp-cli\wp-cli.phar"
```
--------------------------------
### WP-CLI Configuration for Local WordPress
Source: https://emcp.msrbuilds.com/docs/connecting/claude-desktop
Use this JSON configuration in `claude_desktop_config.json` when connecting to a local WordPress site via WP-CLI. Ensure WP-CLI is installed and accessible in your system's PATH.
```json
{
"mcpServers": {
"elementor-mcp": {
"command": "wp",
"args": [
"mcp-adapter",
"serve",
"--server=elementor-mcp-server",
"--user=admin",
"--path=/absolute/path/to/wordpress"
]
}
}
}
```
--------------------------------
### Get Container Schema
Source: https://emcp.msrbuilds.com/docs/tools/layout
Returns the JSON Schema for container settings.
```APIDOC
## `elementor-mcp/get-container-schema`
### Description
Returns the JSON Schema for container settings. Use this before constructing complex layout settings to know which keys are valid.
### Method
Not specified (assumed internal tool call)
### Returns
#### Success Response
- **schema** (object) - The JSON Schema for container settings.
```
--------------------------------
### Verify WP-CLI Bridge Availability
Source: https://emcp.msrbuilds.com/docs/connecting/wp-cli
Run this command to check if the WP-CLI bridge is accessible and list available MCP servers. Ensure WP-CLI is installed and the WordPress MCP Adapter plugin is active.
```bash
wp mcp-adapter list --path=/path/to/wordpress
```
--------------------------------
### Test REST Endpoint with Curl
Source: https://emcp.msrbuilds.com/docs/getting-started/requirements
Use this `curl` command to test the MCP Adapter's REST endpoint for initialization. It verifies plugin activation and adapter installation. Ensure your username, application password, and site URL are correctly configured.
```bash
curl -X POST https://your-site.test/wp-json/mcp/elementor-mcp-server \
-H "Content-Type: application/json" \
-u "username:application-password" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'
```
--------------------------------
### Get Page Structure
Source: https://emcp.msrbuilds.com/docs/tools/query-discovery
Retrieves the complete element tree of an Elementor-enabled page, including containers, widgets, and their nesting. This serves as the starting point for editing page content.
```javascript
elementor-mcp/get-page-structure
```
--------------------------------
### Hook into Freemius SDK Initialization
Source: https://emcp.msrbuilds.com/docs/advanced/filters-and-hooks
The `emcp_pro_fs_loaded` action fires after the Freemius SDK initializes. Use this to safely call `emcp_pro_fs()` from plugins that load before EMCP Tools.
```php
add_action( 'emcp_pro_fs_loaded', function () {
if ( emcp_pro_fs()->can_use_premium_code() ) {
// Pro is active on this site.
}
} );
```
--------------------------------
### WP-CLI Configuration with Full Paths on Windows
Source: https://emcp.msrbuilds.com/docs/connecting/claude-desktop
On Windows, especially with environments like Laragon, specify the full paths to `php.exe` and `wp-cli.phar` in the configuration. This ensures Claude Desktop can locate and execute WP-CLI correctly.
```json
{
"mcpServers": {
"elementor-mcp": {
"command": "C:\\laragon\\bin\\php\\php-8.4.15-nts-Win32-vs17-x64\\php.exe",
"args": [
"C:\\wp-cli\\wp-cli.phar",
"mcp-adapter",
"serve",
"--server=elementor-mcp-server",
"--user=admin",
"--path=C:\\laragon\\www\\your-site"
]
}
}
}
```
--------------------------------
### Add Counter Widget Shortcut
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a counter widget. Set the starting and ending numbers, and an optional title.
```javascript
await elementor_mcp.add_counter({
post_id: 1,
parent_id: 10,
starting_number: 0,
ending_number: 100,
title: "Completion Rate"
});
```
--------------------------------
### List MCP Tools with Session ID
Source: https://emcp.msrbuilds.com/docs/troubleshooting/session-errors
After initializing a session, use this command to list available tools, ensuring the Mcp-Session-Id header is included in the request.
```bash
# 2. List tools — include the session header
curl -X POST https://your-site.test/wp-json/mcp/elementor-mcp-server \
-H "Content-Type: application/json" \
-H "Mcp-Session-Id: " \
-u "admin:xxxx xxxx xxxx xxxx xxxx xxxx" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
```
--------------------------------
### List Tools via REST Endpoint
Source: https://emcp.msrbuilds.com/docs/troubleshooting/no-tools-appearing
After a successful initialization, use this curl command to list available tools. You must include the 'Mcp-Session-Id' obtained from the initialize response. Replace '' with the actual session ID.
```bash
curl -X POST https://your-site.test/wp-json/mcp/elementor-mcp-server \
-H "Content-Type: application/json" \
-H "Mcp-Session-Id: " \
-u "username:application-password" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'
```
--------------------------------
### Get Element Settings
Source: https://emcp.msrbuilds.com/docs/tools/query-discovery
Fetches the current settings for a specific element on a page, identified by its ID. This allows inspection of individual element configurations.
```javascript
elementor-mcp/get-element-settings
```
--------------------------------
### Configure stdio MCP Server via WP-CLI
Source: https://emcp.msrbuilds.com/docs/connecting/claude-code
This configuration is recommended for local development when WP-CLI is available. It offers faster performance without HTTP round-trips or authentication.
```json
{
"mcpServers": {
"elementor-mcp": {
"type": "stdio",
"command": "wp",
"args": [
"mcp-adapter",
"serve",
"--server=elementor-mcp-server",
"--user=admin",
"--path=/absolute/path/to/wordpress"
]
}
}
}
```
--------------------------------
### Initialize MCP Session with Curl
Source: https://emcp.msrbuilds.com/docs/troubleshooting/session-errors
Use this command to initialize an MCP session and capture the response headers, including the crucial Mcp-Session-Id.
```bash
# 1. Initialize — capture the response with -i (show headers)
curl -i -X POST https://your-site.test/wp-json/mcp/elementor-mcp-server \
-H "Content-Type: application/json" \
-u "admin:xxxx xxxx xxxx xxxx xxxx xxxx" \
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}'
```
--------------------------------
### Get Widget Schema
Source: https://emcp.msrbuilds.com/docs/tools/query-discovery
Fetches the JSON Schema for a specific widget's settings. This is used to validate settings before calling the 'add-widget' function.
```javascript
elementor-mcp/get-widget-schema
```
--------------------------------
### Free widget shortcuts
Source: https://emcp.msrbuilds.com/docs/tools/widgets
Provides simplified wrappers for common Elementor widgets, requiring only key parameters.
```APIDOC
## Free Widget Shortcuts
### Description
These are thin wrappers around `add-widget` with a simplified input shape, exposing only the most-used settings as top-level parameters.
### Available Shortcuts:
- **`add-heading`**: Wraps the 'heading' widget. Key params: `text`, `tag`, `size`, `align`.
- **`add-text-editor`**: Wraps the 'text-editor' widget. Key params: `content` (HTML).
- **`add-image`**: Wraps the 'image' widget. Key params: `image_id` or `image_url`, `alt`, `link`.
- **`add-button`**: Wraps the 'button' widget. Key params: `text`, `link`, `size`, `align`.
- **`add-video`**: Wraps the 'video' widget. Key params: `video_url`, `video_type`.
- **`add-icon`**: Wraps the 'icon' widget. Key params: `icon`, `size`, `color`.
- **`add-spacer`**: Wraps the 'spacer' widget. Key params: `space` (px).
- **`add-divider`**: Wraps the 'divider' widget. Key params: `style`, `color`, `width`.
- **`add-icon-box`**: Wraps the 'icon-box' widget. Key params: `icon`, `title`, `description`, `link`.
- **`add-accordion`**: Wraps the 'accordion' widget. Key params: `items` (array).
- **`add-alert`**: Wraps the 'alert' widget. Key params: `type`, `title`, `description`.
- **`add-counter`**: Wraps the 'counter' widget. Key params: `starting_number`, `ending_number`, `title`.
- **`add-google-maps`**: Wraps the 'google_maps' widget. Key params: `address`, `zoom`.
- **`add-icon-list`**: Wraps the 'icon-list' widget. Key params: `items` (array).
- **`add-image-box`**: Wraps the 'image-box' widget. Key params: `image`, `title`, `description`.
- **`add-image-carousel`**: Wraps the 'image-carousel' widget. Key params: `images` (array).
- **`add-progress`**: Wraps the 'progress' widget. Key params: `title`, `percent`.
- **`add-social-icons`**: Wraps the 'social-icons' widget. Key params: `icons` (array).
- **`add-star-rating`**: Wraps the 'star-rating' widget. Key params: `rating`, `title`.
- **`add-tabs`**: Wraps the 'tabs' widget. Key params: `tabs` (array).
- **`add-testimonial`**: Wraps the 'testimonial' widget. Key params: `content`, `name`, `job`, `image`.
- **`add-toggle`**: Wraps the 'toggle' widget. Key params: `items` (array).
- **`add-html`**: Wraps the 'html' widget. Key params: `html` (string).
- **`add-menu-anchor`**: Wraps the 'menu-anchor' widget. Key params: `anchor` (string).
- **`add-shortcode`**: Wraps the 'shortcode' widget. Key params: `shortcode` (string).
- **`add-rating`**: Wraps the 'rating' widget. Key params: `rating`, `max`, `icon`.
- **`add-text-path`**: Wraps the 'text-path' widget. Key params: `text`, `path`.
### Usage
Each shortcut is invoked directly, e.g., `add-heading(text='Hello', tag='h1')`.
```
--------------------------------
### Test WP-CLI Stdio Server Manually
Source: https://emcp.msrbuilds.com/docs/connecting/wp-cli
Manually test the stdio server by sending an initialize JSONRPC request. Ensure the specified WordPress user exists and has the 'edit_posts' capability, and that the path points to the WordPress root directory.
```bash
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"test","version":"1.0"}}}' | \
wp mcp-adapter serve --server=elementor-mcp-server --user=admin --path=/path/to/wordpress
```
--------------------------------
### Check Application Password Availability
Source: https://emcp.msrbuilds.com/docs/troubleshooting/auth-errors
Programmatically check if application passwords are enabled on the WordPress installation. This is useful for diagnosing issues where security plugins might disable this feature.
```php
var_dump( wp_is_application_passwords_available() )
```
--------------------------------
### Use WP-CLI Bridge with MCP Inspector
Source: https://emcp.msrbuilds.com/docs/connecting/wp-cli
Launch MCP Inspector to interactively test and learn about MCP tools. Inspector opens in a browser and allows calling tools with JSON arguments.
```bash
npx @modelcontextprotocol/inspector \
wp mcp-adapter serve --server=elementor-mcp-server --user=admin --path=/path/to/wordpress
```
--------------------------------
### Add Atomic Video Widget
Source: https://emcp.msrbuilds.com/docs/tools/atomic-elements
Adds an atomic self-hosted video widget (`e-self-hosted-video`) using a video URL.
```APIDOC
## `elementor-mcp/add-atomic-video`
### Description
Adds an atomic self-hosted video widget (`e-self-hosted-video`).
### Input Parameters
- **post_id** (string) - The ID of the post.
- **parent_id** (string) - The ID of the parent element.
- **position** (number) - The position to add the element.
- **css_id** (string) - CSS ID for the element.
- **video_url** (string) - The URL of the video.
```
--------------------------------
### Node.js HTTP Proxy Configuration via npx
Source: https://emcp.msrbuilds.com/docs/connecting/claude-desktop
Configure Claude Desktop to use the Node.js HTTP proxy for remote WordPress sites using the `npx` runner. This method downloads and runs the proxy on demand, requiring Node.js 18+ on the client machine.
```json
{
"mcpServers": {
"elementor-mcp": {
"command": "npx",
"args": ["-y", "@msrbuilds/emcp-proxy@latest"],
"env": {
"WP_URL": "https://your-site.com",
"WP_USERNAME": "admin",
"WP_APP_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx",
"MCP_PROTOCOL_VERSION": "2024-11-05"
}
}
}
}
```
--------------------------------
### elementor-mcp/get-page-structure
Source: https://emcp.msrbuilds.com/docs/tools/query-discovery
Returns the full element tree for an Elementor-enabled page — containers, widgets, nesting, IDs. The starting point for any “edit this page” workflow.
```APIDOC
## elementor-mcp/get-page-structure
### Description
Returns the full element tree for an Elementor-enabled page — containers, widgets, nesting, IDs. The starting point for any “edit this page” workflow.
### Input
`post_id`.
### Returns
tree of `{ id, elType, widgetType?, settings, elements: [...] }`.
```
--------------------------------
### Add Site-Wide Custom Code Snippet
Source: https://emcp.msrbuilds.com/docs/tools/custom-code
Creates a site-wide custom code snippet that can be injected into the head, body start, or body end of every page on the site.
```php
add_action( 'elementor/editor/before_enqueue_scripts', function() {
// Example: Add a Google Analytics script to the head
$script_code = "
";
// Call the tool to add the code snippet to the head
// Replace 'your_post_id' with actual value
// elementor_mcp_add_code_snippet( your_post_id, 'Google Analytics', $script_code, 'head', 10, 'publish' );
} );
```
--------------------------------
### Typical AI Editing Flow
Source: https://emcp.msrbuilds.com/docs/tools/query-discovery
Illustrates a common workflow for AI-driven page editing, emphasizing a read-before-write pattern to preserve existing content. This sequence ensures reliable modifications by understanding the page structure first.
```bash
1. list-pages → find the target page
2. get-page-structure → understand existing layout
3. get-element-settings → inspect a specific element you want to modify
4. update-widget → apply changes
```
--------------------------------
### Prompt Opening for Global Styles
Source: https://emcp.msrbuilds.com/docs/prompts/writing-your-own
Instruct the AI to set global colors and typography first using the design system before building the page layout. This enables automatic updates across the entire page.
```plaintext
First, set the global colors and typography using the design system below. Then create a new draft page titled “Golden Crumb Bakery” and build the layout into it using build-page.
```
--------------------------------
### Serve WP-CLI MCP Adapter with Error Redirection
Source: https://emcp.msrbuilds.com/docs/troubleshooting/session-errors
Run the `wp mcp-adapter serve` command and redirect stderr to stdout to capture potential error messages that indicate why the bridge might be hanging.
```bash
wp mcp-adapter serve --server=elementor-mcp-server --user=admin --path=/path/to/wordpress 2>&1
```
--------------------------------
### Get Global Kit Settings
Source: https://emcp.msrbuilds.com/docs/tools/query-discovery
Fetches the active Elementor kit's global settings, such as color palettes, typography presets, and spacing. This provides access to the site's overall design system.
```javascript
elementor-mcp/get-global-settings
```
--------------------------------
### Add Video Widget Shortcut
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a video widget. Provide the video URL and type.
```javascript
await elementor_mcp.add_video({
post_id: 1,
parent_id: 10,
video_url: "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
video_type: "youtube"
});
```
--------------------------------
### Test API Credentials with curl
Source: https://emcp.msrbuilds.com/docs/troubleshooting/auth-errors
Use curl to test your API credentials directly against the WordPress REST API endpoint. This helps isolate whether the issue is with your credentials or the API setup. A 200 response indicates successful authentication.
```bash
curl -i https://your-site.test/wp-json/wp/v2/users/me \
-u "admin:xxxx xxxx xxxx xxxx xxxx xxxx"
```
--------------------------------
### Add Testimonial Widget Shortcut
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a testimonial widget. Include content, name, job title, and an optional image.
```javascript
await elementor_mcp.add_testimonial({
post_id: 1,
parent_id: 10,
content: "Great product!",
name: "John Doe",
job: "CEO",
image: { id: 8 }
});
```
--------------------------------
### Pro widget shortcuts
Source: https://emcp.msrbuilds.com/docs/tools/widgets
Provides simplified wrappers for common Elementor Pro widgets, requiring only key parameters. These are disabled by default.
```APIDOC
## Pro Widget Shortcuts
### Description
These are thin wrappers around `add-widget` for Elementor Pro widgets, with a simplified input shape. They are disabled by default on fresh installs.
### Available Shortcuts:
- **`add-form`**: Wraps the 'form' widget.
- **`add-posts-grid`**: Wraps the 'posts' widget.
- **`add-countdown`**: Wraps the 'countdown' widget.
- **`add-price-table`**: Wraps the 'price-table' widget.
- **`add-flip-box`**: Wraps the 'flip-box' widget.
- **`add-animated-headline`**: Wraps the 'animated-headline' widget.
- **`add-call-to-action`**: Wraps the 'call-to-action' widget.
- **`add-slides`**: Wraps the 'slides' widget.
- **`add-testimonial-carousel`**: Wraps the 'testimonial-carousel' widget.
- **`add-price-list`**: Wraps the 'price-list' widget.
- **`add-gallery`**: Wraps the 'gallery' widget.
- **`add-share-buttons`**: Wraps the 'share-buttons' widget.
- **`add-table-of-contents`**: Wraps the 'table-of-contents' widget.
- **`add-blockquote`**: Wraps the 'blockquote' widget.
- **`add-lottie`**: Wraps the 'lottie' widget.
- **`add-hotspot`**: Wraps the 'hotspot' widget.
- **`add-nav-menu`**: Wraps the 'nav-menu' widget.
- **`add-loop-grid`**: Wraps the 'loop-grid' widget.
- **`add-loop-carousel`**: Wraps the 'loop-carousel' widget.
- **`add-media-carousel`**: Wraps the 'media-carousel' widget.
- **`add-nested-tabs`**: Wraps the 'nested-tabs' widget.
- **`add-nested-accordion`**: Wraps the 'nested-accordion' widget.
- **`add-portfolio`**: Wraps the 'portfolio' widget.
- **`add-author-box`**: Wraps the 'author-box' widget.
- **`add-login`**: Wraps the 'login' widget.
- **`add-code-highlight`**: Wraps the 'code-highlight' widget.
- **`add-reviews`**: Wraps the 'reviews' widget.
- **`add-off-canvas`**: Wraps the 'off-canvas' widget.
- **`add-progress-tracker`**: Wraps the 'scroll-progress' widget.
- **`add-search`**: Wraps the 'search' widget.
### Note
Pro widget shortcuts are disabled by default. Re-enable them from **EMCP Tools → Tools**.
```
--------------------------------
### Force Load WP-CLI MCP Adapter
Source: https://emcp.msrbuilds.com/docs/troubleshooting/session-errors
If the MCP Adapter command is not found, use these commands to force load the WP-CLI integration and test the 'mcp-adapter list' command.
```bash
wp eval 'do_action( "cli_init" );' --path=/path/to/wordpress
wp mcp-adapter list --path=/path/to/wordpress
```
--------------------------------
### Add Price List Widget Shortcut (Pro)
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a price list widget (requires Elementor Pro).
```javascript
await elementor_mcp.add_price_list({
post_id: 1,
parent_id: 10,
items: [
{ title: "Item 1", price: "$5" },
{ title: "Item 2", price: "$10" }
]
});
```
--------------------------------
### Add Portfolio Widget Shortcut (Pro)
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a portfolio widget (requires Elementor Pro).
```javascript
await elementor_mcp.add_portfolio({
post_id: 1,
parent_id: 10
});
```
--------------------------------
### WooCommerce widget shortcuts
Source: https://emcp.msrbuilds.com/docs/tools/widgets
Provides simplified wrappers for common WooCommerce widgets when WC and Elementor Pro are active.
```APIDOC
## WooCommerce Widget Shortcuts
### Description
These are simplified wrappers for WooCommerce widgets, available when both WooCommerce and Elementor Pro are active.
### Available Shortcuts:
- **`add-wc-products`**: Wraps the 'products grid' widget.
- **`add-wc-add-to-cart`**: Wraps the 'add-to-cart button' widget.
- **`add-wc-cart`**: Wraps the 'cart page' widget.
- **`add-wc-checkout`**: Wraps the 'checkout page' widget.
- **`add-wc-menu-cart`**: Wraps the 'menu cart icon' widget.
### Note
Requires WooCommerce and Elementor Pro to be active.
```
--------------------------------
### Add Progress Widget Shortcut
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a progress bar widget. Set the title and percentage.
```javascript
await elementor_mcp.add_progress({
post_id: 1,
parent_id: 10,
title: "Task Progress",
percent: 75
});
```
--------------------------------
### MCP Client-Server Interaction Flow
Source: https://emcp.msrbuilds.com/docs/advanced/mcp-protocol
Illustrates the communication flow between a user, an AI client, an MCP server (EMCP Tools), and the underlying systems like Elementor and WordPress.
```text
You → AI client → MCP server (EMCP Tools) → Elementor → WordPress
↑ ↓
AI decides Server returns
which tools JSON results
to call
```
--------------------------------
### Add Shortcode Widget Shortcut
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a shortcode widget. Provide the shortcode string.
```javascript
await elementor_mcp.add_shortcode({
post_id: 1,
parent_id: 10,
shortcode: "[my_shortcode id='123']"
});
```
--------------------------------
### Add Icon Box Widget Shortcut
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding an icon box widget. Includes icon, title, description, and an optional link.
```javascript
await elementor_mcp.add_icon_box({
post_id: 1,
parent_id: 10,
icon: "fas fa-info-circle",
title: "Information",
description: "Details about the feature.",
link: "https://example.com"
});
```
--------------------------------
### Add Gallery Widget Shortcut (Pro)
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a gallery widget (requires Elementor Pro).
```javascript
await elementor_mcp.add_gallery({
post_id: 1,
parent_id: 10,
images: [
{ id: 9 },
{ id: 10 }
]
});
```
--------------------------------
### Add Image Box Widget Shortcut
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding an image box widget. Include image details, title, and description.
```javascript
await elementor_mcp.add_image_box({
post_id: 1,
parent_id: 10,
image: { id: 5 },
title: "Product Image",
description: "A detailed description of the product."
});
```
--------------------------------
### Configure HTTP MCP Server
Source: https://emcp.msrbuilds.com/docs/connecting/claude-code
Use this configuration for remote or shared development sites. Replace placeholders with your site URL and base64 encoded credentials.
```json
{
"mcpServers": {
"elementor-mcp": {
"type": "http",
"url": "https://your-site.test/wp-json/mcp/elementor-mcp-server",
"headers": {
"Authorization": "Basic BASE64_ENCODED_CREDENTIALS"
}
}
}
}
```
--------------------------------
### Add Reviews Widget Shortcut (Pro)
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a reviews widget (requires Elementor Pro).
```javascript
await elementor_mcp.add_reviews({
post_id: 1,
parent_id: 10
});
```
--------------------------------
### Add Menu Anchor Widget Shortcut
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a menu anchor widget. Specify the anchor string.
```javascript
await elementor_mcp.add_menu_anchor({
post_id: 1,
parent_id: 10,
anchor: "section-id"
});
```
--------------------------------
### Add Login Widget Shortcut (Pro)
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a login widget (requires Elementor Pro).
```javascript
await elementor_mcp.add_login({
post_id: 1,
parent_id: 10
});
```
--------------------------------
### Add Text Path Widget Shortcut
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a text path widget. Provide the text and path data.
```javascript
await elementor_mcp.add_text_path({
post_id: 1,
parent_id: 10,
text: "Curved Text",
path: "M 0,0 C 10,20 40,20 50,0"
});
```
--------------------------------
### Add Price Table Widget Shortcut (Pro)
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a price table widget (requires Elementor Pro).
```javascript
await elementor_mcp.add_price_table({
post_id: 1,
parent_id: 10,
title: "Basic Plan",
price: "$10/month"
});
```
--------------------------------
### Register Custom Uninstall Callback
Source: https://emcp.msrbuilds.com/docs/advanced/filters-and-hooks
EMCP Tools uses the Freemius `after_uninstall` hook for cleanup. You can add your own callbacks to this hook from another plugin to clean up custom options.
```php
emcp_pro_fs()->add_action( 'after_uninstall', 'elementor_mcp_after_uninstall' );
```
```php
emcp_pro_fs()->add_action( 'after_uninstall', function () {
delete_option( 'my_plugin_emcp_extension_options' );
} );
```
--------------------------------
### Generate Base64 Encoded Credentials
Source: https://emcp.msrbuilds.com/docs/troubleshooting/auth-errors
Use this command to generate the base64 encoded string for your username and application password, which is required for the Basic Authorization header. Ensure you use `echo -n` to avoid trailing newlines.
```bash
echo -n "admin:xxxx xxxx xxxx xxxx xxxx xxxx" | base64
```
```powershell
[Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes("admin:xxxx xxxx ..."))
```
--------------------------------
### Node.js HTTP Proxy Configuration with Local File
Source: https://emcp.msrbuilds.com/docs/connecting/claude-desktop
Use this configuration when running the Node.js HTTP proxy from a local file copy for remote WordPress sites. Ensure the `command` points to the extracted `mcp-proxy.mjs` file on your local machine.
```json
{
"mcpServers": {
"elementor-mcp": {
"command": "node",
"args": ["C:\\local\\path\\to\\mcp-proxy.mjs"],
"env": {
"WP_URL": "https://your-site.com",
"WP_USERNAME": "admin",
"WP_APP_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx",
"MCP_PROTOCOL_VERSION": "2024-11-05"
}
}
}
}
```
--------------------------------
### Add Any Widget Type
Source: https://emcp.msrbuilds.com/docs/tools/widgets
Use this universal tool to add any widget type to a container. Specify the post ID, parent container ID, position, widget type, and a settings object.
```javascript
await elementor_mcp.add_widget({
post_id: 1,
parent_id: 10,
widget_type: "heading",
settings: {
title: "Hello world",
level: 3
}
});
```
--------------------------------
### Add Atomic YouTube Widget
Source: https://emcp.msrbuilds.com/docs/tools/atomic-elements
Adds an atomic YouTube widget (`e-youtube`) using a video URL.
```APIDOC
## `elementor-mcp/add-atomic-youtube`
### Description
Adds an atomic YouTube widget (`e-youtube`).
### Input Parameters
- **post_id** (string) - The ID of the post.
- **parent_id** (string) - The ID of the parent element.
- **position** (number) - The position to add the element.
- **css_id** (string) - CSS ID for the element.
- **video_url** (string) - The URL of the YouTube video.
```
--------------------------------
### Add Posts Grid Widget Shortcut (Pro)
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a posts grid widget (requires Elementor Pro).
```javascript
await elementor_mcp.add_posts_grid({
post_id: 1,
parent_id: 10
});
```
--------------------------------
### Add HTML Widget Shortcut
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a custom HTML widget. Provide the HTML content as a string.
```javascript
await elementor_mcp.add_html({
post_id: 1,
parent_id: 10,
html: "Custom HTML
Some content.
"
});
```
--------------------------------
### Add Alert Widget Shortcut
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding an alert widget. Specify the type, title, and description.
```javascript
await elementor_mcp.add_alert({
post_id: 1,
parent_id: 10,
type: "warning",
title: "Attention!",
description: "Please review the following information."
});
```
--------------------------------
### Add Lottie Widget Shortcut (Pro)
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a Lottie animation widget (requires Elementor Pro).
```javascript
await elementor_mcp.add_lottie({
post_id: 1,
parent_id: 10,
lottie_url: "path/to/animation.json"
});
```
--------------------------------
### MCP Server Configuration in settings.json
Source: https://emcp.msrbuilds.com/docs/connecting/vscode
Add this configuration to your VS Code settings.json file to define MCP servers. Replace the URL and Authorization header with your specific details.
```json
{
"mcp.servers": {
"elementor-mcp": {
"type": "http",
"url": "https://your-site.test/wp-json/mcp/elementor-mcp-server",
"headers": {
"Authorization": "Basic BASE64_ENCODED_CREDENTIALS"
}
}
}
}
```
--------------------------------
### Add Icon Widget Shortcut
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding an icon widget. Specify the icon, size, and color.
```javascript
await elementor_mcp.add_icon({
post_id: 1,
parent_id: 10,
icon: "fas fa-star",
size: "3x",
color: "#ff0000"
});
```
--------------------------------
### Update Existing Widget Settings
Source: https://emcp.msrbuilds.com/docs/tools/widgets
Use this universal tool to update settings on an existing widget. It supports partial-merge semantics similar to 'update-element'.
```javascript
await elementor_mcp.update_widget({
post_id: 1,
element_id: 15,
settings: {
title: "New title"
}
});
```
--------------------------------
### Add Icon List Widget Shortcut
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding an icon list widget. Provide an array of items, each with an icon and text.
```javascript
await elementor_mcp.add_icon_list({
post_id: 1,
parent_id: 10,
items: [
{ icon: "fas fa-check", text: "Feature A" },
{ icon: "fas fa-times", text: "Feature B" }
]
});
```
--------------------------------
### Add Star Rating Widget Shortcut
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a star rating widget. Specify the rating and an optional title.
```javascript
await elementor_mcp.add_star_rating({
post_id: 1,
parent_id: 10,
rating: 4,
title: "Customer Rating"
});
```
--------------------------------
### elementor-mcp/list-widgets
Source: https://emcp.msrbuilds.com/docs/tools/query-discovery
Returns every registered widget type with names, titles, icons, categories, and keywords. The AI uses this to discover which widgets are available (free + Pro + custom + third-party).
```APIDOC
## elementor-mcp/list-widgets
### Description
Returns every registered widget type with names, titles, icons, categories, and keywords. The AI uses this to discover which widgets are available (free + Pro + custom + third-party).
### Returns
array of `{ name, title, icon, categories, keywords }`
```
--------------------------------
### Add Animated Headline Widget Shortcut (Pro)
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding an animated headline widget (requires Elementor Pro).
```javascript
await elementor_mcp.add_animated_headline({
post_id: 1,
parent_id: 10,
headline: "Amazing",
animation_type: "rotate"
});
```
--------------------------------
### Add Loop Grid Widget Shortcut (Pro)
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a loop grid widget (requires Elementor Pro).
```javascript
await elementor_mcp.add_loop_grid({
post_id: 1,
parent_id: 10
});
```
--------------------------------
### Register Custom MCP Tool
Source: https://emcp.msrbuilds.com/docs/advanced/filters-and-hooks
Add custom MCP tools using the WordPress Abilities API. Register your ability and then add it to the MCP server's tools array via `mcp_adapter_init`.
```php
add_action( 'wp_abilities_api_init', function () {
wp_register_ability( 'my-plugin/my-custom-tool', array(
'label' => __( 'My Custom Tool', 'my-plugin' ),
'description' => __( 'Does a custom thing.', 'my-plugin' ),
'category' => 'my-plugin',
'execute_callback' => function ( $input ) {
// Your logic here.
return array( 'result' => 'success' );
},
'permission_callback' => function () {
return current_user_can( 'edit_posts' );
},
'input_schema' => array(
'type' => 'object',
'properties' => array(
'foo' => array( 'type' => 'string' ),
),
),
'output_schema' => array(
'type' => 'object',
'properties' => array(
'result' => array( 'type' => 'string' ),
),
),
) );
} );
```
--------------------------------
### Add Search Widget Shortcut (Pro)
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a search widget (requires Elementor Pro).
```javascript
await elementor_mcp.add_search({
post_id: 1,
parent_id: 10
});
```
--------------------------------
### Add WooCommerce Products Widget Shortcut (WC + Pro)
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a WooCommerce products grid widget (requires WooCommerce and Elementor Pro).
```javascript
await elementor_mcp.add_wc_products({
post_id: 1,
parent_id: 10
});
```
--------------------------------
### Add Hotspot Widget Shortcut (Pro)
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a hotspot widget (requires Elementor Pro).
```javascript
await elementor_mcp.add_hotspot({
post_id: 1,
parent_id: 10,
hotspots: [
{ x: 50, y: 50, content: "Info 1" },
{ x: 100, y: 100, content: "Info 2" }
]
});
```
--------------------------------
### Add Rating Widget Shortcut
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a rating widget. Specify the rating, maximum value, and icon.
```javascript
await elementor_mcp.add_rating({
post_id: 1,
parent_id: 10,
rating: 4.5,
max: 5,
icon: "star"
});
```
--------------------------------
### Add Countdown Widget Shortcut (Pro)
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a countdown widget (requires Elementor Pro).
```javascript
await elementor_mcp.add_countdown({
post_id: 1,
parent_id: 10,
date: "2024-12-31 23:59:59"
});
```
--------------------------------
### Add Scroll Progress Widget Shortcut (Pro)
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a scroll progress widget (requires Elementor Pro).
```javascript
await elementor_mcp.add_scroll_progress({
post_id: 1,
parent_id: 10
});
```
--------------------------------
### Add Slides Widget Shortcut (Pro)
Source: https://emcp.msrbuilds.com/docs/tools/widgets
A shortcut for adding a slides widget (requires Elementor Pro).
```javascript
await elementor_mcp.add_slides({
post_id: 1,
parent_id: 10,
slides: [
{ title: "Slide 1", description: "Content 1" },
{ title: "Slide 2", description: "Content 2" }
]
});
```
--------------------------------
### Add Atomic Image Widget
Source: https://emcp.msrbuilds.com/docs/tools/atomic-elements
Adds an atomic image widget (`e-image`) using either an image ID or URL, with alt text and optional link.
```APIDOC
## `elementor-mcp/add-atomic-image`
### Description
Adds an atomic image widget (`e-image`).
### Input Parameters
- **post_id** (string) - The ID of the post.
- **parent_id** (string) - The ID of the parent element.
- **position** (number) - The position to add the element.
- **css_id** (string) - CSS ID for the element.
- **image_id** (string) - The ID of the image in the media library.
- **image_url** (string) - The URL of the image.
- **alt** (string) - Alt text for the image.
- **link** (string) - Optional URL for the image.
```
--------------------------------
### Update Container
Source: https://emcp.msrbuilds.com/docs/tools/layout
Updates settings on an existing container.
```APIDOC
## `elementor-mcp/update-container`
### Description
Updates settings on an existing container.
### Method
Not specified (assumed internal tool call)
### Parameters
#### Input
- **post_id** (string) - Required - The ID of the post.
- **parent_id** (string) - Required - The ID of the parent container.
- **position** (integer) - Required - Child index.
- **settings** (object) - Required - Partial container settings to update.
```