Back to Blog

WordPress MCP: Connect Claude or Codex to Edit Your Site by Chat

·, Founder·Updated ·AI agents and MCP
wordpress mcpwordpress mcp serverclaude wordpresscodex wordpressmodel context protocol

If you have wished your AI assistant could just do things in WordPress instead of handing you instructions, that is exactly what a WordPress MCP server gives you. MCP (the Model Context Protocol) is an open standard introduced by Anthropic that lets AI assistants like Claude and Codex connect to external systems. A WordPress MCP server exposes your site's actions (read pages, create posts, upload images, update menus) as tools your assistant can call.

This post explains what a WordPress MCP server is, how to connect one, what you can do with it, and how the security model keeps you in control.

What is MCP, in plain terms?

Think of MCP as a USB-C port for AI tools. Without it, your assistant is a brilliant conversationalist with no hands. With an MCP server connected, it gains a specific set of capabilities it can use on your behalf, and WordPress is a perfect fit, because so much of running a site is repetitive, structured work.

A WordPress MCP server is the bridge between your assistant and your site: your assistant talks to the MCP server, the server talks to WordPress (over a secure REST connection), and changes show up on your site.

Connecting a WordPress MCP server

We will use XeoRank, which runs a managed WordPress MCP server so you do not have to host anything. The server URL is https://mcp.xeorank.com/mcp.

Claude (Desktop or web)

  1. Open Settings → Connectors.
  2. Click Add custom connector, name it XeoRank, and paste https://mcp.xeorank.com/mcp.
  3. Click Connect and sign in. Claude handles authentication automatically (no API key).

Codex

Codex connects over native HTTP and reads a key from a header:

  1. Open Connect to a custom MCP.
  2. Name it XeoRank, toggle Streamable HTTP, and set the URL to https://mcp.xeorank.com/mcp.
  3. Under Headers, add Authorization with the value Bearer <your XeoRank API key> (create the key at xeorank.com/settings), then fully restart Codex.

Claude Code (CLI)

claude mcp add xeorank --transport http https://mcp.xeorank.com/mcp

Then run /mcp and authenticate. Verify any client by asking: "List my XeoRank sites."

A quick tip: if you add the server and your assistant cannot see the tools, reconnect or restart the MCP session: clients fetch the tool list once when they connect.

Connecting your WordPress site

The MCP server still needs permission to touch your specific site. The plugin method works on any host:

  1. Install the free XeoRank Connector plugin (Plugins → Add New → Upload Plugin).
  2. Create an Application Password (Users → Profile → Application Passwords).
  3. Tell your assistant to connect with your site URL, your wp-admin username (not the app password's name), and the Application Password, then enable writes.

What you can do once connected

A WordPress MCP server turns natural-language requests into real actions. The common ones:

  • Read: list pages and posts, and read a page's editable structure.
  • Build: create new pages and blog posts from a description.
  • Edit precisely: change one heading or swap one image without rebuilding the page. Elementor pages are edited as native containers and widgets, including Elementor 4 atomic elements (more on Elementor).
  • Media: upload an image from a URL into the media library and reuse it.
  • Custom fields: read and set ACF (Advanced Custom Fields) values.
  • Site-level: set a homepage, manage menus and templates, add site-wide CSS or JavaScript, publish or unpublish.
  • Design review: screenshot a page so the assistant can critique and fix layout issues.
  • SEO: analyze a page for SEO, AEO, and GEO, write titles and meta descriptions to Yoast, Rank Math or All in One SEO, and add schema.

You never call these tools by name; you describe the outcome ("add a pricing page", "swap the hero image", "publish this") and the assistant maps it to the right tool.

The security model

Letting an AI agent connect to your WordPress site sounds risky until you see how it is gated:

  • HTTPS-encrypted connection; stored credentials are encrypted, and your main WordPress password is never shared.
  • Writes are off for each site until you enable them, and you can turn them off again at any time.
  • Draft-first: new pages, clones and page variants are created as drafts, and you can get a preview link before they go live, then publish them. Edits to an existing page change that page directly.
  • Reversible, because every change to a page's content is snapshotted (up to 20 per page) and any snapshot can be restored. SEO meta, menus and custom code are not snapshotted.
  • Revocable: the Application Password and API key can be revoked at any time, instantly cutting off access.
  • Approvals: keep destructive actions (deleting a site, theme edits) set to "needs approval" in your AI client.

Because the connector talks to WordPress through its standard REST API with an Application Password, you are never sharing your main login, and you can see and revoke access from your WordPress profile whenever you like.

WordPress MCP vs. AI plugins

AI plugins that live inside wp-admin are useful for generating a snippet of text in a single box. A WordPress MCP server is a different category: it gives your assistant the whole site as a workspace, from the comfort of the chat you already use for everything else. You plan, build, and review in one place, and the same assistant can also research keywords, audit SEO, and check your AI visibility through the same SEO MCP server.

Get started

A WordPress MCP server is the missing link between "AI that talks about your site" and "AI that builds it." Connect one in a few minutes:

New to the idea of building sites by chat? Start with our guide on building a WordPress site with AI.

Ready to optimize your search rankings?

XeoRank connects to Google Search Console, analyzes content gaps with AI, and gives you actionable fixes — from the terminal or dashboard.