MCP (Model Context Protocol)

MCP (Model Context Protocol) is the standard way for AI assistants to use tools. With AI Engine, it works in two directions:

  • Your WordPress as an MCP server: Claude, ChatGPT, Claude Code or any other AI assistant connects to your site and can read, write and manage it through the tools AI Engine exposes.
  • Your chatbots using remote MCP servers (Orchestration): a chatbot in AI Engine connects to an MCP server somewhere else (another site, a third-party service) and uses its tools during the conversation.

WordPress MCP Server

The MCP server is free and fully available in the free version of AI Engine: the connection, the sign-in (OAuth), read-only access, Editor Access and the WordPress tools. The connection is direct, with no relay in between, and your credentials stay on your site. Pro adds more tool sets, MCP Logs and Orchestration (see below).

Turn it on in Modules > MCP & Agents > MCP. Everything else happens in Settings > MCP.

Connect an AI assistant

The Connect an AI assistant card at the top of the MCP settings does most of the work. It first checks that your host lets AI assistants reach your site (“Your site is ready to connect”), and if something blocks them, it tells you what and gives you a message for your host. Then pick Claude, ChatGPT, Claude Code or Other and follow the steps. For Claude, Open Claude, already filled in opens Claude with your site’s connector ready, so there is nothing to copy. The card turns to Connected as soon as the assistant signs in.

Connect an AI assistant card in the AI Engine MCP settings

Each assistant has its own article with the details:

  • Claude: Claude Desktop and claude.ai, through a custom connector or Claude’s directory.
  • ChatGPT: the official app, or a custom plugin in Developer mode.
  • Claude Code: control your WordPress site from your terminal.
  • OpenClaw: give your AI agent access to your WordPress site.

Something not working? Read MCP Connection.

Sign-in and access

Claude, ChatGPT and most assistants sign in with OAuth: you paste the MCP URL (https://yoursite.com/wp-json/mcp/v1/http), and the assistant opens an authorization page on your site. You must be logged in to WordPress in that browser. There you choose the access and click Approve:

  • Full access: the app can read, create, edit and delete, within what your account can do.
  • Read-only: the app can look at your site, but cannot change anything. It only sees the tools that read.
AI Engine authorization page with Full access and Read-only choices

Every action then runs as the WordPress account that approved it. By default only administrators can approve. Turn on Editor Access to let Editors connect with their own account, for content only: reading, and writing or editing the posts, pages, media, categories and comments they can already edit in WordPress. Settings, users, plugins, themes and deleting stay with administrators.

Tools that cannot sign in through a browser (scripts, custom integrations, and Claude Code if you prefer) can use the Bearer Token instead. It is one shared secret, it acts as an administrator, and its Access Level (Admin, Read-Write or Read-Only) decides which tools it can use. Keep it secret.

Connections

Every app that signed in with OAuth is listed under Connections, one row per user and app, with its access (Full access, Content only for an Editor, or Read-only). Make read-only and Allow changes switch a connection between the two, and the trash button revokes it: the app has to sign in again. Connections using the Bearer Token are not listed, since they never sign in.

Connections block listing an authorized app with its access level

Undo and change history

Every change an assistant makes through MCP is recorded with what it replaced, and kept 30 days: posts and their blocks, custom fields, categories and tags, menus, CSS and site styles, settings and users. With Pro, also Elementor pages, plugin activations, theme switches and WooCommerce products.

  • In the MCP tab: each row of Recent Changes has an Undo button. A row that groups several edits to the same item undoes them all. History opens the full list, which you can filter by assistant or by tool.
  • By asking: tell your assistant “undo what you just did”, or ask it to list its recent changes and undo one. Editors can only undo their own changes.

Undo never erases newer work. If the item was edited again after the assistant (by you or by someone else), the undo stops and the row says Changed since. In History, Undo anyway is there when you really want to go back. An undo can itself be undone.

A few changes can’t be undone, and History marks them so: anything deleted for good, new users, files edited in plugins and themes, SQL queries, and WooCommerce order statuses (changing them sends emails and moves stock, so change them back from the order).

Ask before deleting, and Drafts Only

In the MCP tab, Access > Settings has two more guards:

  • Ask Before: Never, Deleting (the default on new sites), or Deleting and site changes (settings, plugins, themes, users, files and SQL). When an assistant tries one of these, nothing happens yet: it gives you a link, and the request appears in the MCP tab under Waiting for You, in plain words, with Approve and Decline. Once you approve, tell the assistant: it sends the same request again and it runs once. Requests wait an hour for your decision, and an approval is good for 15 minutes. Edits that can be undone never ask.
  • Drafts Only: assistants create and edit drafts, but never publish, schedule, or change what is live. You publish.

MCP Settings

This block holds the MCP switch with your endpoint URL, Editor Access, and four sections:

  • How it works: a short reminder of OAuth and Bearer Token.
  • Connection Test: probes your own endpoints the way Claude does, to see if your host or CDN blocks them.
  • Logging: records every tool call in Insights > MCP Logs (needs the Insights module, Pro), optionally with arguments and results.
  • Bearer Token: the token, its Access Level, and ready-to-copy Claude Code commands.
MCP Settings block with MCP and Editor Access options

Tools

Choose what your AI can do in MCP Tool Sets. Each set shows how many tools it brings:

  • WordPress (free, on by default): posts and pages (edited block by block, so long pages stay intact), media, comments, users, taxonomies, menus, Additional CSS and site styles, block patterns, editor notes and WordPress settings, plus image generation and vision. SEO titles, descriptions, focus keywords, canonical URLs, noindex and social previews are written in the SEO plugin you already use: Yoast SEO, Rank Math, All in One SEO, SEOPress, The SEO Framework, Slim SEO or SEO Engine. With Advanced Custom Fields active, your assistant can also read and fill in ACF fields. On block themes, it can edit the header, footer and templates; on classic themes, the widgets of each sidebar. To finish its work properly, it can also check a page as visitors see it, read the PHP error log, cron and Site Health, flush caches and permalinks, and restore an earlier revision of a post. It can also moderate comments in bulk, share a draft through a preview link that works without an account (it expires, and is never indexed), manage redirects with the Redirection plugin, and read form entries from Contact Form 7 (with Flamingo), Fluent Forms and Ninja Forms.
  • Plugins and Themes (Pro): install, activate, switch and update, and read and edit their files, so your AI can build or fix a plugin or a theme.
  • Database (Pro): run SQL queries on the WordPress database.
  • Elementor (Pro): read Elementor pages as an outline and change one element at a time (text, settings, insert, delete), saved through Elementor with a revision.
  • Beaver Builder (Pro): read Beaver Builder pages as an outline, change a module’s text or settings, replace text, or remove a module, saved through Beaver Builder. Page Builder by SiteOrigin brings its own tools, which appear with Abilities on, and AI Engine adds undo to them. Pages built with WPBakery, Avada (Fusion Builder) or older Divi 4 pages (shortcodes) are read as an outline and edited piece by piece (free, shown when one of them is active); Divi 5 pages are blocks, edited with the block tools.
  • Polylang, WPML and WooCommerce (Pro): available when the plugin is installed. For WooCommerce: products and their variations (sizes, colors…), coupons, orders, stock, customers and reviews.
MCP Tool Sets with WordPress, Plugins, Themes, Database, Polylang, WPML and WooCommerce

Under From WordPress, two more options expose standard WordPress interfaces as they are. Abilities turns the abilities other plugins register through the WordPress Abilities API (WooCommerce, Easy Digital Downloads, and more) into MCP tools, each keeping its own permission checks. Dynamic REST gives raw access to the WordPress REST API; it is more technical, so only use it if you need it.

Other plugins can add their own tools too. With SEO Engine, Social Engine, Code Engine or Media Cleaner installed, your assistant can also use their tools (for example, scan your posts for SEO and get their scores). MCP Tools & Abilities lists every tool that is on, grouped by plugin.

MCP Tools and Abilities list with tool counts per plugin

After changing the tools, refresh them in your assistant so it sees the new list: Refresh in ChatGPT’s plugin page, or reconnect in Claude.

If you are a developer, you can add your own tools or make your plugin compatible with MCP through AI Engine: read this documentation.

Do I need the MCP Adapter or the WordPress AI plugin?

No. AI Engine has its own MCP server, with tools written for AI assistants (clear parameters, short answers, safety hints), OAuth for Claude and ChatGPT, and per-user access, so there is nothing else to install. The MCP Adapter is the official WordPress bridge that turns the abilities other plugins register into MCP tools. If you already run it, both live side by side on different endpoints, and the Abilities option lets AI Engine’s own server expose those abilities too.

MCP Orchestration

Orchestration (Pro) lets your chatbots use tools from remote MCP servers during a conversation. Think of it as Function Calling, but with tools that someone else already built and hosts. You can even connect another WordPress site running AI Engine. Not sure which one you need? Read Should I use Functions or MCP?

First, turn on Orchestration in Modules > MCP & Agents. A new Orchestration section appears in Settings.

Orchestration option in the MCP and Agents modules

In Settings > Orchestration, add your servers under MCP Servers: a Name, the URL (it must start with https://) and, if the server needs one, a Token. To try it, you can use https://remote.mcpservers.org/fetch/mcp, a free server with no authentication that fetches web pages and turns them into Markdown.

MCP Servers settings with a remote Fetch server

Then open your chatbot and select the servers it may use in its MCP Servers section. Their tools are fetched and offered to the model, just like functions.

MCP Servers section in the chatbot settings

If you don’t see the MCP Servers section, check the chatbot’s model: pick an actual OpenAI or Anthropic model (not “Default” or “None”), since only those can use remote MCP servers.

Manage MCP access (developers)

MCP can do a lot on your site, so access is strict by default:

  • An OAuth connection acts as the user who approved it. Only administrators (users who can manage_options) can approve, plus Editors when Editor Access is on. Anyone without manage_options gets a content-only session, where each call is checked against what that user can do in WordPress.
  • The Bearer Token acts as an administrator, limited by its Access Level. When a token is set, requests without a valid token or OAuth sign-in are refused.

Three filters let you go further. To let other users approve connections (they get the same content-only session as Editors), use mwai_mcp_oauth_user_can_authorize:

<?php
// Let authors connect an AI assistant with their own account (content only)
add_filter( 'mwai_mcp_oauth_user_can_authorize', function( $allowed, $user_id ) {
  if ( $allowed ) {
    return true;
  }
  return user_can( $user_id, 'publish_posts' );
}, 10, 2 );

mwai_allow_mcp is the final yes or no for each request to the MCP endpoint. Hook it after AI Engine’s own check (priority 20 or more), when the connected user is known:

<?php
// Only these WordPress users may use MCP, even among administrators
add_filter( 'mwai_allow_mcp', function( $allow, $request ) {
  $allowed_users = [ 1, 5, 42 ];
  return $allow && in_array( get_current_user_id(), $allowed_users, true );
}, 20, 2 );

To refuse specific tools, use mwai_mcp_callback with a priority lower than 10, so your check runs before the tool itself. Use the real tool names, listed in MCP Tools & Abilities:

<?php
// Nobody but user 1 may change WordPress options or create users through MCP
add_filter( 'mwai_mcp_callback', function( $result, $tool, $args, $id, $mcp ) {
  $protected = [ 'wp_update_option', 'wp_create_user', 'wp_update_user' ];
  if ( in_array( $tool, $protected, true ) && get_current_user_id() !== 1 ) {
    // This code makes MCP Logs show the call as denied.
    throw new Exception( "The tool '{$tool}' is not allowed for this account.", Meow_MWAI_Labs_MCP::DENIED_CODE );
  }
  return $result;
}, 5, 5 );