Flatsome MCP tools
Available in EMCP 3.21.3. EMCP Pro builds with Flatsome Site Builder through its own block schemas, validator and serializer. Pages are stored as native WordPress blocks, and writes are recorded in History with conflict-aware undo. Classic Flatsome and UX Builder shortcodes are a different product and are not supported.
Requirements and setup
Section titled “Requirements and setup”- Check installed versions. Flatsome Site Builder and the Flatsome Block Theme 1.0.0-beta.7 or later, or a child of that theme. EMCP Pro is required.
- Select the builder. Open EMCP Tools → Page Builders, pick the Flatsome card under 1. Standalone builder and choose Save changes in the save bar. A card marked Not detected cannot be picked.
- Switch on its tools. Open EMCP Tools → Tools and select the Flatsome tab, which appears once the builder is saved. All seven builder writes and
flatsome-theme-writestart disabled. - Connect and inspect. Reconnect your MCP client, then read context and schemas. Start with a draft and inspect it in Flatsome Builder.
Native workflow
Section titled “Native workflow”Author {blockName, attrs, innerBlocks} objects. Text belongs in each block’s attributes: a heading uses content and level, a button uses text and url. Responsive values use lg, md and sm. A schema can exist while its block is unavailable, and WooCommerce blocks need WooCommerce and the native module.
create-page makes a draft. Check a tree with validate-page, save a full replacement with set-page-tree and replace_all: true, then use patch-page for later changes with the expected_hash from get-page. Publishing is a separate publish-page call.
flatsome/grid is discovery-only, because it throws in the native editor. Use flatsome/banner-grid, or row and col, for editable grids.
Safe writes and undo
Section titled “Safe writes and undo”Every write needs an operation_id UUID. After a lost response, retry the same UUID with identical input and a completed write returns its original result. Updates need a fresh expected_hash, which covers metadata and referenced resources.
Successful writes return a change_id for History. Force can skip a version conflict on an update, but it cannot remove later work, bypass permissions or an editor lock, or restore a missing reference.
Child themes
Section titled “Child themes”A child of the Flatsome Block Theme is supported. flatsome-get-context names the child as theme and flatsome-theme as parent_theme. Templates, parts and global styles belong to the active theme, so name that theme in a core/template-part block’s theme attribute, or leave it out. An undo made under another theme answers inactive_theme and names it, and a page assigned to a child template cannot be written under the parent.
Tool reference
Section titled “Tool reference”All names use the emcp-tools/ namespace. Read the live input schema for optional fields, enums and limits; this table lists required inputs only.
| Tool | Access | Purpose | Required inputs |
|---|---|---|---|
flatsome-get-context | Read | Read qualified versions, limits, storage and responsive contract. | None |
flatsome-list-blocks | Read | Discover runtime registration, authored schemas, dependencies and writable support. | None |
flatsome-get-block-schema | Read | Read complete native attributes, supports, defaults and nesting rules before authoring. | name |
flatsome-get-block-supports | Read | Read support names or one support with responsive and global-style eligibility. | None |
flatsome-list-pages | Read | List editable pages and posts with correct scoped pagination. | None |
flatsome-get-page | Read | Read native markup, block tree, snapshot paths and dependency-aware expected_hash. | post_id |
flatsome-create-page | Write | Create a native draft. Reuse operation_id with identical input after a lost response. | title, operation_id |
flatsome-validate-page | Read | Validate and serialize without saving. Native text belongs in attributes, not invented HTML wrappers. | tree |
flatsome-set-page-tree | Write | Explicitly replace all content with native blocks; preserve status and settings. | post_id, expected_hash, operation_id, tree, replace_all |
flatsome-patch-page | Write | Apply a batch to original snapshot paths. Objects merge, lists replace, null unsets, omitted fields remain. | post_id, expected_hash, operation_id, operations |
flatsome-update-page-settings | Write | Update title or slug. Empty title clears it; publication and template assignment are separate. | post_id, expected_hash, operation_id |
flatsome-publish-page | Write | Publish this document using its native post-type capability. | post_id, expected_hash, operation_id |
flatsome-list-patterns | Read | List registered patterns and editable saved WordPress patterns. | None |
flatsome-get-pattern | Read | Read a saved pattern by post_id or registered pattern by name. | None |
flatsome-create-pattern | Write | Create a published reusable WordPress pattern. Choose synced or detached behavior at insertion. | title, tree, operation_id |
flatsome-insert-pattern | Write | Insert a saved pattern reference or detached copy after a read-scoped path. | post_id, expected_hash, operation_id, pattern_id, synced, path |
flatsome-theme-read | Read | Read theme operations, passed as {operation, arguments}. | operation |
flatsome-theme-write | Write | Run theme write operations, passed as {operation, arguments}. | operation |
Theme read operations: get-context, get-global-styles, get-style-schema, list-templates, get-template. Theme write operations: patch-global-styles, create-template, create-template-part, patch-template, assign-template, reset-template. The theme tools work with another builder selected, and they never edit template files.
Boundaries
Section titled “Boundaries”Forms delivery and submissions, orders and payments, module activation, SEO settings, credentialed integrations, icon-library installation and Classic migration are outside this integration. Arbitrary SQL and low-level writers that bypass WordPress are outside its write coordination.
