# mvtandas/wp-cli-mcp [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/mvtandas/wp-cli-mcp  
**GitHub Stars:** 6  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mvtandas-wp-cli-mcp

## Description
Full WordPress management via WP-CLI with 30+ tools for themes, plugins, posts, menus, users, database, scaffolding, and cache. Works locally or over SSH to remote servers.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/mvtandas/wp-cli-mcp), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
npm install -g wp-cli-mcp
```

## Documentation

## 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:

```bash
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.

_Full upstream README: https://allmcps.com/mcp/mvtandas-wp-cli-mcp/readme_

