13 FOCUSED GUIDES
Webhooks & events
Verify signed notifications, handle uncertainty and reconcile state without assuming guaranteed delivery.
MCPBackend sends a signed HTTPS POST when rows are created, updated or deleted through the data API. Delivery is a single attempt with a five-second timeout, with no retries and no ordering guarantee. These guides show how to build a consumer that copes with that: verifying the signature on the raw body, handling events that arrive out of order, deduplicating deliveries and reconciling against the API when an event is missed.
MCPBackend webhooks currently make one delivery attempt with a five-second timeout and no retry or ordering guarantee. Treat them as change notifications, not a durable event ledger. For workflows that must complete, use a durable processing system you operate and reconcile its state against the data API.
START HEREWebhook ordering: handle out-of-order and duplicate events →Deduplicate webhook events →Verify signatures on the raw body →No retries: plan for missed events →
Plan the backend workload →MCPBackend webhook delivery at a glance
How delivery works today, checked against the data API source. Each row links to the guide that shows the handler code.
| Behavior | What MCPBackend does | What your handler should do | Guide |
|---|---|---|---|
| Ordering | No ordering guarantee. Each write fires its own deliveries after the API response. | Re-read the row, or apply an event only if its version is newer. | Webhook ordering → |
| Retries | One attempt per webhook, no queue and no retries. | Reconcile against the data API on a schedule. | No retries → |
| Timeout | 5 seconds per delivery. Several webhooks for one write are sent one after another. | Return 2xx fast and do the work afterwards. | Five-second timeout → |
| Signature | x-mcpbackend-signature: sha256= HMAC-SHA256 of the raw body. | Verify the raw bytes before parsing JSON. | Raw-body signatures → |
| Event id | evt_ id in the body and the x-mcpbackend-delivery header. | Store processed ids and skip repeats. | Deduplication → |
| Deletes | data holds only the primary key. Sent even if no row had that id. | Remove downstream items idempotently. | Delete payloads → |
| New webhooks | Webhook config is cached for about 30 seconds. | Wait before testing a new or changed webhook. | Configuration delay → |
Verify webhook signatures using the raw body
A webhook signature authenticates the exact request bytes used by the sender.
Read the guide →PRACTICAL FIELD GUIDECheck signature length before a timing-safe comparison
A timing-safe comparison routine may require equal-length inputs.
Read the guide →PRACTICAL FIELD GUIDEA webhook signature fails with the wrong secret
Each webhook signing configuration needs the corresponding receiver secret.
Read the guide →PRACTICAL FIELD GUIDEKeep webhook handling within the delivery timeout
MCPBackend's current webhook attempt has a five-second timeout.
Read the guide →PRACTICAL FIELD GUIDEMCPBackend webhooks do not automatically retry
Current webhook delivery makes one attempt without automatic retries.
Read the guide →PRACTICAL FIELD GUIDEDeduplicate webhook processing by event identity
A receiver should avoid repeating an action if the same event is presented more than once.
Read the guide →PRACTICAL FIELD GUIDEWebhook arrival order is not record-update order
Webhooks do not guarantee arrival ordering, so the last notification received may not describe the latest record state.
Read the guide →PRACTICAL FIELD GUIDEChoose webhook patterns that match the intended operation
Webhook subscriptions match table-and-operation event names.
Read the guide →PRACTICAL FIELD GUIDEA new webhook is not active immediately
Webhook configuration is cached briefly at the edge, so a newly created or disabled subscription can take time to be observed.
Read the guide →PRACTICAL FIELD GUIDEReconcile webhook consumers against the data API
A reconciliation routine compares the consumer's stored state with the authoritative backend.
Read the guide →PRACTICAL FIELD GUIDEHandle deletion events without assuming a later fetch succeeds
After a deletion, a follow-up record fetch may correctly return not found.
Read the guide →PRACTICAL FIELD GUIDERotate a webhook secret with a receiver transition plan
A webhook secret change requires coordination between the emitting subscription and the receiver configuration.
Read the guide →PRACTICAL FIELD GUIDEPrevent a webhook consumer from creating an event loop
A consumer that writes back to the same subscribed table can trigger another notification.
Read the guide →