# Divi MCP: layouts, global colors and Theme Builder templates from your AI agent

Divi edits split into two groups. With the option for plain builder edits on, a text, image or button edit on one Divi 4 or Divi 5 page applies at once in Direct mode, and so does a new draft. Code, attributes, dynamic data, conditions and loops wait for an administrator allowed to add code, as does any edit on a page holding code an administrator added.

## Does Widejoin work with Divi?

Widejoin gives your AI agent Divi 4 tools tested on Divi Builder 4.27.7 and a separate set of Divi 5 tools tested on the Divi 5.15.0 theme. Every Divi write is in [the Pro add-on from $99 a year](/pricing/), and each one is recorded.

## Does it work with Divi 5?

Yes, with a separate set of 12 tools that write Divi 5's own block format. The Divi 4 tools answer a Divi 5 site with an unsupported version error, so the agent uses the Divi 5 set there.

What we tested: the Divi 5 tools ran in PHPUnit against the real Divi 5.15.0 theme on our lab, on WordPress 7.1.2. Those tests create drafts, change layouts, global colors, variables and presets, add library items, change Theme Builder templates and Theme Options, then approve the changes and restore them.

What we tested in the browser: a Divi 5 draft and a layout change, seen by a visitor and opened in Divi 5's Visual Builder, then restored to the exact layout.

What we have not tested yet: global colors, variables, presets, library items, Theme Builder templates and Theme Options in a browser (those ran in PHPUnit only), and any Divi 5 version other than 5.15.0. The page design estimate tool is switched off until it is verified.

## Which Divi tools does Widejoin have?

24 tools: 12 for Divi 4, 6 that read and 6 that write, and 12 for Divi 5, 6 that read and 6 that write. The draft tools create an unpublished page at once. The rest make a recorded change. In Direct mode it applies in the same call when the agent may add code, or when it is a plain edit and the option for plain builder edits is on, and otherwise waits for an administrator. In Review first it waits for a person.

- Divi 4, read: `divi-module-schema`, `list-divi-library`, `list-divi-theme-builder`, `read-divi`, `read-divi-globals`, `read-divi-layout`.
- Divi 4, write: `create-divi-draft`, `create-divi-layout`, `prepare-divi`, `prepare-divi-globals`, `prepare-divi-layout`, `prepare-divi-theme-template`.
- Divi 5, read: `divi5-module-schema`, `list-divi5-library`, `list-divi5-theme-builder`, `read-divi5-globals`, `read-divi5-layout`, `read-divi5-theme-options`.
- Divi 5, write: `create-divi5-draft`, `create-divi5-library-item`, `prepare-divi5-globals`, `prepare-divi5-layout`, `prepare-divi5-theme-options`, `prepare-divi5-theme-template`.

## What can the agent change in Divi?

- Layouts, with ordered operations on sections, rows, columns and modules by position. Shortcodes the change does not touch stay exactly as they were.
- Module text, button text and image alt text, with every other part of the layout left byte for byte.
- Global colors, for an agent with the Administrator role. Editors are refused.
- Theme Builder templates, such as a header for one page, which also need the Administrator role.
- On Divi 5, also global variables and presets, Divi Library items and Theme Options. In Review first, Divi 5 changes are approved one at a time, never in bulk.

### Can an AI agent change Divi Theme Builder templates?

Yes, with the Administrator role. `widejoin-prepare-divi-theme-template` creates or changes a template, and in Direct mode publishing it or changing where it shows waits for an administrator in wp-admin.

One shop trap we hit on our lab on 24 October 2026, with WooCommerce 11.1.2 and Divi Builder 4.27.7: a template set to show on `woocommerce:shop` applied and never appeared on the shop. From WooCommerce 11.0.0-beta.1 the shop page is the queried object of the product archive, so Divi finds no product archive to match. The tool now refuses `woocommerce:shop` and `archive:post_type:product` with `condition_never_shows` and names `archive:all`, which shows on the shop and on every other archive too.

## How do I set up a Divi MCP server?

Install the free Widejoin plugin on your Divi site, connect it in the Widejoin console, add the Pro add-on, then add `https://widejoin.com/mcp` to Claude Code with a token. Your AI agent can then read Divi layouts on the free plugin and, with Pro, edit them, each change recorded, with an undo where one is possible.

Divi 5 sites follow the same steps, and the agent uses the Divi 5 tools there.

1. **Check the site.** WordPress 6.9 or later, PHP 8.2 to 8.4, HTTPS, the [MCP Adapter plugin 0.7.x](/docs/install/) and a backup from the last 24 hours. The Divi 4 tools need Divi 4.x and were tested on Divi Builder 4.27.7. A Divi 5 site gets the Divi 5 set, tested on the Divi 5.15.0 theme.
2. **Install the plugin.** Download the Widejoin ZIP from the [download page](/download/), upload it under Plugins > Add New > Upload Plugin and activate it.
3. **Connect the site in the console.** On the Widejoin screen in wp-admin, which opens once after activation, click "Connect with a Widejoin account". It opens the sign-up with your site's address and creates nothing on the site. Then add the site under Sites in the console. You know it worked when the console shows the site as Connected, with the WordPress user it connects as.
4. **Add the Pro add-on.** The Pro add-on is a second ZIP from the Licence page of the Widejoin account you just created, uploaded the same way. Enter the licence key from that page on the Pro tab under Widejoin in wp-admin. Without Pro the agent reads your Divi pages and does not write them. Plugins should then list Widejoin MCP and Widejoin Pro, both active.
5. **Create a token.** On Settings > Tokens in the console, create a token for Claude Code. It is shown once, and a site token reaches one site.

   ![Widejoin console token panel: the new token hidden behind dots, a Copy button and the AI clients to set up](/lab/docs-connect-console-token-480.webp "Illustration from our lab capture: a new token, shown once. The token is hidden and the panel's lower rows are faded out.")
6. **Add the server to Claude Code.** Run the two commands below and paste the token when the first one waits. Then run `claude mcp list` and look for the `widejoin` entry.

```
read -rs WIDEJOIN_TOKEN
claude mcp add --scope user \
  --transport http widejoin \
  https://widejoin.com/mcp \
  --header \
  "Authorization: Bearer $WIDEJOIN_TOKEN"
```

7. **Ask for one small edit first.** One headline on one page, with "Change nothing else." at the end of the prompt. Then open that page logged out and look at the headline's styling as well as its words.

This is the prompt for the edit in our own test below:

```prompt
On the Harbor & Pine Divi page, change the headline "Small batch coffee, roasted on the harbor" to "Small batch coffee, roasted on Pier 4". Change nothing else.
```

The [install guide](/docs/install/) covers the Widejoin screen and the MCP Adapter. Other AI clients connect with the same address and token, and the [Claude Code setup page](/clients/claude-code/) and [Connect your AI client](/docs/connect/) say how each one was tested.

### What does a Divi AI agent cost with Widejoin?

The plugin is free and reads Divi. Every Divi write is in Pro, $99 a year for 3 sites. The Pro trial runs 14 days on up to 10 sites with no card. When it ends, Pro tools go back to their free state, so the agent reads your Divi pages again and stops writing them. The free plugin keeps working on every site and the hosted server keeps your first 2 sites. Your AI client is billed separately by its own provider. [Widejoin pricing](/pricing/) compares the plans.

If your agent can already read a Divi page but every edit stops at "Pro", the [14 day Pro trial](/sign-up?trial=pro&src=int-divi-howto) turns the Divi write tools on for this site.

### What does Claude do when you ask for a Divi edit?

It reads before it writes. For a text, button or image alt change it calls `widejoin-read-divi`, which lists the page's modules by position with a fingerprint of the layout. It then sends `widejoin-prepare-divi` with that fingerprint. If someone saved the page in between, the edit is refused with "The target changed. Read it again before preparing an edit.", and nothing is written.

For a new section, a moved row or a new module it calls `widejoin-read-divi-layout` and then `widejoin-prepare-divi-layout`, which skips that check. "What should I know before relying on it?" below says what to do on a page people edit at the same time.

In Direct mode a plain text, image or button edit applies at once when "Let simple page builder edits go live at once" is ticked. It is ticked for a new connection. Code waits for an administrator allowed to add code. [How a change applies and what waits](/how-it-works/) has the full list.

### What did our own test edit show?

On 4 November 2026 we walked release 0.7.4 on our builders demo host, with Divi Builder 4.27.7, and made one headline change on a Harbor & Pine page. A test script sent it through the hosted MCP address, calling `read-divi` and then `prepare-divi`. "Small batch coffee, roasted on the harbor" became "Small batch coffee, roasted on Pier 4". The words were right. The headline was not: it went from white, 64 px and centered to dark gray, 32 px and left aligned, on a dark section.

The review screen showed the old and new shortcodes, and the lost styling sat in them where a reader checking the words would miss it. Release 0.7.5 fixed it, and it went live that same evening, 4 November 2026. A rerun of the same edit on the same page with the 0.7.5 build that day kept the headline white, 64 px and centered. That is why step 7 says to look at the page itself.

![The Harbor & Pine headline before and after the edit: "Small batch coffee, roasted on the harbor", then "Small batch coffee, roasted on Pier 4", white, large and centered on a dark green section both times](/lab/docs-divi-headline-before-after-1200.webp "The same edit on our lab with release 1.0.1, 18 November 2026: the words changed and the headline kept its styling.")

## What will it not do in Divi?

It refuses script URLs in module fields. Editors cannot change global colors. On Divi 5, a layout, global variable or preset that holds custom CSS, a code module or a script needs the unfiltered_html capability. From an agent without it, the change waits for someone who has it, and the review page says what code it holds. A Divi 5 draft that holds code is refused without that capability. Theme Options fields that hold credentials, header code or custom CSS are refused.

## What should I know before relying on it?

Two things, both found while we captured the screenshots for this page:

- A Divi review shows the change as a shortcode comparison. Divi 4 pages and posts also get the rendered preview Elementor and block edits get; library items and Theme Builder templates do not.
- Divi layout edits do not yet check that the agent read the latest version of the page. Their operations run against the layout as it is when the change is made, and in Direct mode that change applies in the same call. On pages people edit at the same time, have the agent pass `review: true`, or keep the site in Review first. The Elementor, Bricks and block tools do check. Restore still checks the page before writing anything back.

## How does restore work on a Divi page?

Restore writes back the recorded layout and checks its fingerprint first. In Direct mode the agent undoes a change with one `restore-change` call, and a person can restore it from the change's page in wp-admin. On our lab, three restores returned the original layout fingerprint, even after the page was published.

In that test, visitors saw the new heading in rgb(30, 132, 73) and the button in the global color, with no horizontal scroll at 1365 or 390 pixels wide. On 11 October 2026 we repeated a heading and button edit on the Letterpress workshop page of our demo client site, and Divi's Visual Builder reopened it with the new heading.

Related: the [Bricks integration](/integrations/bricks/), the [Elementor integration](/integrations/elementor/), [how a change works](/how-it-works/) and [Connect your AI client](/docs/connect/).

## Questions

### Which Divi version did you test?

Divi Builder 4.27.7 on WordPress 7.1.2, in the browser and in PHPUnit. The Divi 5 tools were tested in PHPUnit against the Divi 5.15.0 theme on our lab, and a browser test opens a changed Divi 5 layout in the Visual Builder.

### Does Widejoin work with Divi 5?

Yes, with its own 12 tools, each layout change with a record and a restore. They were tested in PHPUnit against the Divi 5.15.0 theme on our lab. In the browser, a draft and a layout change show to visitors and open in Divi 5's Visual Builder, then restore exactly.

### Can the agent edit Divi global colors?

Yes, if the agent has the Administrator role. Its change applies at once in Direct mode when that user may add code (unfiltered HTML). It waits for a person when that user may not, when the site is in Review first, or when the agent asks for review. The agent First connect creates may not add code until an administrator clicks "Allow the agent to add code" on the First connect screen, so out of the box its global color changes wait. Editors are refused.

### Can I see the page before a Divi change applies?

Yes, in Review first or when the agent asks for review on that call. A Divi review shows the change as a shortcode comparison, and a Divi 4 page or post also gets the current and proposed page side by side. Library items, Theme Builder templates and Divi 5 changes get no rendered preview.

### Can an AI agent edit Divi pages?

Yes, through an MCP server such as Widejoin. The agent reads a Divi layout, then changes module text, buttons, image alt text or the layout itself, and each change is recorded, with an undo where one is possible. Divi reads are free; Divi writes need the Pro add-on.

### Can Claude edit a Divi site?

Yes. Claude Code connects to Widejoin with one claude mcp add command and then uses the Divi tools. Claude Code 2.1.296 ran end to end on our lab on 10 October 2026, through the plugin route. claude.ai's custom connector signs in with OAuth, which the hosted server offers, but we have not completed a sign-in from claude.ai yet.

### Is this Divi AI?

No. Divi AI is Elegant Themes' assistant inside the Visual Builder, sold as its own subscription (elegantthemes.com/ai, checked 10 November 2026). Widejoin connects the agent you already run, such as Claude Code, to your site over MCP and records each Divi change, with an undo where one is possible. You can run both on one site.
