Opens in a new tab

WordPress MCP Guide: How to Connect Claude or ChatGPT to Your Site (and Fix the Hidden Problem)

AI assistant securely connected to a WordPress website dashboard

This week we set up WordPress MCP on our own site so Claude could help us draft and update blog posts. On paper it should take ten minutes. In reality it took most of an afternoon, and the reason had nothing to do with WordPress or AI. It was a single server setting that most tutorials never mention.

Connecting AI assistants to WordPress is one of the hottest topics in the WordPress world right now. WordPress.com and Jetpack have been promoting ChatGPT and Claude connections, the WordPress AI team keeps shipping new building blocks, and the plugin directory now has hundreds of new MCP plugins. So we wrote the WordPress MCP guide we wish we had: what it is, which setup to choose, how to connect Claude to WordPress safely, and how to fix the problem that stopped us.

What is WordPress MCP?

MCP stands for Model Context Protocol. It is an open standard that lets AI assistants like Claude and ChatGPT use outside tools in a safe, structured way. WordPress MCP simply means running an MCP server on your WordPress site, so an AI assistant can work with your content.

Think of it like a universal remote control. Your site publishes a list of things it allows an AI to do, such as “list posts”, “create a draft” or “update the SEO description”. The AI assistant reads that list and uses those actions when you ask it to. It cannot do anything that is not on the list, and it cannot do more than the WordPress user account it connects with is allowed to do.

Recent versions of WordPress include an Abilities API, a standard way for WordPress and plugins to describe these actions. A WordPress MCP plugin turns those abilities into tools an AI assistant can call.

What can an AI assistant do with WordPress MCP?

Once you connect Claude to WordPress (or ChatGPT), you can type requests like these:

  • “List my last ten posts and tell me which ones have no meta description.”
  • “Create a draft about our new service, in the same style as our other posts.”
  • “Update the SEO title of the flexbox tutorial to something under 60 characters.”
  • “Find posts that are missing a category and suggest one for each.”
  • “Fix the broken link in the JavaScript article.”

In our testing, the best results came from auditing and drafting. The AI is excellent at checking many posts at once and at producing a first draft. Final review and the Publish button should stay with a human.

Three ways to set up WordPress MCP

Option Best for Things to know
WordPress.com or Jetpack connection Sites on WordPress.com, or self-hosted sites that use Jetpack Connects through your WordPress.com account. Check their current plan terms, as free access has been offered for a limited time.
Official MCP Adapter plugin plus an abilities plugin Developers who want the “standard” WordPress approach The adapter alone only exposes a few basic abilities. You need another plugin to add post editing, SEO and media abilities.
An all in one WordPress MCP plugin Most self-hosted sites One plugin handles the server, the tools and the login key. Pick an established one with many installs and recent updates.

There are now hundreds of plugins with “MCP” in the name. Many are only a few weeks old with a handful of reviews. For a live business site, we would only consider a WordPress MCP plugin with a long track record, frequent updates and a clear permissions system.

How to connect Claude to WordPress in 5 steps

These steps are for a self-hosted site. The same process works for ChatGPT and other MCP compatible apps.

Step 1: Create a dedicated Editor user

Do not connect the AI with your administrator account. Create a new user with the Editor role. An Editor can write and edit posts and pages, but cannot install plugins, change settings or manage users. If something ever goes wrong, the damage is limited to content, which can be restored from revisions.

Step 2: Install a WordPress MCP plugin and choose the tools

Most MCP plugins let you switch individual tools on and off. Turn on what you need, such as reading posts, creating drafts, editing posts and updating SEO fields. Leave anything destructive, like deleting posts or changing site options, switched off unless you have a clear reason.

Step 3: Create the key in WordPress, not in the chat

The plugin gives you an API key or asks for a WordPress application password. Treat it exactly like a password. Add it to your AI app’s settings yourself, and never paste it into a chat message. Chat history is stored, and anything in it should be considered exposed. If you ever paste a key by mistake, revoke it and create a new one.

Step 4: Add the MCP server to your AI app

In Claude Desktop, ChatGPT or Claude Code, add a new MCP server with your site’s MCP address and the key. For command line tools, it usually looks something like this:

claude mcp add mysite -- npx -y mcp-remote https://example.com/wp-json/your-mcp-endpoint --header "Authorization: Bearer YOUR_KEY"

Two small details caused us trouble here. The -- after the server name tells the app that everything after it belongs to the MCP command. And straight quotes matter: if you copy a command from a web page and the quotes turn into curly ones, your terminal will sit waiting with a dquote> prompt.

Step 5: Test with a read-only request

Before asking the AI to change anything, start with something harmless like “list my five latest posts”. If you get a correct list back, your WordPress MCP connection works. Then try creating a test draft and check it in the WordPress dashboard.

The WordPress MCP problem nobody warns you about: the missing Authorization header

Everything looked right in our setup. The plugin was active, the key was correct and the command was clean. Yet the connection kept failing with a timeout or a “connection closed” error.

The cause: our web server was quietly removing the login header before WordPress could see it. Many shared hosting servers, especially some LiteSpeed and Apache setups, do not pass the Authorization header to PHP by default. To WordPress, the request looked like it came from someone who was not logged in at all, so it answered “not allowed”. The MCP tool then waited for a browser login that never came, and timed out.

How to test it without using your real password

Here is a simple trick. Send a request with a made-up username and password:

curl -u 'fake-user:fake password' https://example.com/wp-json/wp/v2/users/me
  • If WordPress replies with invalid_username, the header is reaching WordPress. Your problem is somewhere else.
  • If it replies with rest_not_logged_in, WordPress never saw the header. Your server is removing it.

How to fix it

The common fix is to add these lines to the very top of the .htaccess file in your WordPress folder:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1

On many hosts that solves it straight away. On ours it did not, because the restriction was set at the server level, outside anything we could change from WordPress. If the test still fails after this change, you have two options:

  • Ask your hosting support to allow the Authorization header to reach PHP for your site. It is a common request.
  • Use a WordPress MCP plugin that offers a connection address with the key built in, for apps that cannot send headers. This avoids the header problem completely. Just remember that address now works like a password, so keep it private.

We went with the second option, and the connection worked on the first try.

Troubleshooting common WordPress MCP errors

Error What it usually means What to try
Connection timed out The site rejected the login, and the tool is waiting for a browser login that never comes Run the fake login test above, then fix the Authorization header
Connection closed The login was refused outright Check the key is correct and has not been revoked, and that the word Bearer or Basic is included
rest_forbidden or 401 WordPress does not see a valid logged in user Same as above, or the user role lacks permission for that action
dquote> in the terminal A quote mark is missing or became a curly quote Press Ctrl+C and retype the command with straight quotes
Tools appear, but editing fails The tool is switched off in the plugin, or the user is not an Editor Enable the tool and check the user role

WordPress MCP safety rules we follow

  1. Use an Editor account, never an administrator.
  2. Drafts only. The AI creates or edits drafts, and a person reviews and publishes.
  3. Switch off delete tools unless you really need them.
  4. Keep keys out of chats, emails and screenshots. Revoke any key that has been shared.
  5. Check the change log. Good MCP plugins record every change and let you undo it.
  6. Back up first. A recent backup turns any mistake into a five minute fix.

Is WordPress MCP worth it?

For us, yes. Within minutes of connecting, we asked for an audit of every post’s SEO title and description, found several that no longer matched their articles after a rewrite, and fixed them all in one go. That job would normally mean opening each post, scrolling to the SEO box and editing by hand.

The AI does not replace your judgement or your voice. It removes the repetitive clicking around it. Set it up carefully, keep a human on the Publish button, and WordPress MCP becomes one of the most useful tools in your workflow.

Frequently asked questions

Is WordPress MCP free?

The protocol itself is free and open, and several WordPress MCP plugins are free. You still need an AI assistant such as Claude or ChatGPT, which may require its own subscription depending on how you use it.

Can I connect Claude to WordPress without coding?

Yes. With an all in one plugin you mostly click through settings, copy a connection address or key, and add it in Claude Desktop or Claude’s connector settings. Command line setup is only needed for tools like Claude Code.

Can the AI publish posts or delete content?

Only if the plugin tools and the user role allow it. We recommend keeping publishing with a human and switching delete tools off. Many plugins also ask for approval before risky actions.

Is it safe to use WordPress MCP on a live site?

It is as safe as the account and key you give it. Use an Editor account, keep the key private, turn off tools you do not need, and keep regular backups. Treat the AI like a new team member with limited access.

Does WordPress MCP work with ChatGPT too?

Yes. MCP is an open standard, so the same WordPress MCP server works with Claude, ChatGPT and other compatible AI apps. The setup screen in each app is slightly different.

If you enjoy automating repetitive work, our n8n automation guide shows how to build workflows that run on their own, and our free JSON formatter is handy when you are reading API responses like the ones above.