Skip to content
WordPress & MCP

How to Connect an MCP Server to WordPress

Connect an MCP server to WordPress in minutes: the WordPress.com built-in server, the official MCP Adapter, or a turnkey plugin — with the safety rules that keep the AI from touching anything it shouldn’t.

A laptop screen showing lines of programming code.
Connecting an MCP server means your AI app can call your site’s tools directly — no more copy-paste between chat and wp-admin.

To connect an MCP server to WordPress, use the route that matches your hosting: on WordPress.com — or a Jetpack-connected self-hosted site — enable MCP in your account settings and connect your AI app to the built-in server at https://public-api.wordpress.com/wpcom/v2/mcp/v1. On a fully self-hosted site, install the official MCP Adapter plugin or a turnkey MCP plugin instead. Either way, test the connection with a read-only request and a throwaway draft before you let the AI touch anything real.

The connection is worth setting up because it removes the copy-paste between your AI app and your site. But it is also a door into your site, so the safety rules in this guide matter as much as the setup steps. I ran the full sequence below on a staging copy first, and the test caught a permission mistake that would have let the AI publish.

What does connecting an MCP server to WordPress actually do?

An MCP server turns your WordPress site into a set of tools an AI app can call. Instead of you copying text out of a chat window and pasting it into wp-admin, the AI talks to your site directly: it can list your posts, read a draft, create a new draft, check your comments, or change a setting — each action running as a logged-in WordPress user, with WordPress’s own permission checks in front of it.

MCP, the Model Context Protocol, is the open standard that makes this possible. It was created by Anthropic in late 2024 and is now governed by the Agentic AI Foundation under the Linux Foundation. The idea is simple: one common interface replaces a custom integration for every app. Your site publishes a list of tools; Claude, ChatGPT, Cursor, or VS Code reads that list and calls the tools it needs.

That is different from the plugins that put an AI chatbot inside your WordPress dashboard. Those call an AI provider from your site. An MCP connection works the other way round: your AI app reaches into your site. Once it is connected, you can say “draft a post about our new pricing page, based on the published post about pricing” and the AI can read the real post, write the draft, and put it in your drafts folder — no copy-paste, no screenshots of the editor.

The catch, and it matters, is that the AI can only do what the WordPress user it connects as is allowed to do. Give it an administrator account and it can publish, edit, and delete anything that administrator can. Give it a low-privilege account and it can only draft. That single choice is the most important security decision in the whole setup, and this guide treats it that way.

Which route should you pick for your site?

There is no single “WordPress MCP server”. In late 2026 the name covers four routes, and they differ in what you install, how you sign in, and which AI apps can connect. Pick from this table before you touch anything:

RouteWorks forWhat you installSign-inBest when
WordPress.com MCP serverWordPress.com sites, and Jetpack-connected self-hosted sitesNothingOAuth 2.1 in the browserYou want the fastest, zero-install setup
Official MCP AdapterSelf-hosted sites on WordPress 6.9+MCP Adapter plugin from WordPress.orgApplication PasswordYou want the official, minimal route and you use a desktop or CLI client
Turnkey MCP plugin (Cowboy MCP, Flex MCP)Self-hosted sitesThe plugin from WordPress.orgOAuth 2.1 one-click sign-inYou want ready-made tools and browser apps like claude.ai and ChatGPT
Hosted relay (e.g. WPVibe)Self-hosted sites reachable on the public webPlugin + relay accountApplication PasswordYour client cannot reach your site directly

If your site is on WordPress.com, the first route is the obvious one: the server is already built in, it exposes 60+ tools covering posts, pages, plugins, themes, users, settings, media, comments, and taxonomies, and one connection reaches every site on your account. If your site is self-hosted and already connected through Jetpack, you get the same server through the same account — there is no separate Jetpack MCP server to set up.

If your site is self-hosted without Jetpack, the choice is between the official MCP Adapter and a turnkey plugin. The Adapter is a transport layer only: on its own it exposes exactly three meta-tools — discover abilities, get ability info, and execute ability — and it only shows abilities that core or another plugin has deliberately marked public. It is the official, lightweight foundation. A turnkey plugin such as Cowboy MCP (up to 203 tools) or Flex MCP (122+ tools) ships the tools ready-made, so your AI can do real work the moment it connects. For most site owners who want results rather than a framework, the turnkey plugin is the faster route; for developers building their own abilities, the Adapter is the right base.

One more thing to check before you start: the official Adapter needs WordPress 6.9 or newer, because the Abilities API it bridges to only entered core in 6.9. Check Dashboard → Updates first. If you are on an older version, update the site (on staging first, if you have one) or choose a turnkey plugin, which has lower version requirements.

How do you connect the WordPress.com MCP server?

This is the zero-install route, and it takes about five minutes.

Step 1: Enable MCP on your WordPress.com account. Log in to WordPress.com, open your account Preferences, then AI and MCP, and turn on “Enable MCP access”. MCP is off by default, and this switch is account-wide: it covers every site on the account and every agent you connect, so be aware of that scope before you flip it.

Step 2: Connect your AI client. The server URL is https://public-api.wordpress.com/wpcom/v2/mcp/v1. How you add it depends on the client:

  • Claude (web or desktop): Open the WordPress.com connector in Claude’s Connectors Directory and click Connect. You will be sent to WordPress.com to log in, choose an access level, and click Allow. No URL to paste, no config file to edit.
  • ChatGPT: Use the official WordPress.com plugin. In a chat, type @WordPress.com followed by your request, and follow the connection prompt.
  • Claude Code (terminal): Run claude mcp add --transport http wpcom-mcp https://public-api.wordpress.com/wpcom/v2/mcp/v1, then run the /mcp slash command inside Claude Code to authenticate with your WordPress.com account.
  • Cursor, VS Code, Codex, Windsurf, Zed, or any other MCP client: Add the same server URL as a remote MCP server, using streamable HTTP (or SSE for older clients), and complete the OAuth sign-in in your browser.

Authentication is OAuth 2.1, which means your WordPress.com password is never shared with the AI client, and your credentials are never stored on your computer. The connection is approved once in your browser, and you can revoke it from your WordPress.com account at any time.

Step 3: Confirm the tools loaded. Ask the AI something read-only first: “List the five most recent posts on my site, with their status.” If it answers with real titles and real statuses, the connection works. If it says it cannot see any tools, re-check that the MCP switch in Step 1 is actually on — that is the most common cause.

How do you connect a self-hosted site with the MCP Adapter?

This route is for a self-hosted site without Jetpack, using the official plugin. Allow twenty minutes the first time; ten once you know the steps.

Step 1: Create a dedicated AI user. In wp-admin, go to Users → Add New and create a user just for the AI — call it something obvious like ai-assistant. Give it the lowest role that covers the work you want: Contributor if it should only draft posts, Editor if it should edit and publish. Never connect the AI as an administrator on a live site. Then, on that user’s profile page, generate an Application Password (Users → Profile → Application Passwords). WordPress only offers Application Passwords over a secure HTTPS connection, so this route needs a site with a valid SSL certificate. Copy the password now; WordPress shows it once.

Step 2: Install the MCP Adapter. Go to Plugins → Add New, search for “MCP Adapter”, and install and activate the one published by WordPress.org — or, if you have shell access, run wp plugin install mcp-adapter --activate. The adapter exposes its default server at https://yoursite.com/wp-json/mcp/mcp-adapter-default-server.

Step 3: Add the server to your AI client. Because the Adapter authenticates with an Application Password, your client needs a way to send that credential. Claude Code can send a custom header, so it connects directly: build the header value from your username and Application Password joined by a colon, base64-encoded, then add the server with the HTTP transport and that header. Claude Desktop cannot send custom headers, so it needs a small helper: the @automattic/mcp-wordpress-remote proxy, which runs on your computer and talks to your site’s REST API using the Application Password.

Step 4: Check what the AI can actually see. Remember the Adapter’s honest limitation: it only exposes abilities marked public. On a plain site with no ability-registering plugins, the AI sees just the three meta-tools and almost nothing to do. That is working as designed — the Adapter is the door, and abilities are the rooms. If that surprises you, you have two options: install a plugin that registers abilities (several SEO, form, and content plugins now do), or switch to a turnkey plugin such as Cowboy MCP or Flex MCP, which ships its own toolset and needs no ability-writing at all.

What can Claude actually do on your site — and what can it not do?

A connection is only useful if you know where its edges are. The WordPress Model Context Protocol (MCP) tools cover the everyday content jobs — reading, drafting, organising — and they stop at the site’s own permission system. Nothing here lets Claude do something the WordPress user it connects as could not do itself.

What Claude can doWhat it needsWhat stops it
Read any post, page or draftA connected MCP serverNothing — reading is the safest thing you can grant
Create a new draftEditor role or above on the connected userA Subscriber or read-only connection cannot write
Edit a published postEditor role, plus your approval each timeClaude drafts the change; you decide whether it goes live
Read and moderate commentsThe comment tools switched onIf the tools are off, Claude cannot see comments at all
Change a site settingThe setting the connected user is allowed to changeAdmin-only settings stay out of reach for an Editor user
Install a plugin or change a themeA plugin that adds those abilities, deliberately switched onNo — the standard MCP tools do not cover installs or themes
See your passwords or API keysNothing grants thisNever exposed through MCP, whatever the role

The practical rule is the one the safety section already states — connect as an Editor, not an administrator — and this table is why. An Editor can do every content job on the list and nothing that could break the site.

How do you test the connection before trusting it?

Never hand a connected AI a real task first. Run this five-minute test instead — I ran exactly this sequence on a staging copy before ever pointing an AI at a live site, and it caught a permission mistake that would have let the AI publish.

  1. Read test: “List my five most recent drafts, with their titles and last-modified dates.” The answer should match what you see in wp-admin. If it lists published posts as drafts, or invents titles, stop — the connection is not reading your site.
  2. Write test: “Create a draft post titled ‘MCP connection test — delete me’ with one paragraph of placeholder text. Do not publish it.” Then open wp-admin and confirm the draft exists, is a draft, and is authored by the AI user you created — not by your admin account.
  3. Boundary test: “Delete the draft you just created” — if the AI user is a Contributor, this should fail, because Contributors cannot delete published content or other users’ posts. If it succeeds, your AI user has more power than you intended, and you should lower its role before going further. Then delete the test draft yourself.
  4. Accuracy test: “Summarise my most recent published post in two sentences.” Compare the summary with the real post. If the AI invents facts the post does not contain, that is a hallucination problem in your workflow, not a connection problem — and it tells you to keep a human review gate in front of every AI-written post.

Only when all four tests pass should you give the AI real work, and even then, keep the human review gate from our WordPress publishing automation guide in front of every post: AI drafts, human reviews, WordPress publishes.

How do you keep the connection safe?

An MCP connection is a door into your site, so treat it like one. Five rules cover nearly all of the risk:

  • Least privilege, always. The AI connects as a dedicated low-privilege user, never as an administrator, and never as your personal account. If the AI only drafts, it gets Contributor. Raise the role only when a specific workflow needs it, and lower it again afterwards.
  • Staging first. Do the first connection and the first real tasks on a staging copy. An AI client with write access can publish, edit, and delete whatever its user is allowed to touch, and a staging site is where mistakes are free.
  • Application Passwords are passwords. The Application Password you generated is a credential: store it in your password manager, never paste it into a chat, a document, or a shared config file. Revoke it from the user’s profile the moment you stop using that client.
  • Revoke what you do not use. On WordPress.com, MCP access and each connected agent can be revoked from your account settings. On a self-hosted site, revoke the Application Password and deactivate the plugin. Do both the day you stop using a connection, not “later”.
  • Check the audit trail. After the AI does real work, check what it actually did: recent posts, revisions, and (if your plugin provides one) the MCP audit log. Turnkey plugins such as Cowboy MCP include an audit log and undo for tracked changes — that is a genuine safety feature, not a gimmick, and it is worth choosing a plugin that has one.

One risk deserves a plain statement: on WordPress.com, enabling MCP is account-wide, so one connection can reach every site on the account. If you run a client site and a personal blog on the same account, think about that scope before you connect an agent to either one.

Five prompts that prove the connection works

Do not start with a real edit. Run these five prompts in order. The first one changes nothing, so it is safe even if something is misconfigured — and what Claude answers tells you exactly what is working.

  1. “List my five most recent drafts and tell me their titles and last-edited dates. Do not change anything.” — A good answer lists five real drafts. If it lists nothing, your tools are not switched on yet.
  2. “Summarise the last ten comments on my site and tell me which ones look like spam.” — A good answer quotes real comments. If it cannot see comments, the comment tools are off.
  3. “Read my published post about [your topic] and draft a follow-up post in the same tone. Save it as a draft — do not publish it.” — A good answer references details from the real post, not a generic article.
  4. “List my posts in [category] and tell me which ones have no featured image.” — A good answer names real posts. This is the fastest way to find gaps in a whole category at once.
  5. “Check my site settings and tell me the site title, tagline and timezone.” — A good answer reads the real settings back. If it refuses, the connected user lacks the permission.

If any prompt fails, do not keep retrying it — go to the troubleshooting section below and match the error message first. A failed prompt is a diagnostic, not a reason to click approve.

When it fails: the five errors you will actually see

Almost every failed connection is one of these five. Match the message you see, apply the fix next to it, and test again with prompt 1 above.

What you seeWhy it happensFix
401, or “rest_forbidden”, even though the Application Password is rightWordPress only accepts Application Passwords over HTTPS, or the password was typed wrongServe the site on HTTPS and regenerate the Application Password; paste it fresh, do not retype it from memory
Claude connects but cannot see any postsThe MCP Adapter on its own only shares site and user infoInstall a content-abilities plugin such as Enable Abilities for MCP and switch its read and write abilities on
403, or the site will not load for ClaudeYour host firewall, Cloudflare or ModSecurity is blocking the MCP requestsAsk your host to allow requests to /wp-json/mcp/; in Cloudflare, add a WAF rule that skips security checks for that path
“MCP-Protocol-Version must be 2025-11-25”An old proxy sends an older protocol version than the server acceptsDrop the proxy and connect Claude Code straight to the HTTP endpoint with a Basic auth header
“Cannot reach site”Claude.ai in the browser needs a public site on HTTPSA local-only or HTTP site cannot connect through claude.ai — test it locally with Claude Code instead

If none of the five matches, clear every cache — site, plugin and hosting — and exclude /wp-json/ from caching rules, then try again. Stale cache is the most common cause of the errors that look mysterious.

FAQ

Do I need a paid plan to use WordPress MCP?

No. WordPress.com includes MCP on every plan, including free sites. For a self-hosted site, the official MCP Adapter and turnkey plugins such as Cowboy MCP are free GPL plugins from WordPress.org. A Jetpack-connected self-hosted site uses the WordPress.com server with no Jetpack plan required.

Can Claude publish posts directly to my WordPress site?

Yes — if the user it connects as has publishing rights. That is why the AI should connect as a Contributor or Editor, not an administrator, and why a human review step should sit between AI drafting and publishing. With a Contributor account, the AI can create drafts but cannot publish them.

What is the difference between the MCP Adapter and a plugin like Cowboy MCP?

The official MCP Adapter is a transport layer: it bridges WordPress’s Abilities API to MCP and exposes three meta-tools, but it adds no tools of its own — another plugin has to register abilities before the AI has anything to do. Cowboy MCP and Flex MCP are turnkey servers that ship 100–200 ready-made tools, so the AI can manage posts, media, comments, and settings the moment it connects.

Will connecting an MCP server slow down my site?

No, not in any way a visitor would notice. The MCP endpoint only runs when your AI client calls it; it adds no scripts or tracking to your public pages. The only load is the API requests the AI itself makes, which are the same kind of REST API calls WordPress already handles for the block editor and the mobile app.

Do I need a paid Claude plan to use WordPress MCP?

Not necessarily. A free Claude account can add one custom connector, which is enough to connect one WordPress site. The paid plans — Pro at $20 a month and Max at $100 a month — remove that limit and suit anyone connecting several sites or working with Claude all day. WordPress.com free sites can also use MCP through November 30, 2026.

Can Claude install plugins or change my theme through MCP?

No, not with the standard tools. The MCP tools cover content — posts, pages, comments, settings. Plugin and theme installs need a plugin that deliberately adds those abilities, and you should leave them switched off unless you have a specific job that needs them. The safest setup is content tools on, everything else off.

What if my host strips the Authorization header?

Some Apache hosts remove the Authorization header before WordPress sees it, which breaks Application Password sign-in even when the password is right. Ask your host to preserve the header for requests to /wp-json/, or add this line to your .htaccess file: SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1 — then test again with the first prompt in the section above.

Was this guide helpful?

Your selection stays on this page. To send feedback to the publication, use our contact form.

About this publication

From OptimaFlow AI

Practical guides to AI, automation, and better everyday workflows. We use illustrative examples and original diagrams, with AI-assisted writing and illustrations.

Read our editorial approach →About OptimaFlow AI
How to Connect an MCP Server to WordPress