Get the plugin
WP MCP/Integrations/Themes

Themes integration

GeneratePress AI agent tool reference

GeneratePress keeps its settings in the generate_settings option, merged over its defaults one top-level key at a time. WP MCP Pro adds a GeneratePress pack to the theme pair while it is the active theme family: get-generatepress-settings reads the allowlisted keys and set-generatepress-settings writes them. The vocabulary covers the global color palette by slug, text, link, background, header and footer colors, body and heading typography, the container width, and the header, navigation and footer layout settings. A write into the palette or typography list seeds it with the theme's default first, the option is snapshotted, and the cached dynamic CSS is dropped so the next view regenerates it.

theme-readtheme-write

In practice

How GeneratePress work goes with an agent.

GeneratePress keeps its whole customizer in one option, generate_settings, and merges it over the theme defaults one top-level key at a time. A stored global_colors or typography list therefore replaces the default list entirely rather than extending it. That is the trap for any outside writer: set one accent color into an empty option and the rest of the palette disappears. WP MCP seeds the list with the theme's own defaults first, addresses each color by its slug, and clears the cached dynamic CSS afterwards.

Show the GeneratePress palette and the current container width.

Runs get-generatepress-settings, which returns the allowlisted keys as stored, including the colors by slug such as accent, contrast and base-2, plus the allowlist. Read only.

Set the accent color to #c2410c and make links use the accent variable.

Runs set-generatepress-settings with accent and link_color. Link color accepts a reference such as var(--accent). The option is snapshotted, the default palette is seeded if needed, and the dynamic CSS is dropped.

Use Inter for the body and headings, with a 17 pixel body size.

Runs set-generatepress-settings with body_font_family, heading_font_family and body_font_size. The family value is checked as a plain name, the size must be 8 to 72, and the typography list is seeded with the core body and heading rules first.

Center the header, put the navigation below it, and use a contained footer.

Runs set-generatepress-settings with header_alignment_setting, nav_position_setting and footer_layout_setting. Each value must be one of the theme's own options, and a value outside the list refuses the whole batch.

What your AI can do

Real GeneratePress operations, every write reversible.

  • Read and set the global color palette by slug
  • Set text, link, background, header and footer colors
  • Change body and heading typography
  • Set container width, header alignment, navigation position and footer layout
  • Regenerate the theme's dynamic CSS after writes and rollbacks

Example prompts

Example GeneratePress prompts.

Set the GeneratePress accent color to #c2410c.

Center the header and put the navigation below it.

Use four footer widget columns and a contained footer.

Under the hood

The GeneratePress calls, under the hood.

wpmcp, generatepress

theme-read({ operation: "get-generatepress-settings" })

theme-write({ operation: "set-generatepress-settings", args: { settings: { accent: "#c2410c" } } }), Pro; opt-in; snapshotted

Safety and access

What can be undone on GeneratePress, and what costs what.

Recoverable on GeneratePress

  • The generate_settings option is snapshotted before every write, including any list that was seeded.
  • rollback-operation restores the option exactly, then drops the cached dynamic CSS again so the page regenerates it.
  • One call with several keys is one snapshot and one rollback.

GeneratePress limits and opt-ins

  • Writes are off until the site turns on the wpmcp_enable_theme_write filter.
  • Only the allowlisted keys can be written: seven palette colors, six general colors, body and heading typography, container width, and the header, navigation and footer layout settings.
  • Typography takes a font family name and a body size. It does not load Google Fonts or set weights or line heights.
  • The footer widget setting accepts only 0 to 5 columns, and the container width only whole numbers from 300 to 3000.

Free or Pro: The GeneratePress settings pack is part of WP MCP Pro. It runs against the free GeneratePress theme and does not need GP Premium, because it writes the generate_settings option the free theme reads. The pack appears only while GeneratePress or a child theme is active, and writes still need the site opt-in. GP Premium Elements are handled by separate Pro operations.

Part of WP MCP Pro

The GeneratePress integration is part of WP MCP Pro.

One Pro licence unlocks the GeneratePress tools and every other Pro integration on this site: Elementor deep editing, the other page builders, the forms adapter pack and more, 133 Pro tools in all. The free plugin still covers the rest of WordPress and the full snapshot and undo engine, so you can try the safety model before you buy.

Frequently asked

GeneratePress MCP: questions, answered.

Does the GeneratePress integration need GP Premium?

No. The pack writes the generate_settings option the free theme reads.

Which palette colors can be set?

The seven slugs of the default palette: contrast, contrast-2, contrast-3, base, base-2, base-3 and accent. Each is found by slug inside global_colors, and a missing one is created. Color values can be hex, rgb or rgba. Custom palette slugs outside these are not on the allowlist.

Why does a single write touch the whole palette list?

GeneratePress replaces a default list with a stored one instead of merging, so a one-entry list would drop the other colors. WP MCP writes the full default list into the option first, then changes the entry you asked for. The snapshot holds the state before that seeding.

Does the GeneratePress integration clear caches?

It deletes the generate_dynamic_css_output and generate_dynamic_css_cached_version options, as the theme's own reset does, so the next view rebuilds the stylesheet. This also runs after a rollback. A separate page cache or CDN is not purged by this step.

Is there an AI agent for GeneratePress?

Yes, through WP MCP rather than GeneratePress itself. An agent you choose, such as Claude or Cursor, can read and set the global color palette by slug. WP MCP is a separate plugin, not a built-in AI feature of GeneratePress. On the undo side: The generate_settings option is snapshotted before every write, including any list that was seeded.

Point your AI at GeneratePress.