
This is a comparison for people who already write shell scripts against WordPress: execution model, safety, ergonomics, and where the two genuinely combine.
WP-CLI runs on the server, inside WordPress, as a PHP process with full privileges. You SSH in, you run a command, it executes. Nothing mediates it: what you type is what happens, immediately, with whatever consequences.
MCP runs as an HTTP service exposed by the site, called from anywhere, with per-connection scopes, schema validation on every call, an approval step for writes and an audit log. The caller is remote and untrusted by design.
That difference shapes everything else. WP-CLI assumes the operator is trusted and competent; MCP assumes the caller might be a language model having an off day.
WP-CLI has no undo, no plan step and no per-command permissions. That is not a criticism — it is a tool for people who know exactly what they are doing, and its directness is the point. But it means one mistyped search-replace is a restore-from-backup event.
Most teams that adopt MCP keep WP-CLI, and the division settles like this:
# the same thinking, two tools
wp core update && wp plugin update --all # infrastructure: WP-CLI
nibwp run nibwp/wp-list-posts --input '{...}' # content: MCP, scoped + logged
nibwp snapshot create --post-type product -o pre.json
More on the terminal path: the NibWP CLI.
Only where the script keeps needing judgement — the ones with growing case statements handling exceptions, or where somebody eyeballs the output before running the real thing. Deterministic scripts should stay deterministic. The rule that has held: if the script's logic is stable, keep it; if it keeps growing branches, the work wanted an agent.
WP-CLI, without hesitation. It is deterministic, scriptable across a host list, needs no supervision and does not benefit from judgement. An agent here would be slower and more expensive for zero gain.
MCP. Expressing that as a WP-CLI query means composing a search across post content, page-builder data and template files on each host. As a prompt it is one sentence, and the agent can look in all three places and report per site.
Either, and the choice reveals the difference. WP-CLI's search-replace is faster and blunt: it will also change the term inside URLs, shortcode attributes and serialised data if you are not careful. An agent proposes the changes in context first, and you approve the ones that are genuinely the product name.
WP-CLI over SSH. When HTTP is the thing that is broken, an HTTP-based tool cannot help you. Keep SSH access and keep WP-CLI installed — the agent layer is an addition, not a replacement for your recovery path.
For agencies that has an organisational consequence: work that previously required a senior with server access — audits, reporting, content inventory — can move to whoever is best placed to do it, because the credential enforces the boundary rather than trust.
No. WP-CLI stays the right tool for server-side infrastructure work: core updates, database maintenance, cron, deployments and recovery. MCP is better for content and configuration work where plugin logic and judgement matter.
MCP, by design: scoped credentials, schema validation, an approval step before writes and an audit log. WP-CLI is effectively root access with no plan step — powerful and unforgiving.
Yes, if your MCP server ships a CLI. You get terminal ergonomics and scriptability with the permission model, approval gate and audit log intact.
For raw bulk database operations, yes. MCP adds discovery and validation layers, which is the right trade for content work but not for a million-row search-replace.
No — that is one of its advantages. It works over HTTPS with a scoped credential, so you can grant a contractor read access without a server account.
Only the ones that keep growing exception branches or need a human to check the output first. Stable deterministic scripts should stay in WP-CLI.