Skip to content

Authentication

All MCPWP endpoints require an API key. Pass it in one of two ways:

X-API-Key: mcpwp_YOUR_KEY
Authorization: Bearer mcpwp_YOUR_KEY

MCPWP API keys always start with mcpwp_ followed by 48 hex characters:

mcpwp_a1b2c3d4e5f6...

Keys are scoped to a role at creation time. The role determines which tool categories are available.

RoleTool categories
adminAll categories
editorcontent, elementor, gutenberg, media, taxonomy, seo
designerelementor, gutenberg, media, site
authorcontent, media, taxonomy

WP Admin → MCPWP → Setup lists active keys and lets you create, rotate, or revoke them.

Via REST:

Terminal window
# List keys
curl https://YOUR-SITE.com/wp-json/mcpwp/v1/api-keys \
-H "X-API-Key: $ADMIN_KEY"
# Revoke a key
curl -X DELETE https://YOUR-SITE.com/wp-json/mcpwp/v1/api-keys/{id} \
-H "X-API-Key: $ADMIN_KEY"

Plugins can bypass API key validation for specific requests:

add_filter('mcpwp_bypass_api_key_check', function($bypass, $request) {
// Return true to skip validation
return false;
}, 10, 2);