DEV Community

Cover image for Elementor MCP: Connect Claude, Codex or Cursor, and Fix It When It Won't Work
Ansak Mahir
Ansak Mahir

Posted on Originally published at letsknowtech.com

Elementor MCP: Connect Claude, Codex or Cursor, and Fix It When It Won't Work

First published on LetsKnowTech, where I keep it up to date.

Elementor MCP is the MCP server built into the free Elementor plugin since version 4.3. You switch it on under Elementor > Elementor MCP, paste the prompt it generates into Claude Code, Claude Desktop, Codex or Cursor, and the AI can create pages, change them and publish them using Elementor's own widgets. Three things are easy to miss. It only edits pages built with Elementor's new Atomic (V4) elements. It needs WordPress 6.9 or newer, even though Elementor says 6.8. And a change it publishes to a page that's already live can stay invisible to visitors for up to a day, because of Elementor's element cache. Each of those has a fix below, and so does every connection error we ran into.

What you need first

  • Elementor 4.3.4 or newer. MCP arrived in 4.3.0. Version 4.3.4 fixed two MCP bugs: element settings could get lost when a page was updated through MCP, and the setup screen didn't warn you when Application Passwords were unavailable. 4.3.5 is the current release.
  • WordPress 6.9 or newer. Elementor's plugin listing says it needs 6.8, and the plugin does run there, but its MCP feature is built on the Abilities API, whose wp_register_ability() function arrived in WordPress 6.9. On a WordPress 6.8.3 site with Elementor 4.3.5 there was no Elementor MCP item in the menu at all, and opening wp-admin/admin.php?page=elementor-mcp directly gave "Sorry, you are not allowed to access this page." Update WordPress and the menu item appears.
  • Application Passwords that work. The AI client logs in with one. WordPress only offers them on sites served over HTTPS (or sites marked as local development sites), and some security plugins switch them off.
  • An administrator account to open the setup screen. Editors can use the connection, but they can't open that screen (which account to connect with).
  • The Atomic Editor switched on. It's on by default in Elementor 4.3.5, but if someone turned it off under Elementor > Settings > Atomic Editor, 12 of the 20 tools refuse to work, including every one that builds or edits (the error).
  • Pages built with Atomic elements, if you want the AI to edit them. It can read older pages but can't change them (more on that).
  • Node.js on your computer if you use Claude Desktop, because Elementor's Claude Desktop setup runs npx mcp-remote.

You don't need Elementor Pro. The free plugin gave our test site 20 tools. Pro adds headers, footers and other theme parts (below).

Turn it on and connect your AI client

  1. In wp-admin, go to Elementor > Elementor MCP and click Enable MCP access.
  2. Pick your client's tab: Claude Code, Claude Desktop, Codex, Cursor or Other.
  3. Tick "I understand that clicking Generate Prompt will create an application password for this site", then click Generate Prompt.
  4. Click Copy prompt and paste it into your AI client. The prompt asks the client to add the server to its own config file.
  5. Restart the client, then check that the server shows as connected. In Claude Code, type /mcp.

The Elementor MCP screen in wp-admin with the Claude Code tab selected and a generated setup prompt showing the server URL, username and a blurred application password

The prompt contains a working application password for your admin account, in plain text. Treat it like your admin password: don't paste it into a shared chat, a support ticket or a screen recording.

Each click on Generate Prompt creates a new password with a name like "Elementor MCP - Claude Code (2026-10-18 12:42:34)". If you clicked it a few times while getting set up, delete the spares under Users > Profile > Application Passwords.

If you'd rather edit the config file yourself, click Prefer manual configuration? on the same screen. It generates the configuration block and tells you which file to paste it into.

Where each client's config goes

Client Config file on macOS/Linux Config file on Windows How it connects
Claude Code ~/.claude.json %USERPROFILE%\.claude.json Straight to the site over HTTP, with an Authorization header
Claude Desktop ~/Library/Application Support/Claude/claude_desktop_config.json %APPDATA%\Claude\claude_desktop_config.json Runs npx -y mcp-remote with the same header (needs Node.js)
Codex ~/.codex/config.toml %USERPROFILE%\.codex\config.toml Straight to the site, TOML format (needs one fix)
Cursor ~/.cursor/mcp.json %USERPROFILE%\.cursor\mcp.json Straight to the site, with the header
Other ~/mcp-config.json %USERPROFILE%\mcp-config.json Same JSON as Claude Code

For Claude Code the entry looks like this:

{
  "mcpServers": {
    "your-site-elementor": {
      "type": "http",
      "url": "https://example.com/wp-json/elementor/mcp/",
      "headers": {
        "Authorization": "Basic BASE64_STRING"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

BASE64_STRING is your username, a colon and the application password (admin:abcd efgh ijkl mnop qrst uvwx), Base64-encoded. Elementor's prompt fills it in for you. If you're making one by hand, the spaces in the password can stay, and your account's email address works in place of the username. To get the string:

# macOS / Linux
printf '%s' 'admin:abcd efgh ijkl mnop qrst uvwx' | base64
Enter fullscreen mode Exit fullscreen mode
# Windows PowerShell
[Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes('admin:abcd efgh ijkl mnop qrst uvwx'))
Enter fullscreen mode Exit fullscreen mode

In Claude Code you can add the server from a terminal instead of editing the file. --scope user makes it available in every project:

claude mcp add --transport http --scope user your-site-elementor https://example.com/wp-json/elementor/mcp/ --header "Authorization: Basic BASE64_STRING"
Enter fullscreen mode Exit fullscreen mode

Codex: rename headers to http_headers

The Codex config Elementor 4.3.5 generates puts the password header under a headers table:

[mcp_servers.your-site-elementor]
url = "https://example.com/wp-json/elementor/mcp/"

[mcp_servers.your-site-elementor.headers]
Authorization = "Basic BASE64_STRING"
Enter fullscreen mode Exit fullscreen mode

Codex CLI (0.163) doesn't read that key. codex mcp get your-site-elementor shows http_headers: -, which means Codex calls your site without the password and gets a 401. Change .headers] to .http_headers]:

[mcp_servers.your-site-elementor.http_headers]
Authorization = "Basic BASE64_STRING"
Enter fullscreen mode Exit fullscreen mode

Run codex mcp get your-site-elementor again. It should now show http_headers: Authorization=*****.

Claude Desktop config on Windows: npx not found

Elementor's Claude Desktop config starts the connection with "command": "npx". On our Windows machine, Claude Code launched with exactly that config showed the server as failed, while the same mcp-remote command run by hand from a terminal connected fine. Windows installs npx as npx.cmd, and a program that starts commands without a shell doesn't find it. Wrapping the command in cmd /c fixed it:

{
  "mcpServers": {
    "your-site-elementor": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "mcp-remote", "https://example.com/wp-json/elementor/mcp/", "--header", "Authorization: Basic BASE64_STRING"]
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

If your Windows client already connects with the plain npx version, leave it alone.

On Windows the Authorization: Basic ... argument can also get split at its space on the way to mcp-remote, which turns into a 401. The way around that is to pass the header value through an environment variable, with no space after the colon. This version connected on our Windows machine too:

{
  "mcpServers": {
    "your-site-elementor": {
      "command": "cmd",
      "args": ["/c", "npx", "-y", "mcp-remote", "https://example.com/wp-json/elementor/mcp/", "--header", "Authorization:${AUTH_HEADER}"],
      "env": {
        "AUTH_HEADER": "Basic BASE64_STRING"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

ChatGPT

ChatGPT isn't one of the tabs. ChatGPT's custom connectors sign in with OAuth (or with no authentication at all), while Elementor's server expects an application password in a header, so the two don't connect directly. Our guide to connecting WordPress to ChatGPT covers what ChatGPT does accept.

What the AI can do with it

The free plugin exposes 20 tools. You never call them yourself; the AI picks them based on what you ask. They fall into four groups:

Group Tools Who can use them
Read the site list-posts, get-page-structure, list-widget-schemas, get-widget-schema, list-assets (Media Library images, SVGs, videos), list-components, get-default-styles, list-resources, read-resource Anyone who can edit posts
Build and edit pages create-page (always as a draft), build-composition (adds a whole section from a layout), manage-elements (up to 50 edits, moves, duplicates or deletes per call), update-page-settings (hide title, layout) Anyone who can edit that page
Check and publish create-preview-link (a signed, short-lived preview the AI uses to check its own work), publish-document Anyone who can publish that page
Site-wide design manage-global-variable (colours, fonts, sizes), manage-classes, reorder-classes, manage-default-styles, manage-component Administrators only (by default)

The widgets it can place are Elementor's Atomic ones: heading, paragraph, image, SVG, button, divider, YouTube, self-hosted video, div block, flexbox, grid, tabs, accordion, background video, form and collection loop. Saved components can be placed too.

On our test site (WordPress 7.1.3, the Hello Elementor theme, no global styles set up), Claude Code built a landing page with a hero, three columns and an FAQ in about two minutes. It saved the page as a draft, avoided inventing prices or reviews, and listed the lines it had written that the owner should check, such as "most boiler services take about an hour". A follow-up asking for a new heading, a dark green button and a fourth column took about a minute and touched only those parts of the page. For more of what the wider WordPress MCP setup can do beyond Elementor, see everything the WordPress MCP Adapter can do.

The landing page Claude built through Elementor MCP: a hero heading, a dark green 'Book your service' button, four columns and an FAQ, centred on the Hello Elementor theme

The page opens in the Elementor editor like any other page, with the sections named the way the AI named them ("hero", "features", "faq"). You can carry on by hand from there.

The AI-built page open in the Elementor editor, with Atomic Elements in the left panel and the Structure panel listing the hero, features and faq sections

Two things it didn't catch on its own, and that you can put straight into your first prompt:

  • Two H1 headings. The theme printed the page title ("Winter Boiler Service Offer") as an H1, and the hero heading was a second H1. Ask it to "hide the theme's page title on this page". It turns on Hide Title in the page settings.
  • Content running edge to edge on wide screens, because no container width was set. Ask for "a centred column no wider than 1140px, with side padding on mobile". It created a reusable class and attached it to each section.

Old pages: "Legacy V3 element cannot be modified through this MCP"

Pages built with Elementor's classic widgets (the Heading, Text Editor and Button widgets most existing sites use) can be read but not changed. When we asked Claude to change the heading and button text on a classic page, every edit came back with:

Legacy V3 element cannot be modified through this MCP. Edit V3 elements directly in the Elementor editor.
Enter fullscreen mode Exit fullscreen mode

The AI can't even read those widgets' text or styles. It only sees that a "heading" or "button" is there. You have two ways forward:

  • Make the change in the Elementor editor yourself. For a text change, that's the quickest route and it keeps your styling.
  • Let the AI rebuild that section with Atomic elements, then delete the old one. The new section won't copy the old fonts, colours or spacing, so check it before publishing.

To find out which parts of a page it can edit before you ask for changes, ask: "Which elements on the About page are version 3 and which are version 4?" The page-structure tool tags every element with its version.

Headers, footers and other Pro parts

We asked for a site-wide header with a menu and a footer with a phone number. Claude didn't build anything. The free plugin has no tools for theme parts, and Claude said so, offering to put a header block inside individual pages instead, which it advised against. Elementor's own MCP screen says that with Pro, "your agent can build with Theme Builder, forms, popups, and more advanced Elementor capabilities". Its tool descriptions mention separate site-parts tools for headers, footers, 404 pages and archives that only appear with Pro.

Changes on a live page don't show up

This one will confuse you if you don't know about it.

Edits wait until they're published

When the AI changes a page that's already live, Elementor stores the change as an autosave. Visitors see the old version until the AI calls its publish tool. If the AI says "done" and the live page hasn't changed, ask it to publish the page.

Then the old version can stay up for a day

After a publish through MCP, the database had the new heading, but the live page kept showing the old one. That happened every time we repeated it. The cause is Elementor's Element Cache, which stores the rendered HTML of each page for 1 day by default. Saving in the Elementor editor clears it; publishing through MCP didn't. To fix it:

  • Right now: go to Elementor > Tools and click Clear Files & Data. On the command line, wp elementor flush-css does the same thing. The new version showed up straight away.
  • If you'll edit live pages through MCP often: set Element Cache to a shorter time, or to Disable, under Elementor's Settings > Performance. With it disabled, the published change showed up immediately.
  • Clear your page cache plugin and your CDN as well, as you would after any change. Then check the page in a private window, logged out.

One order to avoid

On a live page, an element edit, then a page-settings change (such as hiding the title), then a publish lost the element edit. The page-settings save replaced the staged autosave. Claude ran into this by itself while fixing our page, noticed, and redid the edits. You can avoid it by asking for page-settings changes first, or by publishing the element edits before you change page settings. Either way, look at the live page afterwards.

Which account to connect with

The AI can do whatever the WordPress account behind the application password can do. Here's what three roles got on our test site:

Account Create pages Edit and publish any page Site-wide colours, fonts, classes, components
Administrator Yes Yes Yes
Editor Yes Yes No ("Permission denied")
Author No ("Sorry, you are not allowed to create posts of this type.") No ("Sorry, you are not allowed to access this document.") No

For everyday page work, an Editor account is enough, and it can't touch your site-wide design. The catch is that the Elementor MCP screen needs an administrator. To connect an editor:

  1. Log in as the editor, go to Users > Profile > Application Passwords, and create a password.
  2. Put that username and password into the config from the table above, with the server URL https://yoursite.com/wp-json/elementor/mcp/.

Two more things worth knowing before you connect an agent to a live client site:

  • "Turn off MCP access" doesn't revoke the password. It closes the MCP endpoint, but the application password still logs in to the rest of the WordPress REST API. With MCP turned off, the same password still changed a page through /wp-json/wp/v2/pages. To cut an agent off completely, revoke its password under Users > Profile > Application Passwords.
  • Try it on a copy first. A staging site or a local copy of WordPress lets you see how the AI handles your theme and your pages before it publishes anything real. On a local site, application passwords work without HTTPS as long as WP_ENVIRONMENT_TYPE is set to local in wp-config.php.

When it won't connect

First, find out what the endpoint itself says. Paste your username and application password into one of these and run it:

# macOS / Linux (or curl.exe on Windows)
curl -i -u "admin:abcd efgh ijkl mnop qrst uvwx" \
  -H "Content-Type: application/json" -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"test","version":"1"}}}' \
  https://example.com/wp-json/elementor/mcp/
Enter fullscreen mode Exit fullscreen mode
# Windows PowerShell
$auth = [Convert]::ToBase64String([Text.Encoding]::UTF8.GetBytes('admin:abcd efgh ijkl mnop qrst uvwx'))
$body = '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-11-25","capabilities":{},"clientInfo":{"name":"test","version":"1"}}}'
try { $r = Invoke-WebRequest -UseBasicParsing -Method Post -Uri 'https://example.com/wp-json/elementor/mcp/' -Headers @{Authorization = "Basic $auth"; Accept = 'application/json, text/event-stream'} -ContentType 'application/json' -Body $body; "$($r.StatusCode) $($r.Content)" } catch { "$($_.Exception.Response.StatusCode.value__) $($_.ErrorDetails.Message)" }
Enter fullscreen mode Exit fullscreen mode

Then match what came back:

You get It means Fix
200 and JSON with "serverInfo":{"name":"Elementor MCP" The site side works The problem is in the client: check the config file, the Codex header, npx on Windows, then restart the client
401 and rest_forbidden, "Sorry, you are not allowed to do that." The password didn't log anyone in Wrong password, or the header is being stripped
404 and rest_no_route No MCP route on this site MCP access is turned off, or Elementor or WordPress is too old (no menu item)
200 with a web page (HTML) instead of JSON /wp-json/ isn't reaching WordPress's REST API Plain permalinks

When the client can't connect, Claude Code just lists the server as failed under /mcp and the AI says it has no Elementor tools, whatever the cause. The test above tells you which cause it is.

401 "Sorry, you are not allowed to do that."

All of these produced the same 401 on our test site:

  • a mistyped or revoked application password
  • your normal login password instead of an application password (it has to be an application password)
  • a correct application password that never reached WordPress

The last one fools people, because the password is right. Some servers, Apache with PHP running as FastCGI being the usual one on shared hosting, drop the Authorization header before PHP sees it. WordPress's standard .htaccess has a line that passes it through, but a hand-edited or older .htaccess may not. On our FastCGI test server, removing that one line turned a working connection into a 401. The PHP error log said:

Permission denied for MCP API access. User ID 0 does not have capability "read" | Context: ["HttpTransport::check_permission"] | User ID: 0
Enter fullscreen mode Exit fullscreen mode

"User ID 0" means nobody was logged in: the password never arrived. Any one of these, near the top of .htaccess, brought the connection back:

# WordPress's own line, inside the "BEGIN WordPress" block, after RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
Enter fullscreen mode Exit fullscreen mode
# Apache 2.4.13 and newer
CGIPassAuth On
Enter fullscreen mode Exit fullscreen mode
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
Enter fullscreen mode Exit fullscreen mode

If none of them changes anything, your host may be stripping the header further up. Send them the error log line above.

"Application passwords are not available on this site"

Elementor MCP screen showing 'Application passwords are not available on this site. Your site may require HTTPS, or a plugin may have disabled them.' with the Generate Prompt button greyed out

Elementor shows this, and greys out Generate Prompt, when WordPress won't issue application passwords. On our test site it appeared as soon as the site was set as a production site still served over plain HTTP. Passwords created earlier stopped working too: they returned the same 401 as a wrong password.

  • Serve the site over HTTPS. WordPress decides this from the request it receives. If your site sits behind a proxy or CDN that talks to your server over plain HTTP (Cloudflare's Flexible SSL mode does this), WordPress sees HTTP and keeps application passwords off. Use an SSL mode that encrypts the whole way to your server, such as Cloudflare's Full (strict), or ask your host to pass the HTTPS flag through.
  • Check your security plugin. Several have a setting that disables application passwords. Turn that off, or allow them for the account you're connecting.
  • For a local test site, set define( 'WP_ENVIRONMENT_TYPE', 'local' ); in wp-config.php.

On Elementor 4.3.0 to 4.3.3, the screen didn't show this warning at all, so update to 4.3.4 or newer if the setup seems to do nothing.

A similar message, "Application passwords are turned off for your user account", means it's switched off for your account only. Enable it on your profile page, as the message says.

No Elementor MCP menu item

  • WordPress 6.8 or older: the menu item only appears on 6.9 and newer. On 6.8, the page URL gives "Sorry, you are not allowed to access this page." That message has other causes too, but here it just means the page doesn't exist yet.
  • Elementor older than 4.3.0: update it under Plugins.
  • You're not an administrator: only accounts that can manage options see the screen.

"This site needs the Atomic Editor turned on"

If the connection works but the AI comes back with:

This site needs the Atomic Editor turned on before this can be built. Turn it on in WP Admin → Elementor → Settings → Atomic Editor, then try again.
Enter fullscreen mode Exit fullscreen mode

then the Atomic Editor is switched off on your site. With it off, all 20 tools still show up in the client, so the connection looks fine. But building, editing, reading widget lists and changing site-wide styles all return that message. Only a few things still work, such as listing posts, reading a page's structure, creating a blank draft and publishing. Turn it back on where the message says, and ask again.

/wp-json/ returns your home page

With Settings > Permalinks set to Plain, a request to /wp-json/elementor/mcp/ returned our home page's HTML with a 200 status. The client can't make sense of that, so it shows as failed. On the same site, https://example.com/?rest_route=/elementor/mcp/ worked.

Elementor builds the server URL when you generate the prompt, so it matches the permalink setting at that moment. The problem appears when you switch to Plain afterwards, or type the /wp-json/ URL in by hand. Pick any setting other than Plain, or use the ?rest_route= form of the URL.

Turned off by mistake

If someone clicked Turn off on the Elementor MCP screen, the endpoint returns 404 rest_no_route and every client shows the server as failed. Click Enable MCP access again. The existing application passwords still work, so the clients reconnect after a restart without a new prompt.

That's all.


Written with AI assistance from my own test notes; the fixes were run on real WordPress installs before publishing.

Top comments (0)