Webhook Verify
FreeNot checkedProvides timing-safe, replay-resistant webhook signature verification for Stripe, GitHub, Slack, Shopify, and Twilio, returning valid/invalid with precise failu
About
Provides timing-safe, replay-resistant webhook signature verification for Stripe, GitHub, Slack, Shopify, and Twilio, returning valid/invalid with precise failure reasons.
README
Timing-safe, replay-resistant webhook signature verification for Stripe, GitHub, Slack, Shopify and Twilio.
29 passed
Standard library only. No dependencies, no network, no telemetry.
Why
Webhook verification is the one piece of security code almost every backend writes itself, and it goes wrong in four predictable ways:
| Mistake | Consequence |
|---|---|
signature == expected |
Byte-by-byte comparison leaks the position of the first wrong byte through timing. Forgeable given enough attempts. |
| No timestamp check | A captured valid request stays valid forever. Replay it tomorrow and it still passes. |
| Verifying the parsed body | You re-serialise, a key order or whitespace changes, and the HMAC no longer matches — so people "fix" it by skipping verification. |
Returning False on failure |
A caller writes if verify(...) and a truthy string or None slips through. |
This library does the opposite of each: hmac.compare_digest everywhere, replay windows on every
provider that signs a timestamp, verification against the raw body, and a specific exception on
every failure so nothing can be accidentally treated as success.
Use
from webhookverify import verify_stripe, SignatureMismatch, TimestampOutOfRange
try:
verify_stripe(secret, raw_body, request.headers["Stripe-Signature"])
except TimestampOutOfRange:
return 400, "replayed or clock-skewed"
except SignatureMismatch:
return 401, "not from Stripe"
# only now is it safe to parse raw_body
Supported: verify_stripe, verify_github, verify_slack, verify_shopify, verify_twilio,
and verify_hmac for anything else.
Stripe secret rotation is handled: a header carrying several v1= signatures passes if any one matches.
MCP server
mcp/server.py exposes one tool, verify_webhook, over JSON-RPC 2.0 stdio (protocol 2024-11-05).
It returns valid:true, or valid:false with a precise reason (signature_mismatch,
timestamp_out_of_range, malformed_signature) and the instruction not to parse the payload.
{ "mcpServers": { "webhook-verify": { "command": "python3", "args": ["/path/to/webhook-verify/mcp/server.py"] } } }
Tested behaviour
- Valid signatures pass for all five providers
- Tampered bodies, wrong secrets and truncated signatures raise
SignatureMismatch - Replayed and future-dated timestamps raise
TimestampOutOfRange(the window is symmetric) - Malformed headers raise
MalformedSignature— missing prefix, bad base64, non-hex, non-numeric timestamp - Stripe multi-
v1rotation passes when any signature matches - A source-level guard asserts the module never regresses to
==on digests and always length-checks beforecompare_digest
python -m pytest tests -q
License
MIT
Installing Webhook Verify
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/Larslllllll/webhook-verifyFAQ
Is Webhook Verify MCP free?
Yes, Webhook Verify MCP is free — one-click install via Unyly at no cost.
Does Webhook Verify need an API key?
No, Webhook Verify runs without API keys or environment variables.
Is Webhook Verify hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Webhook Verify in Claude Desktop, Claude Code or Cursor?
Open Webhook Verify on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Gmail
Read, send and search emails from Claude
by GoogleSlack
Send, search and summarize Slack messages
by SlackRunbear
No-code MCP client for team chat platforms, such as Slack, Microsoft Teams, and Discord.
Discord Server
A community discord server dedicated to MCP by [Frank Fiegel](https://github.com/punkpeye)
Klavis AI
Open Source MCP Infra. Hosted MCP servers and MCP clients on Slack and Discord.
Work90210/APIFold
Turn any REST API into a hosted MCP server. 18 free public servers (GitHub, Stripe, Slack, OpenAI, Notion, and more) — no setup required, bring your own API key
by Work90210arikusi/deepseek-mcp-server
MCP server for DeepSeek AI with chat, reasoning, multi-turn sessions, function calling, thinking mode, and cost tracking.
by arikusihashgraph-online/hashnet-mcp-js
MCP server for the Registry Broker. Discover, register, and chat with AI agents on the Hashgraph network.
by hashgraph-onlineprofullstack/mcp-server
A comprehensive MCP server aggregating 20+ tools including SEO optimization, document conversion, domain lookup, email validation, QR generation, weather data,
by profullstackWayStation-ai/mcp
Seamlessly and securely connect Claude Desktop and other MCP hosts to your favorite apps (Notion, Slack, Monday, Airtable, etc.). Takes less than 90 secs.
by waystation-aiCompare Webhook Verify with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All communication MCPs
