Error: “Block type is not registered” when your AI assistant adds blocks
When your AI assistant adds or creates content through Block MCP, a call can fail with a message like this one:
Block API Error (400): Block type "uagb/container" is not registered.The code that comes with it is invalid_block. This guide shows how to find every block that causes it and how to register the ones that a plugin adds only in the block editor, so your assistant can add them.
Blocks registered only in the block editor #
Block MCP checks each block in a call against the list of blocks registered on your site’s server. Some plugins register some of their blocks only in the block editor’s JavaScript, so those blocks are missing from that list. They work in the editor and on your pages, and Block MCP still refuses them.
Spectra Legacy (Brainstorm Force) is one such plugin. In its versions 2.20.3 and 2.20.7, 53 of its 66 blocks are registered only in the editor, among them Container (uagb/container), Info Box (uagb/info-box), and Heading (uagb/advanced-heading).
One of these blocks makes the whole call fail, even when it sits inside another block, and nothing in the call is saved. These tools refuse it:
insert_blockscreate_post, when it gets the page asblocksreplace_block_rangeandrewrite_post_blocksedit_block_tree, when it inserts the block (insert-child) or puts it in place of another block (replace-block)
Your assistant can still work with blocks like these that are already on a page:
get_page_blocksreads them.update_blockchanges them and the blocks inside them.edit_block_treemoves or duplicates them, and adds core blocks inside them.
No Block MCP setting lets these blocks through. Giving the plugin’s blocks a higher score under Which blocks AI should prefer, in the Advanced section of the Permissions & Blocks tab, doesn’t change it either.
Find the blocks your assistant can’t add #
Each error shows the name of one block. To find them all at once, ask your assistant to compare a page that uses the plugin’s blocks with the list of blocks Block MCP accepts. For example:
Read the blocks on https://example.com/visit-us/ with get_page_blocks, then call list_block_types for the block types whose names start with uagb/, and tell me which block names on the page are missing from that list.If your error names another plugin’s block, use the start of its name, up to the slash, in place of uagb/.
A name on the page that’s missing from the list usually belongs to a block that its plugin registers only in the editor. It can also belong to a plugin that’s turned off or was deleted, since the server lists only the blocks of active plugins. Before you register any name, check which case you have:
- Go to Plugins and check that the plugin that adds the block is installed and active.
- Open the page in the block editor. When the plugin isn’t active, the block shows a notice that your site doesn’t include support for the
uagb/containerblock, in place of its content.
If the plugin is active and its blocks show as usual in the editor, the missing names are blocks registered only in the editor.
Register the blocks on the server #
Add this code to your site, with the block names you found in place of the three in the list. Try it on a staging copy of your site first.
/**
* Registers blocks that a plugin adds only in the block editor, so Block MCP can write them.
* Put the block names from the error in the list.
*/
add_action( 'init', function () {
foreach ( array( 'uagb/container', 'uagb/info-box', 'uagb/advanced-heading' ) as $name ) {
if ( ! WP_Block_Type_Registry::get_instance()->is_registered( $name ) ) {
register_block_type( $name );
}
}
}, 20 );Note: Adding custom PHP code snippets to your website explains where to add this code.
The code adds each name to the server’s list, unless the name is on the list already. After that, the tools above accept these blocks, along with the blocks inside them, and list_block_types includes them. The plugin’s own code still runs the blocks in the editor, so they keep their settings there, and your pages look the same as before.
Have your assistant copy an existing block #
list_block_types shows no settings for blocks registered this way, so your assistant can’t learn from it what a block needs. Ask it to read a page that already has the same block, with get_page_blocks, and to copy that block’s attributes and HTML. For example, the block editor showed Spectra’s layout picker in place of a Container’s content when the Container was written without Spectra’s own attributes.
After your assistant adds a block, open the page in the block editor and click the block. The sidebar should show the block’s name and the plugin’s own settings for it. Then preview the page.

Warning: With the default Dedicated Block MCP account, Block MCP saves only the HTML that WordPress lets that account save, the same as for any user who can’t post unfiltered HTML. An inline SVG icon, a <style> element or an <iframe> in a block’s HTML is removed, and the call still reports success. A Spectra Info Box then shows without its icon, and a Custom HTML block that held an SVG or an embed is saved empty. To put a Spectra icon back, open the page in the block editor as an administrator: Spectra’s block recovery redraws it, and saving the page keeps it.
Add raw block markup instead #
You can also send a whole page to create_post as raw block markup, in its content field. Block MCP saves that markup without checking the block names in it, and get_page_blocks reads the blocks back afterwards. The HTML filter in the warning above applies to it too.
No other tool takes raw markup, so this works only for a new post or page. Open the new page in the block editor and preview it before you publish it.