DEV Community

Johnny Smith
Johnny Smith

Posted on • Edited on

I Turned WordPress Into an MCP Server So My AI Can Actually Manage It

If you're a developer who also runs a WordPress site — a blog, a portfolio, a client site — you've probably felt this tension. Your AI tooling is genuinely capable. Claude can reason, write, plan, and execute. But the moment you need something to actually land in WordPress, you're back to doing it manually.

Copy. Paste. Format. Categories. Tags. Featured image. Excerpt. Publish date. Every time.

The AI didn't remove the work. It just moved it.

I got tired of it. So I built a bridge. 

A Quick Primer on MCP (Skip If You Know It)

Model Context Protocol is an open standard for connecting AI assistants to external tools and data sources. The core idea is simple: instead of your AI knowing about the world only through its training data, it gets a structured set of things it can call — tools that perform actions, and resources that expose readable context.

MCP uses JSON-RPC 2.0 as its message format. A client sends a tools/call request with a tool name and arguments. The server executes it and returns a structured result. The AI sees the result and continues reasoning from there. It's a clean request-response loop, and because the protocol is standardized, any MCP-compatible client works with any MCP-compatible server.

The reason this matters for WordPress: it means your AI isn't guessing at how to interact with your site. It has a well-defined contract. It knows exactly what operations are available, what parameters they take, and what they return. No prompt engineering tricks to make it "write the post and paste it somewhere." It just calls wp_create_post with the right arguments.

What Easy MCP AI Does

EasyMCPAI.com is a WordPress MCP plugin that implements a Wordpress MCP server inside WordPress. Once installed, your site exposes a single endpoint:

POST https://yoursite.com/wp-json/easy-mcp-ai/v1/mcp

All MCP traffic goes through this route — initialize handshakes, tools/list discovery, tools/call execution, everything. Bearer token in the Authorization header. The server is fully spec-compliant with MCP 2025-03-26.

The plugin registers 74+ tools across every major WordPress surface: posts, pages, media, users, comments, taxonomies, menus, custom post types, post meta, blocks, templates, global styles, and site settings. On top of tools, it also exposes 15 MCP resources — read-only context objects your AI can reference. Things like your recent post history, draft queue, scheduled content, active plugins, registered authors, and available post types. Resources are what give your AI situational awareness about your site before it acts.

A tools/list response from the server looks like this (abbreviated):

{
    "tools": [
      {
        "name": "wp_create_post",
        "description": "Create a new WordPress post",
        "inputSchema": {
          "type": "object",
          "properties": {
            "title": { "type": "string" },
            "content": { "type": "string" },
            "status": { "type": "string", "enum": ["publish", "draft", "future"] },
            "date": { "type": "string", "description": "ISO 8601 publish date" },
            "categories": { "type": "array", "items": { "type": "integer" } },
            "tags": { "type": "array", "items": { "type": "integer" } }
          },
          "required": ["title"]
        }
      }
    ]
  }

The AI receives this schema at the start of a session, knows exactly what it can call and with what arguments, and uses it throughout the conversation. No hallucinated API calls, no guessing. 

What It Actually Enables

Here's a workflow I run every week. I open Claude Code, tell it I want to plan my content for the week. It reads my draft queue via the MCP resources, checks what I've published recently, and we figure out together what's worth finishing. I pick two posts to ship. Claude writes the final content, calls wp_create_post with the right categories, tags, and a scheduled publish date. Done in one conversation without opening the WordPress dashboard once.

Another one that surprised me: I asked Claude to audit post metadata across my last 50 published posts — missing excerpts, uncategorized posts, inconsistent tags. It went through everything using wp_list_posts and wp_get_post, gave me a summary, then called wp_update_post on each issue I approved. That would have been a tedious afternoon of clicking. It was a 10-minute conversation.

For sites with custom post types — portfolios, case studies, product listings — the same pattern applies. The plugin supports full CRUD on any registered CPT, so the AI isn't limited to standard posts and pages.

And for block theme sites, the server exposes tools for reusable blocks, block templates, and global styles. You can ask your AI to audit your template structure or update a reusable block across the site — things that are surprisingly painful to do manually.

How the Auth Works

Every token is scoped to a WordPress user. The AI inherits that user's role and capabilities — nothing elevated, nothing extra. An Editor-scoped token cannot touch site settings. A Subscriber-scoped token can't publish posts. WordPress's permission system stays the source of truth.

Tokens also support tool-level restrictions via glob patterns. You can issue a token that only permits wp_create_post and wp_update_post and blocks everything else. Useful for automation pipelines where you want to limit blast radius.

There's a per-token rate limiter, an audit log for every tool call (tool name, user, timestamp, response summary), and a force-draft mode that ensures anything the AI creates lands as a draft until manually reviewed. That last one is the setting I keep on permanently for production sites.

Getting Connected

The setup is short:

  1. Install Easy MCP AI from the WordPress plugin directory
  2. Go to Easy MCP AI > Tokens in wp-admin and generate a token
  3. Copy the MCP server URL from the settings page
  4. Add it to your MCP client config

In Claude Code, the claude_desktop_config.json entry looks like this:

{
    "mcpServers": {
      "my-wordpress-site": {
        "url": "https://yoursite.com/wp-json/easy-mcp-ai/v1/mcp",
        "headers": {
          "Authorization": "Bearer your_token_here"
        }
      }
    }
  }

From that point on, your WordPress site is just another MCP server in your toolchain. Claude sees it alongside any other servers you've configured and knows how to use it.

Where This Gets Interesting at Scale

The personal productivity angle is the obvious one. But the architecture opens up some more interesting patterns.

If you're building an AI content product on top of WordPress, the MCP server is ready-made infrastructure. Auth, permissions, tool routing, audit logging — it's already handled. You point your agent at the endpoint and build your product logic on top, rather than writing another WordPress REST API integration from scratch.

For agencies managing multiple client sites, each site gets its own MCP server and its own scoped tokens. Your AI orchestration layer — whether that's n8n, a custom agent, or something else — connects to all of them. You end up with a single interface for managing a fleet of WordPress sites, with each site's permissions cleanly isolated by token.

The protocol boundary also makes it straightforward to swap out the AI layer. Because the server just speaks MCP, switching from Claude to another model or adding a second client is a config change, not a rewrite.

The plugin is free. Visit EasyMCPAI.com to check.

If you're already running MCP toolchains and want to add WordPress to them, or if you're building something on top of this, I'd be interested to hear how you use it.

Top comments (0)