WordPress MCP Server: How to Connect Claude to WordPress Securely

The official MCP Adapter turns WordPress into an MCP server that Claude and other AI clients can call. What matters most is which abilities you expose and which user the agent acts as.

What exists and how the pieces fit

The Model Context Protocol (MCP) is an open standard that lets AI applications such as Claude use external tools and data. WordPress has an official path made of two parts:

PartWhereRole
Abilities APIWordPress core since 6.9A registry of named "abilities" with input and output schemas and a permission check
MCP Adapter"MCP Adapter" plugin (wordpress.org, GitHub, Composer wordpress/mcp-adapter)Serves exposed abilities as an MCP server over STDIO or HTTP

The adapter has no AI features of its own; it is the transport layer. What an agent can do depends entirely on the registered abilities. Core provides a few, such as core/get-site-info, core/get-user-info and core/get-environment-info; plugins and your own code add more. The WordPress team's AI plugin also has an "MCP Access" experiment that installs the adapter and controls which abilities agents may use.

How abilities reach the client

The default server is mcp-adapter-default-server, reachable over HTTP at /wp-json/mcp/mcp-adapter-default-server. Instead of listing every ability as its own tool, it offers three:

  • mcp-adapter-discover-abilities lists the exposed abilities.
  • mcp-adapter-get-ability-info returns one ability's schema.
  • mcp-adapter-execute-ability runs one.

Only abilities registered with meta.mcp.public set to true are exposed. Core abilities are not public by default; use the wp_register_ability_args filter to opt them in.

wp_register_ability( 'acme/open-inquiries', array(
  'label'               => 'List open inquiries',
  'description'         => 'Returns the latest unanswered inquiries.',
  'category'            => 'acme',
  'output_schema'       => array( 'type' => 'array' ),
  'execute_callback'    => 'acme_open_inquiries',
  'permission_callback' => function () {
    return current_user_can( 'edit_posts' );
  },
  'meta' => array( 'mcp' => array( 'public' => true ) ),
) );

Register abilities on the wp_abilities_api_init hook and their category earlier on wp_abilities_api_categories_init. Treat the snippet as an outline and check the current Abilities API documentation for exact parameters.

Connecting Claude to WordPress

Option 1: local, via WP-CLI (STDIO)

Best for local development sites or when the client runs on the server. Requires WP-CLI. In Claude Desktop's claude_desktop_config.json:

{
  "mcpServers": {
    "wordpress": {
      "command": "wp",
      "args": ["--path=/path/to/wordpress", "mcp-adapter", "serve",
               "--server=mcp-adapter-default-server", "--user=mcp-agent"]
    }
  }
}

Option 2: remote site over HTTP

For a live site, use the @automattic/mcp-wordpress-remote proxy (requires Node.js) with an application password:

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

Create application passwords under Users → Profile. By default WordPress only offers them on HTTPS sites. Restart Claude Desktop after editing the file.

Claude Code instead of Claude Desktop

In Claude Code, add the same server with one command. Everything after -- is the server's start command:

claude mcp add wordpress -- wp --path=/path/to/wordpress mcp-adapter serve \
  --server=mcp-adapter-default-server --user=mcp-agent

Testing the connection

  1. Check that the adapter's three tools appear in the client.
  2. Ask Claude to list the available abilities. An empty list means nothing is marked public.
  3. On a 401 error, check the username and application password. Some hosts and security plugins block the REST API or strip the Authorization header.
  4. For STDIO problems, run the command once directly in a terminal; WP-CLI errors show up immediately.

Secure setup checklist

  1. Dedicated user: create a separate WordPress user for the agent with the lowest role that works. Never connect your admin account.
  2. One application password per client: so you can revoke each one individually. Keep it out of repositories and shared files.
  3. Few, targeted abilities: expose only what is needed. Start read-only; add write or delete abilities only with tight permission checks.
  4. Strict permission_callback: check the specific capability every time. __return_true has no place on anything that changes data.
  5. Staging first: try new abilities and clients on a staging site.
  6. Logging: record calls so you can see what the agent did.
  7. Backups: take a fresh backup before the first write-enabled session.

An agent reads content that third parties can write, such as comments or form entries. Instructions hidden there can push it toward actions you did not intend. The fewer write permissions it holds, the smaller the possible damage.

For hardening the installation itself, see WordPress security.

Where it pays off

  • Turning a conversation with Claude into a draft post, with a person still pressing Publish.
  • Checking content, site health or the plugin list without logging in.
  • Making business data held in WordPress, such as inquiries or bookings, available for reporting.

Limits of the current state

The MCP Adapter is still below version 1.0, so interfaces can change between releases; read the release notes before updating. Also keep in mind:

  • Without suitable abilities the agent can do little. The bundled core abilities mostly return information about the site, user and environment.
  • Application passwords are simple but tied to one user and do not expire. For integrations with many users, custom authentication such as OAuth fits better.
  • The HTTP proxy and Claude Desktop run on the connected person's computer. Anyone using that machine has the agent's permissions.

How eCloud Systems can help

eCloud Systems builds AI agents and automations. If you want WordPress connected to Claude or your own agent over MCP, with purpose-built abilities and tightly scoped permissions, contact us. For a wider view of the options, read WordPress AI.

Frequently asked questions

Is the MCP Adapter part of WordPress core?

No. The Abilities API it builds on has been in core since WordPress 6.9. The MCP Adapter is a separate plugin from the WordPress team, available in the plugin directory and on GitHub (version 0.7.2 as of November 2026).

Once installed, can Claude change anything on my site?

No. The adapter only exposes abilities explicitly marked public for MCP, and every call runs with the permissions of the authenticated WordPress user.

Do I need to code?

Connecting a client only takes a config file. For the agent to do useful work, suitable abilities must be registered and exposed, which takes PHP code or a plugin that provides them.

Does it work with clients other than Claude?

Yes. MCP is an open protocol; any MCP-capable client can connect.

Need a new WordPress website for a fixed price?

Up to 5 pages, mobile-ready, SEO basics, live in about 10 working days: €500 one-time, with a 30-day money-back guarantee. For help with an existing site, get in touch.