PHP fix. Our sites are patchedWhat to do
TopSyde
Abstract artwork of layered charcoal and navy paper shapes with thin gold edges

Control WordPress From Claude: MCP Server Setup Guide

Connect WordPress to Claude via MCP server: publish posts, manage content, and query site data in natural language. Setup guide with auth, scoping, and agency workflows.

Colton Joseph

Colton Joseph

Founder & Lead Developer

··19 min read

Last updated: October 13, 2026

A WordPress MCP server exposes what your site can do as structured tools that Claude can call directly. That means you can draft posts, update metadata, audit content, and query site data through natural language in Claude Desktop, Claude Code, or any MCP-compatible client, without writing a REST API wrapper yourself.

What Is a WordPress MCP Server?

A WordPress MCP server implements Anthropic's Model Context Protocol and translates Claude's tool calls into actions on your site. With the official MCP Adapter, that server runs inside WordPress as a plugin and answers at /wp-json/mcp/mcp-adapter-default-server. What Claude can do there is defined by abilities: discrete actions registered through the WordPress Abilities API, such as "get site info" or "create a draft post", each with an input schema and a permission check. The adapter handles authentication, the protocol handshake, and error translation back to Claude.

If you're not yet clear on MCP as a concept (what it is, how tool registration works, and why it matters for connecting AI to business systems), read our MCP explainer for product builders first. This post assumes you understand the protocol and focuses entirely on WordPress-specific implementation.


Available WordPress MCP Servers (Late 2026)

Start with the official option: the WordPress project maintains the MCP Adapter, available as the "MCP Adapter" plugin on WordPress.org. It needs WordPress 6.9 or newer and PHP 7.4 or newer, and it is tested up to WordPress 7.1. On a current WordPress 7.x site it is the one to use.

OptionRuns whereStatusWhat Claude can do
MCP Adapter (WordPress/mcp-adapter)Plugin inside WordPressOfficial, actively maintainedAny ability marked public, run as the connected user
wordpress-mcp plugin (Automattic)Plugin inside WordPressArchived September 2026; its README says not to use it for new installsSuperseded by MCP Adapter
Community REST wrappers on npm (wordpress-mcp, wp-mcp-server)Node.js on your computerSingle-maintainer packages, last released April 2025Whatever REST calls the author wrapped

The adapter's default server exposes three tools rather than one tool per action: mcp-adapter-discover-abilities lists the public abilities on your site, mcp-adapter-get-ability-info returns one ability's input schema, and mcp-adapter-execute-ability runs it. Claude discovers what is available, reads the schema, then executes. This keeps the tool list small no matter how many abilities your plugins register.

Two things follow from that design. First, abilities are private by default, and only those marked public in their metadata are reachable over MCP. Second, the adapter adds no abilities of its own beyond those three tools. Core ships a small set of read-only abilities (site, user, and environment info), plugins add more as they adopt the Abilities API, and for content workflows you will usually register a few of your own (Step 3 below).


How to Set Up WordPress MCP Server: Step by Step

Step 1: Install the MCP Adapter

In wp-admin, go to Plugins → Add New, search for "MCP Adapter", install it, and activate it. Or use WP-CLI:

wp plugin install mcp-adapter --activate

# Confirm the default server is registered
wp mcp-adapter list

mcp-adapter-default-server should appear in the list. Its HTTP endpoint is your Site Address from Settings → General followed by /wp-json/mcp/mcp-adapter-default-server.

Step 2: Create a WordPress Application Password

WordPress Application Passwords (introduced in WP 5.6) are the correct authentication mechanism here. Do not use your main admin password.

  1. Log in as an admin.
  2. Create a dedicated editor-level user first (see the security section below), for example mcp-editor.
  3. Edit that user, scroll to Application Passwords, enter a name you'll recognize later ("Claude on my laptop"), and click Add New Application Password.
  4. Copy the password immediately; it won't be shown again.

You now have the three values every client needs:

Site endpoint: https://yoursite.com/wp-json/mcp/mcp-adapter-default-server
Username:      mcp-editor
App password:  xxxx xxxx xxxx xxxx xxxx xxxx

The spaces are part of the format and can stay. If there is no Application Passwords section on the profile screen, the site is probably not served over HTTPS (WordPress hides the feature without it, except on local development sites) or a security plugin has turned it off.

Step 3: Register the Abilities Claude Will Use

Without abilities, Claude can connect but has nothing to do. Here is a small site-specific plugin that registers two: one read-only ability that lists posts and one that creates drafts. Note the 'mcp' => ['public' => true] metadata, which exposes each ability to MCP clients only:

<?php
/**
 * Plugin Name: Site MCP Abilities
 * Description: Content abilities exposed to MCP clients.
 */

add_action('wp_abilities_api_categories_init', function () {
    wp_register_ability_category('site-content', [
        'label'       => 'Site content',
        'description' => 'List and draft posts on this site.',
    ]);
});

add_action('wp_abilities_api_init', function () {
    wp_register_ability('site-content/list-posts', [
        'label'        => 'List posts',
        'description'  => 'Returns recent posts with ID, title, status, date and link.',
        'category'     => 'site-content',
        'input_schema' => [
            'type'       => 'object',
            'properties' => [
                'per_page' => ['type' => 'integer', 'minimum' => 1, 'maximum' => 50],
                'status'   => ['type' => 'string', 'enum' => ['publish', 'draft', 'pending', 'any']],
            ],
        ],
        'execute_callback' => function ($input) {
            $posts = get_posts([
                'numberposts' => $input['per_page'] ?? 10,
                'post_status' => $input['status'] ?? 'publish',
            ]);
            return array_map(fn ($post) => [
                'id'     => $post->ID,
                'title'  => get_the_title($post),
                'status' => $post->post_status,
                'date'   => $post->post_date,
                'link'   => get_permalink($post),
            ], $posts);
        },
        'permission_callback' => fn () => current_user_can('edit_posts'),
        'meta' => [
            'annotations' => ['readonly' => true],
            'mcp'         => ['public' => true],
        ],
    ]);

    wp_register_ability('site-content/create-draft', [
        'label'        => 'Create draft post',
        'description'  => 'Creates a draft post. Never publishes.',
        'category'     => 'site-content',
        'input_schema' => [
            'type'       => 'object',
            'properties' => [
                'title'    => ['type' => 'string', 'minLength' => 1],
                'content'  => ['type' => 'string'],
                'excerpt'  => ['type' => 'string'],
                'category' => ['type' => 'string', 'description' => 'Existing category name'],
            ],
            'required' => ['title'],
        ],
        'execute_callback' => function ($input) {
            $post_id = wp_insert_post([
                'post_title'   => sanitize_text_field($input['title']),
                'post_content' => wp_kses_post($input['content'] ?? ''),
                'post_excerpt' => sanitize_textarea_field($input['excerpt'] ?? ''),
                'post_status'  => 'draft',
                'post_author'  => get_current_user_id(),
            ], true);

            if (is_wp_error($post_id)) {
                return $post_id;
            }

            if (!empty($input['category'])) {
                $term = get_term_by('name', $input['category'], 'category');
                if ($term) {
                    wp_set_post_categories($post_id, [$term->term_id]);
                }
            }

            return [
                'id'        => $post_id,
                'edit_link' => get_edit_post_link($post_id, 'raw'),
            ];
        },
        'permission_callback' => fn () => current_user_can('edit_posts'),
        'meta' => [
            'annotations' => ['readonly' => false, 'destructive' => false],
            'mcp'         => ['public' => true],
        ],
    ]);
});

Every ability needs a registered category, and an ability with a missing or unregistered category fails without an error when WP_DEBUG is off, so check wp mcp-adapter list or ask Claude to list abilities after adding new ones. The permission_callback runs as the connected user on every call, which is what makes the editor-role scoping below effective.

Before writing your own, check whether a plugin you already run registers abilities for what you need. More plugins add Abilities API support with each release.

Step 4: Connect Claude

Claude Desktop. Open Settings → Developer → Edit Config to reach claude_desktop_config.json and add your site:

{
  "mcpServers": {
    "my-wordpress-site": {
      "command": "npx",
      "args": ["-y", "@automattic/mcp-wordpress-remote@latest"],
      "env": {
        "WP_API_URL": "https://yoursite.com/wp-json/mcp/mcp-adapter-default-server",
        "WP_API_USERNAME": "mcp-editor",
        "WP_API_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx"
      }
    }
  }
}

@automattic/mcp-wordpress-remote is a small helper that runs on your computer and passes Claude Desktop's requests to your site over HTTPS. It needs Node.js installed. Restart Claude Desktop, and the three MCP Adapter tools appear under the tools icon in a new conversation.

Claude Code. Claude Code connects over HTTP directly, so the helper isn't needed. Base64-encode username:app-password and pass it as a Basic auth header:

printf 'mcp-editor:xxxx xxxx xxxx xxxx xxxx xxxx' | base64 | tr -d '\n'

claude mcp add --transport http my-wordpress-site \
  https://yoursite.com/wp-json/mcp/mcp-adapter-default-server \
  --header "Authorization: Basic PASTE_THE_BASE64_HERE"

Local sites with WP-CLI. For a site running on your own machine, the client can start the adapter through WP-CLI over STDIO (wp mcp-adapter serve --server=mcp-adapter-default-server --user=mcp-editor) with no Application Password at all.

The web version of Claude at claude.ai adds connectors through an OAuth sign-in, which WordPress core doesn't provide, so use one of the clients above.

Step 5: Test with Read Operations First

Before granting write access in real workflows, confirm the connection works with safe read operations:

"List the WordPress abilities you can use on my site."

"List the 5 most recent posts on my WordPress site and show me their titles, status, and publish dates."

If Claude answers with the abilities it found and then with structured post data, your MCP server is connected and authenticated. If it returns an error, the most common causes are:

  • REST API disabled or blocked. Some security plugins (Wordfence, Solid Security) block or restrict REST requests. The MCP endpoint is a REST route, so it needs to be reachable for Application Password-authenticated requests.
  • URL mismatch. Use the Site Address from Settings → General exactly, including any subdirectory. A site at https://example.com/blog answers at https://example.com/blog/wp-json/mcp/mcp-adapter-default-server.
  • Application Passwords unavailable. Some older hosting configurations and security plugins turn them off. On TopSyde, the REST API and Application Passwords are enabled and accessible by default.

Scoping Write Access Safely

This is the most important section of this guide. The security failure mode with WordPress MCP is overpermissioned credentials, not Claude going rogue.

Use a Dedicated Editor-Role User

Never connect your MCP server with admin credentials. Create a user with the editor role. Editors can:

  • Create, edit, publish, and delete posts and pages
  • Manage categories and tags
  • Upload media

Editors cannot:

  • Install or activate plugins
  • Change theme settings
  • Modify user accounts
  • Access sensitive options

For most content workflows, editor is exactly the right scope. Because every ability checks its permission_callback against the connected user, an editor-connected Claude session can't run an admin-level ability even when a plugin has marked it public.

If You Need Plugin or Theme Management

Abilities that install, activate, or update plugins need a user with administrator capabilities such as activate_plugins. If you register them, give each one a strict permission_callback, connect with admin credentials on a staging environment only, never production, and audit every session. A separate MCP server entry for staging keeps those credentials away from your everyday content connection.

REST API Endpoint Allowlisting

You can further restrict what the MCP user can reach by adding a REST API filter to a site-specific plugin. This version applies only to the dedicated mcp-editor account, so your human editors keep full access to the block editor:

add_filter('rest_authentication_errors', function ($result) {
    if (is_wp_error($result) || !is_user_logged_in()) {
        return $result;
    }

    // Restrict only the dedicated MCP account
    if (wp_get_current_user()->user_login !== 'mcp-editor') {
        return $result;
    }

    $allowed = ['/mcp/mcp-adapter-default-server'];
    $route   = $GLOBALS['wp']->query_vars['rest_route'] ?? '';

    foreach ($allowed as $prefix) {
        if (str_starts_with($route, $prefix)) {
            return $result;
        }
    }

    return new WP_Error('rest_forbidden', 'Endpoint not permitted for this user.', ['status' => 403]);
});

This is belt-and-suspenders security: even if the Application Password leaks, the attacker can only reach the MCP endpoint, where every ability still runs its own permission check. The rest of the REST API, including user and settings endpoints, stays closed to that account.


Real Workflows: What You Can Do

Publishing Workflow

You: Draft a post titled "2026 WooCommerce Checkout Trends" in the 
"E-commerce" category, status draft, and add the excerpt: 
"Five checkout patterns increasing conversion in 2026."

Claude: [calls mcp-adapter-execute-ability → site-content/create-draft]
        → Draft created (ID: 4821)

Claude will confirm the post ID and the edit link. Register an update ability the same way and you can follow up with:

"Update post 4821: change the status to pending review and add the tag 'checkout-ux'."

This is materially faster than clicking through the Gutenberg UI for bulk metadata operations.

Content Auditing at Scale

This is where MCP earns its complexity. With a read-only audit ability that returns each post's title and Yoast meta description (the _yoast_wpseo_metadesc field), ask Claude to:

"Get all posts published in the last 90 days. List any that are missing a meta description and any with a title over 60 characters."

Claude will page through the results, pulling metadata, and return a structured audit you can act on immediately. Work that used to require a plugin or a custom PHP script runs in under a minute.

For agencies managing multiple client sites, this pattern, combined with one MCP server entry per client site (see the agency section below), means you can run the same audit across ten sites and get a consolidated report without switching dashboards.

Bulk Category and Tag Cleanup

Taxonomy debt accumulates fast on long-running sites. Ask Claude:

"List all categories with fewer than 3 published posts assigned to them."

Then act on the results in the same conversation, once you've registered abilities for merging, deleting, or reassigning terms. For context on managing multi-site setups where this taxonomy debt multiplies, see our guide on WordPress Multisite hosting and management.


Agency Configuration: Multi-Site MCP Setup

For agencies managing multiple client WordPress installations, install the MCP Adapter and your abilities plugin on each site, then configure each site as a named MCP server in claude_desktop_config.json:

{
  "mcpServers": {
    "client-acme": {
      "command": "npx",
      "args": ["-y", "@automattic/mcp-wordpress-remote@latest"],
      "env": {
        "WP_API_URL": "https://acme-client.com/wp-json/mcp/mcp-adapter-default-server",
        "WP_API_USERNAME": "mcp-editor",
        "WP_API_PASSWORD": "acme-application-password"
      }
    },
    "client-bravo": {
      "command": "npx",
      "args": ["-y", "@automattic/mcp-wordpress-remote@latest"],
      "env": {
        "WP_API_URL": "https://bravo-client.com/wp-json/mcp/mcp-adapter-default-server",
        "WP_API_USERNAME": "mcp-editor",
        "WP_API_PASSWORD": "bravo-application-password"
      }
    },
    "client-charlie": {
      "command": "npx",
      "args": ["-y", "@automattic/mcp-wordpress-remote@latest"],
      "env": {
        "WP_API_URL": "https://charlie-client.com/wp-json/mcp/mcp-adapter-default-server",
        "WP_API_USERNAME": "mcp-editor",
        "WP_API_PASSWORD": "charlie-application-password"
      }
    }
  }
}

Claude sees each site as a separate server with its own copy of the three tools, so name the client in your prompt ("on client-acme, list this week's drafts") and Claude calls the right one. Ship the same abilities plugin to every client site so the tools behave identically everywhere.

On credential management: use a secrets manager (1Password, Doppler, or AWS Secrets Manager) rather than leaving passwords in plain config files. Claude Desktop's config file stores values as written, but Claude Code's project-level .mcp.json expands environment variables, so each entry can use a header such as "Authorization": "Basic ${ACME_WP_AUTH}" and your secrets manager injects the value at launch. Create one Application Password per client site and per team member, so you can revoke one person's access to one site without touching the rest.

Our WordPress agency workflow guide covers the layer above this: how to structure maintenance routines, plugin update testing, and reporting across many client sites.


Hosting Considerations for MCP Compatibility

Not all WordPress hosting plays nicely with MCP-driven REST API usage. The issues we've seen most frequently:

Firewall false positives. WAFs that rate-limit or block REST API requests from non-browser user agents cause a lot of grief. MCP clients and the helper send requests with a non-browser user agent, which some WAFs flag as bot traffic. You'll need to whitelist the source IP or configure the WAF to allow Application Password-authenticated requests to the MCP endpoint.

REST API disabled by security plugins. This is a common misconfiguration on budget shared hosting. Some hosts configure Wordfence or similar with aggressive REST API blocking as a default, which completely breaks MCP.

SSL certificate issues. Self-signed certs or expired certs will cause Node.js fetch to reject connections, since the helper respects Node's SSL validation by default. Application Passwords also require HTTPS. TopSyde sites include automatic SSL renewal, one fewer thing to debug when setting this up.

Authorization header stripping. Some Apache and proxy setups drop the Authorization header before PHP sees it, so every request arrives unauthenticated and fails with a 401 even with correct credentials.

Connection limits. On shared hosting, the burst of API calls during a complex query can hit connection limits, causing 429 or 503 responses. Managed hosting with per-site resource allocation handles this cleanly.

If you're evaluating whether to move a client site to infrastructure where MCP integration is predictable, our comparison of managed WordPress hosting ROI covers the infrastructure tradeoffs in detail. TopSyde managed WordPress hosting starts at $59/mo per site and includes clean REST API access, no WAF-level interference with authenticated API requests, 24/7 uptime monitoring and daily TopSyde Sentinel malware scans.


Debugging Common MCP Connection Errors

ErrorLikely CauseFix
401 UnauthorizedWrong username or app password, or the server strips the Authorization headerUse the login name (not display name), re-copy the password, ask your host to pass the header to PHP
403 ForbiddenREST API blocked by security plugin or WAFAllow app-password-authenticated requests to the MCP endpoint
404 or rest_no_routeMCP Adapter inactive, or plain permalinksActivate the plugin; with plain permalinks use ?rest_route=/mcp/mcp-adapter-default-server
ECONNREFUSEDWrong URL or site is downVerify URL, check uptime
SSL certificate errorCert expired or self-signedRenew cert or set NODE_TLS_REJECT_UNAUTHORIZED=0 (dev only)
npx: command not foundNode.js not installed or not on the app's pathInstall Node.js and restart Claude Desktop
Tools not appearing in ClaudeConfig JSON syntax errorValidate the JSON and restart the client
Connected, but no abilities listedNo ability on the site is marked publicRegister abilities with 'mcp' => ['public' => true] or install a plugin that provides them
Permission error on an abilityConnected user's role lacks the capability the ability checksCheck the user's role against the ability's permission_callback

The 404 is usually the simplest fix. Confirm MCP Adapter is active under Plugins, then go to Settings → Permalinks in wp-admin and click Save (without changing anything) to flush rewrite rules.


What MCP Doesn't Replace

MCP is an interface layer over abilities your site registers. Claude cannot currently:

  • Edit content visually in the block editor
  • Do anything no ability exists for: if nothing on your site registers an ability for a task, Claude has no tool for it
  • Handle large media uploads well, since ability inputs are JSON and files have to arrive as URLs or encoded data
  • Manage WooCommerce order fulfillment unless WooCommerce or another plugin on your site registers abilities for it
  • Replace a proper WordPress backup strategy: take a backup before any bulk write operation via MCP

According to the State of AI Developer Tools report (Stack Overflow, 2025), 67% of developers using AI coding assistants report that context window limits are their primary frustration with AI-driven automation, and that applies to MCP workflows too. When you're auditing hundreds of posts, Claude may need to paginate results across multiple tool calls. Build your prompts with this in mind: ask for batches of 20-50 posts at a time rather than "all posts ever."

According to WP Engine's WordPress Ecosystem Report (2025), approximately 43% of professional WordPress developers are now experimenting with AI-assisted content operations, but fewer than 8% have a structured MCP or API-driven workflow in production. The tooling is early; the opportunity is real.


Keep Reading on TopSyde

Frequently Asked Questions

Is it safe to connect Claude to my WordPress site via MCP?

Yes, with proper credential scoping. Claude takes action only when you prompt it explicitly. The bigger risk is overpermissioned credentials: if your Application Password is compromised, the attacker has the same access the MCP server does. Always use an editor-role user (not admin) and consider REST API endpoint allowlisting as described above.

Does this work with WordPress.com sites?

This guide covers self-hosted WordPress (wordpress.org software), where you can install the MCP Adapter plugin and create Application Passwords. WordPress.com runs its own API and its own AI integrations, and what is available depends on your plan. On WordPress.com plans that allow plugin installs, the MCP Adapter setup above can work, but check WordPress.com's documentation for your plan before building a workflow around it.

Do I need to write code to use the MCP Adapter?

Only if no plugin on your site provides the abilities you want. The adapter itself is a normal plugin install, and it exposes whatever abilities are registered and marked public. Core provides a few read-only ones, and plugin support grows with each release. For content workflows such as drafting posts or auditing metadata, a small site-specific plugin like the one in Step 3 is usually the quickest route, and it gives you exact control over what Claude can do.

Can Claude publish posts without my approval?

Only if you give it an ability that publishes. Claude Desktop and Claude Code ask for your permission before running a tool unless you've told them to always allow it, and the abilities you register decide what is possible at all. The create-draft ability from Step 3 hard-codes draft status, so a human still reviews and publishes every post. That pattern (Claude drafts, people publish) is the safest starting point.

Which Claude apps can connect to WordPress?

Claude Desktop connects through the @automattic/mcp-wordpress-remote helper, and Claude Code connects to the MCP endpoint directly with a Basic auth header. Other MCP clients such as Cursor and VS Code work the same way as Claude Desktop. The web version at claude.ai adds connectors through OAuth, which WordPress core doesn't provide, so it needs a plugin that adds an OAuth sign-in before it can connect.

Colton Joseph
Colton Joseph

Founder & Lead Developer

20+ years full-stack development, WordPress, AI tools & agents

Colton is the founder of TopSyde with 20+ years of full-stack development experience spanning WordPress, cloud infrastructure, and AI-powered tooling. He specializes in performance optimization, server architecture, and building AI agents for automated site management.

Related Articles

View all →

Managed WordPress hosting

Stop managing WordPress yourself.

Hosting, updates, security, speed, and backups, handled by a senior developer, not a ticket queue. Complete is $89 a site a month, less from 11 sites, with free migration and a 30-day free trial.

Complete $89 a site a month · Less from 11 sites · Free migration · 30-day free trial