Whatâs MCP? The Model Context Protocol (MCP) is the open standard Claude (and soon other AI assistants) uses to call external âtools.â An MCP server tells Claude which tools it offers, and Claude can then call them over JSON-RPC. New to MCP? Check out MCP for WordPress for a beginner-friendly introduction.
With AI Engine, your WordPress site publishes 30+ toolsâ. Everything from wp_create_post to wp_upload_media and theme operations. Claude can draft posts, upload images, tag content, even fork and modify a theme, all from one chat! đ
Looking for Claude Code (the terminal-based assistant)? Check out our dedicated guide: Connect Claude Code to WordPress with MCP. This article covers Claude Desktop.
The whole stack is still in beta. Itâs really meant for advanced users and developers who are comfortable with the command line and debugging. Plus, it gives the AI full access to your WordPress, so⊠anything can happen!
Getting Started
Requirements
- WordPress 6.7+
- WP REST API (normally enabled by default)
- AI Engine 2.7.6+
- Claude Desktop â„ 0.9.2
- Node â„ 20.19.0
Connect Claude to Your Site
First, set a token for the authentication. Youâll find this field in Settings of AI Engine, under the DevTools tab.
Youâll want to grab the content of the labs folder onto your local machine (or maybe just the mcp.js file, actually). Run these two commands:
# Let's make it an executable
chmod +x ai-engine/labs/mcp.js
# Register site + patch Claude config
ai-engine/labs/mcp.js add https://example.com TOKEN
# First-time test (verbose)
ai-engine/labs/mcp.js start example.comThe first command writes an MCP entry to Claudeâs config: ~/Library/Application Support/Claude/claude_desktop_config.json.
Launch Claude Desktop and wait a few seconds. You should be able to see that AI Engine is properly loaded as a MCP server:

But honestly, donât be surprised if it doesnât⊠you have no idea how many issues I ran into. And most of the time, it wasnât even about the code, but stuff like server security, SSL, caching, SSE quirks, edge-caching, Cloudflare headaches, and so on. Also, if the token doesnât work, Claude will not tell you anything, youâll have to look into its logs! I really recommend starting with a local install you can fully control, just to have a clean, simple environment at first.
How It Works
The little Node script mcp.js (bundled with AI Engine) is the bridge. It was written on MacOS so it has not been tested on Windows. What it does:
- Opens a secure SSE stream to WordPress (
/wp-json/mcp/v1/sse); - Tunnels Claudeâs JSON-RPC calls to
/wp-json/mcp/v1/messages; - Relays the responses back to Claude;
- Cleans up automatically (sends
mwai/killand exits) when Claude quits.
mcp.js also handles everything else: it registers your sites, edits Claudeâs config, launches the relay, and shuts it down cleanly. At first, I actually built everything using mcp-remote, but I found it pretty hard to debug, especially when dealing with remote MCP servers. So I ended up making my own version. But if you prefer, you can totally use mcp-remote â it works just fine with AI Engine too!
What You Can Do
Try These Prompts
- Simple: âList my latest 5 posts.â
- Simple: âCreate a draft post titled My AI Journey, one paragraph, and attach a random Media-Library image.â
- Intermediate: âReview the 10 newest posts, then publish a logical follow-up. Re-use existing categories & tags. Generate an image if none fits.â
- Advanced: âFork Twenty Twenty-One into a dark grid theme called Futurism supporting post types Article & Project.â
Showcase
Both pacman.meowapps.com and mcp.meowapps.com are live WordPress sites built entirely using Claude and AI Engine â no extra plugins, no custom themes, no manual editing. One is a retro gaming site, the other a scratchpad I update as I experiment with new features. They show exactly whatâs possible with just a clean WordPress install and the MCP bridge.
Troubleshooting
Logs
Take a look inside the ~/Library/Logs/Claude directory. There are some log files there that might be useful⊠hopefully! Though honestly, theyâre not as helpful as I wish they were.
PHP Workers & SSE
Each SSE connection ties up one PHP worker. Kinsta and similar hosts give 5â8 workers per site, so two Claude sessions can chew through resources fast if they donât end properly. You might see that your website doesnât load anymore, in that case youâll have to restart the web server, or kill the php-fm processes, that highly depends on how your server is set up.
If the SSE connection remains open unintentionally, use the provided graceful exit (closing Claude or terminating the relay with Ctrl+C). Otherwise, manually restart your PHP or web server processes.
NVM / Node Versions
If youâre running into JS errors and using NVM, double-check that there arenât any old Node versions still listed when you run nvm list. For some reason, NVM can end up loading an older version instead of your default or latest one, and that can cause all sorts of issues.
Caching & Cloudflare
Caching can cause all kinds of problems. Since youâre not connecting to the SSE through your browser, Cloudflare or your hosting service might flag you as a non-browser and then SSE just wonât work (yeah, that really happens). Usually itâs done for caching reasons. For example, if youâre using Kinsta Edge-Caching, youâll need to turn it off completely. Or you can talk to Kinsta and ask them to disable it only for the SSE endpoint of AI Engine.
If you want to test your server for SSE, try my gist here.
Handy mcp.js Commands
# Disable auto-launch
ai-engine/labs/mcp.js claude none
# human-readable relay
mcp.js start example.com
# silent relay (Claude uses this)
mcp.js relay example.com
# manage sites
mcp.js add mysite.com TOKEN
# show all
mcp.js list
# switch target
mcp.js claude mysite.com
# ad-hoc RPC (no curl)
mcp.js post mysite.com '{"method":"tools/list"}' <session_id>Extra PHP Logging
Edit wp-content/plugins/ai-engine/classes/modules/mcp.php:
private $logging = true;Then tail wp-content/debug.log.
What Happens When You Close Claude?
Claude doesnât send SIGTERM to helpers, so mcp.js handles its own cleanup:
- detects stdin close,
- sends a
mwai/killnotification to WordPress, - aborts the SSE fetch,
- exits 0, no orphan
nodeprocesses.