Package Exports
- @undisk-mcp/webhook-client
Readme
@undisk-mcp/webhook-client
Verify HMAC-SHA256 signed webhook payloads from Undisk MCP workspaces. Analogous to Stripe's constructEvent.
Installation
npm install @undisk-mcp/webhook-clientUsage
import { verifyWebhookSignature, parseWebhookPayload } from "@undisk-mcp/webhook-client";
const isValid = await verifyWebhookSignature(
body,
request.headers.get("X-Undisk-Signature")!,
process.env.WEBHOOK_SECRET!,
);
if (isValid) {
const event = parseWebhookPayload(body);
console.log(event.event, event.data);
}Documentation
See mcp.undisk.app for full documentation.
License
MIT