Skip to main content
GetMCP ships a 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-config bootstrap
  • Run a quick health check from CI before/after a release
  • Pipe server or tool data into another tool (--format=json plays nicely with jq)
  • 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, wp runs as the user that owns the WordPress install — there’s no separate auth.

Command Tree

wp getmcp version
wp getmcp doctor

wp getmcp servers list           [--status=<status>] [--per-page=<n>] [--format=<format>]
wp getmcp servers get <id>       [--format=<format>]
wp getmcp servers create         --name=<name> [--slug=<slug>] [--auth-type=<type>]
wp getmcp servers delete <id>    [--yes]
wp getmcp servers pause <id>
wp getmcp servers resume <id>

wp getmcp tools list <server>    [--status=<status>] [--format=<format>]
wp getmcp tools test <server> <tool>
wp getmcp tools delete <tool>    [--yes]

wp getmcp keys list              [--format=<format>]
wp getmcp keys create            --name=<name> [--scopes=<scopes>]
wp getmcp keys revoke <id>       [--hard]
Run 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

wp getmcp servers list

Get one server’s full configuration

wp getmcp servers get my-api
The argument can be the server’s slug, UUID, or numeric ID — the resolver tries each in order.

Create a server from a deploy script

wp getmcp servers create \
  --name="Customer API" \
  --slug=customer-api \
  --auth-type=bearer
The slug becomes part of the MCP endpoint URL: https://yoursite.com/mcp/customer-api.

Pause and resume

wp getmcp servers pause my-api
wp getmcp servers resume my-api
Paused servers return 503 Service Unavailable to MCP clients without removing the server config — ideal for emergency cutovers.

Test a tool against your upstream API

wp getmcp tools test my-api list_users
Runs the tool through the live executor (with auth, parameter mapping, response transforms — everything an MCP client would trigger). Exits 1 if the upstream returns isError: true so you can use it as a smoke test in CI.

Mint a one-shot API key

wp getmcp keys create --name="CI deployment key" --scopes=tools,prompts
The plaintext key is printed once at creation. Copy it immediately — there’s no way to retrieve it after this command exits.
Key:    ak_live_8f3a9b2c4e1d6f7a8b9c0d1e2f3a4b5c
ID:     12
Scopes: tools, prompts

Revoke an API key

wp getmcp keys revoke 12        # soft revoke (kept in DB for audit)
wp getmcp keys revoke 12 --hard # delete the row entirely

Output Formats

Every list-style subcommand supports the standard WP-CLI formats via --format=<format>:
FormatUse when
tableHuman reading (default)
jsonPiping into jq or another tool
csvImporting into a spreadsheet
yamlConfig-file generation
countYou only need the row count
idsYou only need the IDs (e.g., to feed into another wp command)
Combine ids + xargs for batch operations:
wp getmcp servers list --status=draft --format=ids \
  | xargs -n1 wp getmcp servers delete --yes

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.
wp getmcp doctor
Sample output:
✓ sodium extension              available
✓ curl extension                available
✓ database tables               present
✓ active servers                3 server(s) active
✓ license tier                  pro (active until 2027-05-12)

Status: HEALTHY
Use it as a release gate:
# .github/workflows/deploy.yml (excerpt)
- name: Verify GetMCP install
  run: wp getmcp doctor
If doctor exits non-zero the workflow fails before the rest of the deploy continues.

Recipes

Bulk-create servers from a CSV

while IFS=, read -r name slug auth; do
  wp getmcp servers create --name="$name" --slug="$slug" --auth-type="$auth"
done < servers.csv

Snapshot all servers as JSON for backup

wp getmcp servers list --format=json > servers-backup-$(date +%Y%m%d).json

Revoke every key matching a name pattern

wp getmcp keys list --format=json \
  | jq -r '.[] | select(.name | startswith("CI ")) | .id' \
  | xargs -n1 wp getmcp keys revoke --hard

Troubleshooting

WP-CLI isn’t installed. Follow the WP-CLI install guide — on most VPS hosts it’s a one-line curl + chmod step.
Run from inside your WordPress directory, or pass --path=/var/www/html (the path to your WP root).
The plugin isn’t active on this install. Activate it with wp plugin activate getmcp and try again.
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.
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.