How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

From Abilities to AI Agents: Introducing the WordPress MCP Adapter

calendar_today February 4, 2026 person Jonathan Bossenger domain wordpress

The Abilities API introduced in WordPress 6.9 makes it possible to register WordPress functionality that is standardized, discoverable, typed, and executable. It provides a solid foundation on which WordPress developers can build and extend across the WordPress ecosystem.

It’s also a major step in making WordPress ready for AI automation and workflows. With Abilities, WordPress is positioned to take advantage of any current and future developments in Generative AI.

One of the biggest of these recent developments is the Model Context Protocol, or MCP.

With MCP, it’s possible to provide additional context to the models which power AI tools. Let’s say you were using an AI tool to help you draft a report of all sales on your WordPress powered ecommerce site. Imagine if it was possible to give the AI secure access to all your orders for the year. If WordPress supported MCP, it would be.

Fortunately, the Core AI team has already thought of this, with the release of the MCP Adapter. This adapter implements the Model Context Protocol in the scope of a WordPress site and lets AI tools (like Claude Desktop, Claude Code, Cursor, and VS Code) discover and call WordPress Abilities directly.

So let’s dive into the MCP Adapter. In this post, you’ll learn:

  • How to install and use the MCP Adapter in your WordPress plugins.
  • How to expose existing abilities as MCP tools, with practical examples.
  • How to connect popular AI clients to your WordPress-enabled MCP sites, whether local development environments or publicly accessible installs, to interact with your custom MCP tools.
  • What security considerations you need to be aware of.
  • How to start experimenting with the MCP adapter right away.

Quick recap: Abilities as the foundation

If this is the first time you’re reading about WordPress Abilities, it might be worthwhile to read the Introducing the WordPress Abilities API post. However, if you don’t have the time to read that, here’s a quick recap.

The Abilities API gives WordPress a first-class, cross-context functional API that standardizes how core and plugins expose what they can do.

You define an ability once with:

  • A unique name (namespace/ability-name)
  • A typed input schema and output schema
  • A permission_callback that enforces capabilities
  • An execute_callback that performs the actual functionality

The functionality triggered in the execute_callback can be anything from fetching data, updating posts, running diagnostics, or any other discrete unit of work.

Once registered, that ability is discoverable and executable from PHP, JavaScript, and the REST API.

WordPress 6.9 ships with 3 default abilities:

  • core/get-site-info: Returns site information configured in WordPress. By default, returns all fields, or optionally a filtered subset.
  • core/get-user-info: Returns basic profile details for the current authenticated user to support personalization, auditing, and access-aware behavior.
  • core/get-environment-info: Returns core details about the site’s runtime context for diagnostics and compatibility (environment, PHP runtime, database server info, WordPress version).

While only a small set of Core Abilities, they provide a foundation you can use to test the MCP adapter.

What is the WordPress MCP Adapter?

The WordPress MCP Adapter is an official package in the AI Building Blocks for WordPress initiative. Its job is to adapt Abilities registered by the Abilities API into the primitives supported by the Model Context Protocol (MCP) so that AI agents can discover and execute site functionality as MCP tools and read WordPress data as MCP resources.

In practice, this means: if your code already registers abilities, you are one step away from letting an AI agent use them.

A primer on MCP tools, resources, and prompts

The Model Context Protocol organizes interactions into three main primitives: tools, which are executable functions the AI calls to perform actions; resources, which are passive data sources (like files or database rows) the AI reads for context; and prompts, which are pre-configured templates to guide specific workflows.

With the MCP adapter, Abilities are generally exposed as tools because they represent executable logic—fetching data, updating posts, or running diagnostics. However, the adapter is flexible: if an Ability simply provides read-only data, such as a debug log or a static site configuration, it can also be configured as a resource, allowing the AI to ingest that information as background context without needing to actively “call” it.

Installing the MCP Adapter

The quickest way to get started with the MCP Adapter is to download and install it as a plugin from the Releases page of the GitHub repository.

Once the plugin is installed and activated, it will register a default MCP server named mcp-adapter-default-server, and three custom abilities.

  • mcp-adapter/discover-abilities
  • mcp-adapter/get-ability-info
  • mcp-adapter/execute-ability

These abilities are also automatically exposed as MCP tools:

  • mcp-adapter-discover-abilities
  • mcp-adapter-get-ability-info
  • mcp-adapter-execute-ability

These three tools offer AI agents a layered approach to accessing WordPress Abilities. Agents can discover which Abilities are available, get ability information, and execute abilities.

Enabling Abilities for the MCP Adapter default server

By default, Abilities are only available via the MCP Adapter default server if they are explicitly marked as public for MCP access. For this, you need to add a meta.mcp.public flag to the ability registration arguments when you register your ability with wp_register_ability().

'meta' => array(
    'mcp' => array(
        'public' => true,  // Required for MCP default server access
    ),
)

In the case of any Core Abilities, you can hook into the wp_register_ability_args filter to update their registration arguments to include the meta.mcp.public flag.

<?php
/**
 * Plugin Name: Enable core abilities
 * Version: 1.0.0
 *
 * @package enable-core-abilities
 */

add_filter( 'wp_register_ability_args', 'myplugin_enable_core_abilities_mcp_access', 10, 2 );
/**
 * Enable MCP access for core abilities.
 *
 * @param array  $args        Ability registration arguments.
 * @param string $ability_name  Ability ID.
 * @return array Modified ability registration arguments.
 */
function myplugin_enable_core_abilities_mcp_access( array $args, string $ability_name ) {
    // Enable MCP access for the three current core abilities.
    $core_abilities = array(
        'core/get-site-info',
        'core/get-user-info',
        'core/get-environment-info',
    );
    if ( in_array( $ability_name, $core_abilities, true ) ) {
        $args['meta']['mcp']['public'] = true;
    }

    return $args;
}

With this in place, you can start connecting AI clients to your WordPress site via the MCP Adapter and start calling these core abilities via the default server’s MCP tools.

Connecting AI applications

Transport methods

To communicate with a WordPress site that’s enabled as an MCP server, there are two transport mechanisms: STDIO and HTTP. Which one you use is generally decided by where the WordPress site is located.

For local WordPress development environments, the most straightforward way to connect is using STDIO transport. The MCP Adapter makes this possible via WP-CLI, so you need to have WP-CLI installed locally.

For the STDIO transport, at minimum you need to configure the following to connect to your MCP enabled WordPress site:

   "wordpress-mcp-server": {
      "command": "wp",
      "args": [
        "--path=/path/to/your/wordpress/installation",
        "mcp-adapter",
        "serve",
        "--server=mcp-adapter-default-server",
        "--user={admin_user}"
      ]
    }
  • the server name in this case is wordpress-mcp-server. This can be any name you choose.
  • the command is wp, which is the WP-CLI command-line tool
  • the args array includes:
  • --path pointing to your WordPress installation
  • mcp-adapter serve to start the MCP Adapter server
  • --server specifying the MCP server to use (in this case, the default server)
  • --user specifying the WordPress user to authenticate as (in this case the admin user)

For any publicly accessible WordPress installations, or if you don’t want to use STDIO, you can set up an HTTP connection using the @automattic/mcp-wordpress-remote remote proxy. This requires you to have Node.js installed on your computer, and to set up authentication using either WordPress application passwords or a custom OAuth implementation.

If you’re using the HTTP transport, your minimum configuration should look like this:

   "wordpress-mcp-server": {
      "command": "npx",
      "args": ["-y", "@automattic/mcp-wordpress-remote@latest"],
      "env": {
        "WP_API_URL": "https://yoursite.example/wp-json/mcp/mcp-adapter-default-server",
        "WP_API_USERNAME": "{admin_user}",
        "WP_API_PASSWORD": "{application-password}"
      }
    }
  • the server name stays the same
  • the command is npx, which executes Node.js packages
  • the args array includes:
  • -y to automatically agree to install the package
  • @automattic/mcp-wordpress-remote@latest to use the latest version of the remote MCP proxy package
  • the env object includes:
  • WP_API_URL pointing to the MCP endpoint on your WordPress site
  • WP_API_USERNAME specifying the WordPress user to authenticate as
  • WP_API_PASSWORD specifying the application password for the user

For local WordPress installations connecting via the HTTP remote proxy, the mcp-wordpress-remote package includes some troubleshooting tips if you run into any issues connecting. Usually, these issues are related to having multiple versions of Node.js installed or issues related to local SSL certificates.

App-specific configurations

Now let’s look at where to configure your MCP server in the most popular AI applications, Claude Desktop, VS Code, Cursor, and Claude Code.

Note: For all the examples below, I’m using a Studio site named ‘WordPress MCP’ located at /Users/jonathanbossenger/Studio/wordpress-mcp and browsable via http://localhost:8885/, with an admin user named admin. Make sure to replace these values with your own WordPress site path and user.

Claude Desktop

Being an Anthropic product, Claude Desktop was one of the first apps with built-in support for MCP servers. To add MCP servers to Claude Desktop, navigate to the Developer tab (Claude Settings Developer). Under Local MCP servers click Edit config.

open_in_new Read original post