← Back to Home
🔧 Official WordPress

Setup MCP Adapter

The official WordPress MCP implementation using the Abilities API.

⚠️ Developer-Oriented Setup

The WordPress MCP Adapter is more complex than AI Engine. You'll need to:

  • Create a custom plugin to register your "abilities" (tools)
  • Understand the Abilities API architecture
  • Handle JWT token generation and management

Looking for something simpler? Try AI Engine →

1

Install the MCP Adapter

The MCP Adapter is available via npm or Composer:

Terminal
# Via npm (for remote connection)
npx @anthropic-ai/mcp-wordpress-remote

# Or via Composer (for server-side integration)
composer require wordpress/mcp-adapter

See the official repository for detailed installation instructions.

2

Generate a JWT Token

Go to Settings → WordPress MCP → Authentication Tokens and generate a new token.

Note: Tokens have limited validity (1-24 hours). You'll need to regenerate them periodically.
3

Create a Plugin to Register Abilities

The MCP Adapter doesn't come with built-in tools. You need to create a plugin that registers "abilities" — the tools your AI can use.

my-mcp-abilities/my-mcp-abilities.php
<?php
/**
 * Plugin Name: My MCP Abilities
 * Description: Register custom abilities for WordPress MCP
 */

add_action( 'init', function() {
    // Only if MCP Adapter is active
    if ( ! function_exists( 'register_ability' ) ) {
        return;
    }

    // Register a "list posts" ability
    register_ability( 'list_posts', [
        'label'       => 'List Posts',
        'description' => 'Get a list of blog posts',
        'callback'    => function( $args ) {
            $posts = get_posts( [
                'numberposts' => $args['limit'] ?? 10,
                'post_status' => 'publish',
            ] );
            
            return array_map( function( $post ) {
                return [
                    'id'    => $post->ID,
                    'title' => $post->post_title,
                    'date'  => $post->post_date,
                    'url'   => get_permalink( $post ),
                ];
            }, $posts );
        },
        'schema' => [
            'type' => 'object',
            'properties' => [
                'limit' => [
                    'type'        => 'integer',
                    'description' => 'Number of posts to return',
                    'default'     => 10,
                ],
            ],
        ],
    ] );

    // Register more abilities as needed...
} );

Each ability you want the AI to use must be explicitly registered. This gives you fine-grained control but requires more setup.

4

Configure Your AI Client

HTTP Transport
NPX (Claude Desktop)

For Claude Code, VS Code, or Cursor:

.mcp.json
{
  "mcpServers": {
    "wordpress": {
      "type": "http",
      "url": "https://yoursite.com/wp-json/wp/v2/wpmcp/streamable",
      "headers": {
        "Authorization": "Bearer YOUR_JWT_TOKEN"
      }
    }
  }
}

For Claude Desktop (requires Node.js):

claude_desktop_config.json
{
  "mcpServers": {
    "wordpress": {
      "command": "npx",
      "args": ["-y", "@automattic/mcp-wordpress-remote@latest"],
      "env": {
        "WP_API_URL": "https://yoursite.com/",
        "JWT_TOKEN": "your-jwt-token-here"
      }
    }
  }
}
5

Test Your Setup

Restart your AI client and verify the connection. Your registered abilities should appear as available tools.

📘 WordPress.com Users

If you're on WordPress.com (not self-hosted), you already have built-in MCP support!

  1. Go to wordpress.com/me/mcp
  2. Enable MCP for your sites
  3. Connect directly without any plugin installation

Understanding the Abilities API

🔮 Coming to WordPress Core

The Abilities API is planned for WordPress 6.9. Once merged, plugins can register abilities that work seamlessly with MCP.

🧩 Extensible by Design

Any plugin can register abilities. WooCommerce, Yoast, Gravity Forms — they can all add their own MCP tools.

🔐 Security First

Each ability can define required capabilities. Users only see tools they have permission to use.

📚 Documentation

See the GitHub repository for full API documentation.

MCP Adapter vs AI Engine

Setup Create custom plugin Set token, done
Built-in tools None (register your own) 15+ in free, 30+ in Pro
Best for Developers, custom integrations Everyone
Try the easier way →

Questions?

Check the official documentation or join the WordPress community