
Large language models are great at talking about your website and useless at working on it — until you give them a door. This is the complete, current guide to that door: how to connect Claude Code to WordPress with an MCP server, plus Claude Desktop, Cursor, ChatGPT and Windsurf, what to do when the connection won't come up, and how to keep the whole thing safe on a real site.
Expect the setup to take about five minutes on a normal host. Everything below uses NibWP, the plugin that turns your WordPress install into the MCP server itself — no proxy service in the middle.
The Model Context Protocol is an open standard for connecting AI applications to tools and data. A client speaks one protocol to a server that advertises typed tools — USB for AI context: one shape, many devices. NibWP is an MCP server that lives inside WordPress: it introspects your post types, taxonomies, fields and active plugins, then exposes them as tools an agent can call over HTTPS.
Why not just the REST API? The REST API is for developers writing code ahead of time. MCP is for agents deciding what to do at runtime — every tool is self-describing, so the model knows the shape of every call without you writing glue.
For Claude Code specifically, the generated config is a single CLI command:
# NibWP generates this for you (Settings -> Connect):
claude mcp add nibwp https://your-site.com/wp-json/mcp/nibwp \
--transport http
# then, inside Claude Code:
# > list my draft posts
# > create a draft post titled "October promotions"
Use the one-click bundle NibWP generates — it installs the connection without editing JSON by hand. Approve the sign-in screen and the tools appear in Claude's tool menu.
Both read an MCP config file; NibWP's Connect screen prints the exact block to paste. Restart the client and the WordPress tools show up alongside your code tools — useful when the same agent edits theme code and site content.
Add NibWP as a connector using the generated endpoint URL and complete the sign-in. Tool discovery is automatic once authorized.
Some hosts and security plugins disable Application Passwords, which kills the manual auth path. Fix: use the sign-in flow instead, or re-enable Application Passwords for your admin user. Status tells you which case you're in.
MCP clients refuse plain-HTTP endpoints, and so do we — credentials travel with every call. Fix: install the host's free TLS certificate; every mainstream host has one.
Hardening plugins that block or throttle the REST API will 403 the MCP endpoint. Fix: allowlist the NibWP endpoint path in the security plugin — you keep the hardening everywhere else.
NibWP credentials are domain-locked. Moving from staging to production, or www to bare domain, invalidates the old connection by design. Fix: reconnect on the new domain — two minutes, and it's the lock doing its job.
A cache layer that serves the endpoint stale breaks the handshake. Fix: exclude /wp-json/ from page caching — standard practice on any host.
Developers can expose their own tools — any plugin functionality can become a typed ability:
<?php
// Expose a custom tool to your MCP server
add_filter( 'nibwp/tools', function ( array $tools ) {
$tools[] = [
'name' => 'publish_changelog',
'description' => 'Create and publish a changelog entry.',
];
return $tools;
} );
One plugin, one sign-in, one config snippet — and your WordPress site stops being something AI talks about and becomes something it can operate, with approvals and a paper trail. Run Status first, use the sign-in flow, and the five-minute promise holds.
Once connected, see everything an agent can call — the full typed-ability reference — and what it unlocks: the plugin overview, maintenance on autopilot and AI site-building for agencies. Free to start — pricing.