wp getmcp command tree for WP-CLI, the official WordPress command-line interface. Use it to manage servers, list and test tools, mint API keys, and run a self-diagnostic — all without opening the admin UI.
It’s the right tool when you want to:
- Provision servers from a deploy script or
wp-configbootstrap - Run a quick health check from CI before/after a release
- Pipe server or tool data into another tool (
--format=jsonplays nicely withjq) - Test a tool against a real upstream API without spinning up an MCP client
Prerequisites
- WP-CLI 2.5+ installed on the server. Check with
wp --info. If WP-CLI isn’t installed, follow the official install guide. - GetMCP plugin active on the WordPress install you’re running commands against.
- Permission-wise,
wpruns as the user that owns the WordPress install — there’s no separate auth.
Command Tree
wp help getmcp <subcommand> for full options on any command (replace <subcommand> with the actual command name, e.g. wp help getmcp servers create).
Common Tasks
List your servers
Get one server’s full configuration
Create a server from a deploy script
https://yoursite.com/mcp/customer-api.
Pause and resume
503 Service Unavailable to MCP clients without removing the server config — ideal for emergency cutovers.
Test a tool against your upstream API
1 if the upstream returns isError: true so you can use it as a smoke test in CI.
Mint a one-shot API key
Revoke an API key
Output Formats
Every list-style subcommand supports the standard WP-CLI formats via--format=<format>:
| Format | Use when |
|---|---|
table | Human reading (default) |
json | Piping into jq or another tool |
csv | Importing into a spreadsheet |
yaml | Config-file generation |
count | You only need the row count |
ids | You only need the IDs (e.g., to feed into another wp command) |
ids + xargs for batch operations:
wp getmcp doctor
Runs a self-diagnostic and reports the status of every dependency GetMCP cares about. Exits 1 on any failed check so it’s CI-friendly.
doctor exits non-zero the workflow fails before the rest of the deploy continues.
Recipes
Bulk-create servers from a CSV
Snapshot all servers as JSON for backup
Revoke every key matching a name pattern
Troubleshooting
`wp: command not found`
`wp: command not found`
WP-CLI isn’t installed. Follow the WP-CLI install guide — on most VPS hosts it’s a one-line
curl + chmod step.`Error: This does not seem to be a WordPress installation.`
`Error: This does not seem to be a WordPress installation.`
Run from inside your WordPress directory, or pass
--path=/var/www/html (the path to your WP root).`Error: 'getmcp' is not a registered wp command`
`Error: 'getmcp' is not a registered wp command`
The plugin isn’t active on this install. Activate it with
wp plugin activate getmcp and try again.`tools test` fails with a 401 or 403
`tools test` fails with a 401 or 403
The tool’s authentication isn’t configured on this server. Check the Authentication tab in the GetMCP admin and confirm the bearer token / API key / OAuth credentials are set for the parent server.
`doctor` reports a license-tier error
`doctor` reports a license-tier error
Either the license activation hasn’t completed yet (the InfiAuth client is still warming up) or your activation has expired. Check License in the admin and re-activate.
WP-CLI commands are gated behind
defined( 'WP_CLI' ) && WP_CLI so the command classes never load during normal web requests — there’s zero runtime cost on your front end.
