Connecting Claude Code, Claude Desktop or Cursor to WordPress with MCP, safely
How to let an AI assistant use your WordPress site over MCP without handing it the keys: Application Passwords, least privilege, drafts, read-only data.
You can connect an AI assistant like Claude Code, Claude Desktop or Cursor to your WordPress site so it can read your posts, check them, and write drafts for you. The Model Context Protocol (MCP) is the usual way to do it. The safe version of that setup comes down to four habits: authenticate with an Application Password rather than your login, give that password to a user with the least access that works, let the assistant write drafts but never publish, and keep any connected analytics data read-only.
This post explains each, and why it matters more for an AI client than for an ordinary integration.
What MCP is
The Model Context Protocol describes itself as “an open-source standard for connecting AI applications to external systems.” An MCP server exposes tools: list posts, get a post, create a draft. An MCP client, inside an app like Claude, ChatGPT or Cursor, discovers those tools and lets the model call them while it works on your request.
For WordPress, the server is usually one of two things:
- A plugin on your site that serves an MCP endpoint and turns tool calls into WordPress actions.
- A separate program, run locally or hosted, that talks to your site’s REST API on the client’s behalf.
Either way, the server acts as a WordPress user, and it can do whatever that user can do.
Setup on the client side differs by app. See Claude’s custom connectors, OpenAI’s MCP documentation and Cursor’s MCP documentation.
Why an AI client needs more care than a normal integration
A traditional integration does exactly what its code says. An AI client decides what to do based on text: your instructions, and everything else it reads along the way. That includes post content, comments, and any web page it fetches. Text written to look like instructions can steer it. This is usually called prompt injection, and the practical defence is to limit what the assistant is able to do, not to hope it never meets bad text.
The MCP specification’s section on tools says there should always be a human in the loop with the ability to deny tool invocations, and that clients should ask for confirmation on sensitive operations. Keep those prompts on. If your client lets you “always allow” a tool, only do that for tools that can’t change anything.
1. Use an Application Password, not your login
WordPress has supported Application Passwords since version 5.6. They’re made for exactly this:
- You create one under Users → Profile, give it a name, and WordPress shows it once.
- It works for REST API requests, sent with HTTP Basic authentication. It can’t be used to log in at
wp-login.php. - Each one can be revoked separately, and WordPress shows when each was last used.
- By default they’re only available on sites served over HTTPS, so they aren’t sent in the clear.
Never give an AI client your actual WordPress password. Make one Application Password per client, named after it, such as “Claude, laptop” or “Cursor, work”. When you stop using a client, revoke its password.
2. Least privilege: pick the user carefully
There’s an important catch. An Application Password carries all the permissions of the user it belongs to. The integration guide says scoping individual passwords isn’t available yet. So the way to limit an AI client is to limit the user.
Create a dedicated WordPress user for the assistant, and give it the lowest role that does the job:
- Contributor can write and edit their own posts but can’t publish them. A good fit for “draft posts for me to review.”
- Author can publish and edit their own posts. Only if you truly want the assistant publishing, which we don’t recommend.
- Editor can publish and edit everyone’s posts and pages. Rarely needed.
- Administrator can install plugins, change settings and manage users. Don’t give this to an AI client.
A separate user also makes the assistant’s work easy to spot. Every draft it creates is attributed to that user, not to you.
3. Drafts only: keep a human between the model and your readers
Even with a low-privilege user, design the workflow so the assistant’s output lands as a draft and a person publishes it:
- Ask for drafts explicitly: “create a draft,” not “post this.”
- If your MCP server lets you limit it to draft tools, do that.
- Review every draft in the WordPress editor before publishing. Check facts, links and anything that reads as invented.
- Prefer working on drafts or new posts over editing published ones. A model “tidying” a live page is how good content quietly gets worse.
This also covers ordinary mistakes, which are far more common than attacks: a misread request, a wrong post ID, an over-eager rewrite.
4. Read-only for Google data
Many people want the assistant to see Search Console or Analytics data alongside their posts: “which of my posts lost clicks this quarter, and draft updates for them.” That’s useful, but it doesn’t need write access.
- Google’s APIs offer read-only access scopes for Search Console and Analytics. When a tool asks you to connect Google, check what it’s requesting. If it wants to manage your properties, ask why.
- Prefer services that keep the Google connection on their side, so your WordPress site never stores a Google token.
- Treat numbers the assistant reports as claims to check. Ask it which tool returned each figure, and spot-check against Search Console itself.
A practical setup checklist
- Site served over HTTPS.
- A dedicated WordPress user for the assistant, with the Contributor role if all you need is drafts.
- One Application Password per client, named, stored only in that client’s configuration.
- MCP tools limited to reading and drafting where the server allows it.
- Tool confirmation prompts left on in the client.
- Google access read-only, if connected at all.
- A recent backup before you start.
- A reminder to revoke passwords you no longer use. Check “Last Used” on the profile screen.
What to ask an assistant to do first
Start with read-only tasks and build trust from there:
- “List my ten most recent drafts and tell me which have no headings.”
- “Read this post and suggest a clearer opening paragraph. Don’t change anything.”
- “Draft a new post outline on this topic as a WordPress draft.”
If the assistant tries to do more than you asked, that’s useful information about the client, and a good reason to keep permissions tight.
Where Rankmizer fits
The Rankmizer WordPress plugin includes an MCP server, built around the habits above, that’s off until the site owner switches it on. It authenticates with a WordPress Application Password, sent as an HTTP Basic header, so it suits clients you configure with a header: the plugin shows setup for Claude Code, and for Claude Desktop or Cursor. ChatGPT and Claude.ai connect with OAuth, which this server doesn’t use. Its tools are site info, list posts, get post, get site audit, get post schema, create draft and update draft. It works on drafts only: it refuses published posts and never publishes anything. A hosted Rankmizer MCP server is coming. It’s designed to give MCP clients, including ChatGPT and Claude.ai through an OAuth connector, read-only access to your Search Console, GA4 and Google Ads data, with Google connected in your Rankmizer dashboard rather than in WordPress. More on MCP.