JSPM

  • Created
  • Published
  • Downloads 136
  • Score
    100M100P100Q124585F
  • License MIT

Webhook signature verification SDK for Undisk MCP — verify HMAC-SHA256 signed webhook payloads

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-client

Usage

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