Wp CLI MCP logo

Wp CLI MCP

by mvtandas

Manage WordPress sites through WP-CLI, including plugins, themes, content, users, databases, scaffolding, and caches.

Install Wp CLI MCP

Run the project’s own setup commands, in order.

Setup steps from the project

mvtandas/wp-cli-mcp installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    npm install -g wp-cli-mcp
    

Overview

mvtandas/wp-cli-mcp exposes WordPress administration and development operations through MCP tools backed by WP-CLI. It can target a local WordPress installation or a remote site reached over SSH, with configuration supplied through environment variables. Reach for it when an AI agent needs to inspect or change site content, extensions, themes, database data, menus, or cache state.

Use cases

  • Manage WordPress plugins and themes
  • Create and update posts, pages, menus, and users
  • Migrate database URLs with export and search-replace operations
  • Scaffold themes, plugins, and Gutenberg blocks
  • Administer remote WordPress sites over SSH

Key features

  • WP-CLI-backed WordPress management
  • Local and SSH-based site access
  • Plugin, theme, post, menu, and user tools
  • Database export, query, and search-replace operations
  • Theme, plugin, and block scaffolding
  • Cache and rewrite-rule controls

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

22/26 checks healthy over the last 111d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars6Stargazers on the source repository.
Last commit7mo agoMost recent push to the default branch.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Wp CLI MCP works

What mvtandas/wp-cli-mcp does

mvtandas/wp-cli-mcp connects an MCP-compatible AI client to a WordPress installation through WP-CLI. It covers routine administration as well as selected development tasks, so an agent can inspect a site, make changes, and invoke WordPress-aware commands without relying on the WordPress REST API.

The server supports local WordPress directories and remote installations accessed over SSH. Its tool groups cover core version checks, plugins, themes, theme files, posts, post metadata, taxonomies, users, options, menus, widgets, media, databases, scaffolding, cache operations, PHP execution, site information, and raw WP-CLI commands.

How it works

The MCP process receives tool calls from the client and runs the corresponding WP-CLI operation in the configured WordPress context. For a local site, WP_PATH identifies the installation. For a remote site, WP_SSH provides an SSH target and remote WordPress path. WP_URL is available for specifying the site URL in multisite configurations.

Because the tools operate through WP-CLI, the host needs a usable WordPress installation and WP-CLI available on the executable path. Node.js 18 or newer is also required. The raw command tool and PHP evaluation tool can perform operations beyond the more narrowly scoped tools, so they should be used with appropriate access controls and review.

Setup and configuration

Install the package globally with npm:

Terminal
npm install -g wp-cli-mcp

Register the executable as an MCP server in the client configuration. A local setup supplies WP_PATH, for example /var/www/html. A remote setup instead supplies an SSH value such as user@host:/var/www/html. The README demonstrates configuration with Claude Code and uses the wp-cli-mcp command as the server process.

The configured account must be able to access the WordPress files and run the required WP-CLI commands. For SSH deployments, the SSH connection must also be usable by the environment running the MCP process.

Tools and capabilities

The documented tools include:

  • Inspecting WordPress core status and site information.
  • Listing, installing, activating, deactivating, deleting, and searching plugins.
  • Listing, installing, activating, and deleting themes, plus reading, writing, listing, and deleting theme files.
  • Listing, retrieving, creating, updating, and deleting posts and post metadata.
  • Managing terms, users, options, menus, menu items, menu locations, sidebars, widgets, and imported media.
  • Running database queries, exporting the database, and performing search-and-replace operations.
  • Scaffolding themes, plugins, and Gutenberg blocks.
  • Flushing rewrite rules or the WordPress cache.
  • Executing PHP in WordPress context or issuing an arbitrary WP-CLI command.

Database migrations can be organized as a sequence of export, dry-run search-and-replace, applied replacement, and cache-flush operations when the relevant tools are appropriate.

Limitations and notes

mvtandas/wp-cli-mcp requires WP-CLI and an accessible WordPress installation; it is not a standalone WordPress host or database service. Operations that modify content, files, databases, or PHP execution should therefore be reviewed according to the permissions of the configured local or SSH account.

The project documentation describes more than 30 tools, while its introductory text refers to 45 or more. The exact available set should be verified against the installed version. The package is released under the MIT license.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Wp CLI MCP

mvtandas/wp-cli-mcp is an MCP server that connects AI clients to local or SSH-accessible WordPress installations through WP-CLI. Its main tools manage plugins, themes, posts, users, menus, databases, scaffolding, caches, site information, PHP execution, and raw WP-CLI commands.

Install it globally with npm using `npm install -g wp-cli-mcp`. Then register the `wp-cli-mcp` executable in your MCP client configuration and provide the required WordPress environment settings.

Set `WP_PATH` to the local WordPress directory in the MCP server configuration. WP-CLI must be installed and available in PATH, and the environment also requires Node.js 18 or newer.

Set `WP_SSH` to an SSH connection string containing the user, host, and remote WordPress path, such as `user@host:/var/www/html`. The running environment must be able to establish that SSH connection.

Yes, it uses a standard command-based MCP process and can be configured in clients that support standard MCP servers, including Cursor. The README specifically demonstrates setup with Claude Code.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewWp CLI MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/mvtandas-wp-cli-mcp?style=directory)](https://allmcps.com/mcp/mvtandas-wp-cli-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/mvtandas-wp-cli-mcp"><img src="https://allmcps.com/api/badge/mvtandas-wp-cli-mcp?style=directory" alt="Wp CLI MCP on AllMCPs" /></a>