Skip to content

Webhooks & Events

MCPWP fires webhooks when things happen on your site — pages published, approvals created, tools called. Use them to trigger external workflows, sync systems, or notify your team.

ToolDescription
wp_list_webhooksList all registered webhooks
wp_create_webhookRegister a new webhook
wp_update_webhookUpdate URL or events
wp_delete_webhookRemove a webhook
wp_test_webhookSend a test payload
wp_list_webhook_logsDelivery history + response codes
wp_list_webhook_eventsAll available event types
wp_list_mcp_eventsRecent MCP tool call events
wp_get_event_schemaPayload schema for an event type
// wp_create_webhook
{
"url": "https://your-app.com/hooks/wordpress",
"events": ["page.published", "approval.created", "post.updated"],
"secret": "your-signing-secret"
}

The secret is used to generate an X-MCPWP-Signature header for verification.

EventFires when
page.publishedPage goes live
page.updatedAny page update
page.deletedPage deleted
post.publishedPost published
approval.createdNew approval request
approval.appliedChange applied
approval.rolled_backChange rolled back
mcp.tool_calledAny MCP tool called
media.uploadedNew media added
seo.issue_foundSEO audit finds new issue
const crypto = require('crypto');
function verifySignature(payload, signature, secret) {
const expected = crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(`sha256=${expected}`)
);
}