Uncode MCP tools
Available in EMCP 3.22.0. On sites running the Uncode theme, EMCP Pro builds pages and Content Blocks from Uncode’s own elements and Wireframes sections, and reads and changes Uncode’s theme options. Pages go through the WPBakery tools; theme options and Wireframes go through uncode-read and uncode-write.
Requirements and setup
Section titled “Requirements and setup”- Check installed versions. Uncode and Uncode Core 2.12.8 or later, or a child of the Uncode theme, with Uncode’s WPBakery Page Builder. Uncode Wireframes is needed for Wireframes sections. EMCP Pro is required.
- Select WPBakery. Open EMCP Tools → Page Builders, pick the WPBakery card and choose Save changes.
wpbakery-get-contextthen reportspack: uncode. - Switch on the tools you need. Open EMCP Tools → Tools.
uncode-readis on by default;uncode-writeand the WPBakery write tools start disabled. - Connect and inspect. Reconnect your MCP client, then call
uncode-readwithget-context, andwpbakery-get-context, which lists the editable elements.
Building pages from Wireframes
Section titled “Building pages from Wireframes”uncode-read list-wireframeslists sections, filtered bycategoryorsearch, with whether each is ready to insert on this site.uncode-read get-wireframe { slug }returns the section’s content with Uncode’s placeholders resolved.- If it answers
needs_prepare, the site does not have Uncode’s placeholder images, demo forms or menus yet.uncode-write prepare-wireframes { confirm: true }runs Uncode’s own import once. It needsmanage_optionsand cannot be undone from History, so agents ask first. - Create a draft with
wpbakery-create-page, then insert the sections withwpbakery-set-page-content, or one section withwpbakery-replace-fragment. Every write needs theexpected_hashfrom the last read. - Change the text inside each section and keep its attributes. Publish with
wpbakery-publish-page.
A Wireframe that lists not_editable elements uses an element the tools cannot write yet and cannot be inserted.
Uncode elements
Section titled “Uncode elements”While Uncode is active, the WPBakery tools accept the 39 elements Uncode provides and refuse the ones Uncode removes: vc_btn, vc_video, vc_text_separator and the vc_tta_* tabs. Use vc_button, uncode_index and Uncode’s vc_tabs and vc_accordion instead.
- Root containers are
vc_section(optional) holdingvc_row, thenvc_column, orvc_row_innerandvc_column_innerfor nested columns. - Text is the shortcode body of
vc_custom_heading,vc_column_text,vc_buttonand similar elements. Headings take inlineuncode_hl_text,uncode_rotating_textanduncode_inline_image. uncode_block { id }embeds a published Content Block, except inside another Content Block.- Only attributes that Uncode’s element map or its Wireframes use are accepted;
wpbakery-get-element-schemalists them.
Content Blocks are edited like pages: create one with wpbakery-create-page and post_type: uncodeblock.
Theme options
Section titled “Theme options”uncode-read list-option-sections lists the sections. get-options with { section } or { ids: [] } returns values with their label, type and allowed values. Colour options also return the site’s palette as palette (id and name) and choices; use those ids in options and in element attributes.
uncode-write update-options { changes: { id: value }, operation_id: "<new UUID>" } changes options:
- Values are checked by type, and one refused value refuses the whole call.
- The theme’s CSS is rebuilt and checked after each write.
css_unverifiedmeans the change was saved but the stylesheets could not be confirmed;css_failedmeans EMCP put the settings back because the files could not be written. - Use a new UUID for each change and the same UUID only to retry it. A retry never writes twice, and answers
conflictif an administrator changed those settings since. - Every change can be undone from History.
Not written here: .htaccess and portfolio permalink settings, list-type settings and the header layout picker, whose choices exist only in wp-admin. Change those in Uncode’s Theme Options screen. Per-page Uncode settings (page options) are not written either.
Tool reference
Section titled “Tool reference”All names use the emcp-tools/ namespace. The page tools are listed in the WPBakery tool reference.
| Tool | Access | Operations |
|---|---|---|
uncode-read | Read | get-context, list-option-sections, get-options, get-option-schema, list-wireframes, get-wireframe |
uncode-write | Write | update-options, prepare-wireframes |
Pass operations as { operation, arguments }; call either tool with no operation for the list.
