About wpagent-mcp
wpagent-mcp is an MCP server for operating WordPress and WooCommerce from MCP clients, aimed at site administrators and content operators. It connects directly to a site through a signed REST API and applies per-key permissions.
Key features
- 01Manage plugins, themes, and content
- 02Operate WooCommerce settings and orders
- 03Manage media, users, menus, and comments
- 04Run security and SEO audits with auto-fixes
- 05Optional allowlisted WP-CLI commands
- 06HMAC-SHA256 signing and audit logs
Use cases
- 01Update site content from an MCP client
- 02Review or manage WooCommerce orders
- 03Audit a site and apply fixes within key permissions
- 04Run allowlisted WP-CLI commands when enabled
MCP support
The MCP server exposes WordPress and WooCommerce management tools to clients. It connects directly to the site through the WpAgent plugin's signed REST API, without a third-party service.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
npx -y wpagent-mcpWP_SITE_URLBase URL of your WordPress site, no trailing slashWP_API_KEY_IDSecretAPI key id shown by the WpAgent pluginWP_API_SECRETSecretAPI key secret, displayed once at generationWP_SITE_LABELFriendly name for the site; defaults to the hostnameLocal servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
Tools
58Saved tool list · updated 3w ago
This tool takes no parameters.
Details
From the project READMEwpagent-mcp
An MCP server that lets Claude — or any MCP-compatible client — actually operate a WordPress site: plugins, content, themes, menus, media, users, WooCommerce, Elementor and WP-CLI.
It talks to your site through the free WpAgent bridge plugin over a REST API where every request is signed with HMAC-SHA256. No site credentials are involved, and no data passes through a third-party service: the connection is client → your WordPress, directly.
Install
Nothing to install ahead of time — the config below fetches it on demand.
- Install the WpAgent plugin on your WordPress site and activate it.
- In the WordPress admin, open WpAgent and generate an API key. Choose the permissions you want the assistant to have; a read-only key is a sound way to start.
- Add the server to your MCP client. For Claude Desktop, in
claude_desktop_config.json:
{
"mcpServers": {
"wpagent": {
"command": "npx",
"args": ["-y", "wpagent-mcp"],
"env": {
"WP_SITE_URL": "https://your-site.com",
"WP_API_KEY_ID": "wpaia_xxxxxxxxxxxx",
"WP_API_SECRET": "the secret shown once when you generated the key"
}
}
}
}
For Claude Code:
claude mcp add wpagent \
--env WP_SITE_URL=https://your-site.com \
--env WP_API_KEY_ID=wpaia_xxxxxxxxxxxx \
--env WP_API_SECRET=... \
-- npx -y wpagent-mcp
Environment variables
| Variable | Required | What it is |
|---|---|---|
WP_SITE_URL | yes | Your site's base URL, no trailing slash |
WP_API_KEY_ID | yes | The key id shown in the plugin |
WP_API_SECRET | yes | The secret, displayed once at generation |
WP_SITE_LABEL | no | A friendly name; defaults to the hostname |
What it can do
| Area | Examples |
|---|---|
| Plugins | list, search wordpress.org, install, activate, deactivate, update, delete |
| Content | posts, pages, products, any custom post type, with meta and featured images |
| Themes | list, search, install, activate, theme mods, custom CSS, logo, colours |
| WooCommerce | settings, orders, coupons, shipping zones, payment gateways, tax rates, stats |
| Structure | menus, widgets, sidebars, taxonomies, terms, redirections |
| Media | browse, upload, delete |
| Users & comments | list, create, update, moderate |
| Audit | best-practices check over security, SEO, performance, with auto-fixes |
| WP-CLI | allowlisted commands, off unless enabled in wp-config.php |
What it will not do
The API has no path to arbitrary PHP, no path to your database, and no path to wp-config.php. WP-CLI execution is disabled unless the site owner adds define('WPAIA_ENABLE_WPCLI', true); on the server, and even then only allowlisted commands run — db, eval, eval-file, shell, server, config and package are always refused.
Safety
- Every request is signed with HMAC-SHA256 and carries a timestamp; requests older than five minutes are rejected.
- Permissions are per key and checked on every route, so a read-only key stays read-only.
- Every call is written to an audit log you can read in the WordPress admin.
- Revoking a key in WordPress takes effect immediately.
Ask the assistant to confirm before destructive actions, and keep a current backup — it can delete content when you tell it to.
Related
- WpAgent — hosted dashboard built on the same bridge, with a free read-only tier
- The bridge plugin is GPL-2.0-or-later; this server is MIT.
Licence
MIT © KipDev
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.