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.

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.

BehaviorWhat MCPBackend doesWhat your handler should doGuide
OrderingNo 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 →
RetriesOne attempt per webhook, no queue and no retries.Reconcile against the data API on a schedule.No retries →
Timeout5 seconds per delivery. Several webhooks for one write are sent one after another.Return 2xx fast and do the work afterwards.Five-second timeout →
Signaturex-mcpbackend-signature: sha256= HMAC-SHA256 of the raw body.Verify the raw bytes before parsing JSON.Raw-body signatures →
Event idevt_ id in the body and the x-mcpbackend-delivery header.Store processed ids and skip repeats.Deduplication →
Deletesdata holds only the primary key. Sent even if no row had that id.Remove downstream items idempotently.Delete payloads →
New webhooksWebhook config is cached for about 30 seconds.Wait before testing a new or changed webhook.Configuration delay →
PRACTICAL FIELD GUIDE

Verify webhook signatures using the raw body

A webhook signature authenticates the exact request bytes used by the sender.

Read the guide →
PRACTICAL FIELD GUIDE

Check signature length before a timing-safe comparison

A timing-safe comparison routine may require equal-length inputs.

Read the guide →
PRACTICAL FIELD GUIDE

A webhook signature fails with the wrong secret

Each webhook signing configuration needs the corresponding receiver secret.

Read the guide →
PRACTICAL FIELD GUIDE

Keep webhook handling within the delivery timeout

MCPBackend's current webhook attempt has a five-second timeout.

Read the guide →
PRACTICAL FIELD GUIDE

MCPBackend webhooks do not automatically retry

Current webhook delivery makes one attempt without automatic retries.

Read the guide →
PRACTICAL FIELD GUIDE

Deduplicate 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 GUIDE

Webhook 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 GUIDE

Choose webhook patterns that match the intended operation

Webhook subscriptions match table-and-operation event names.

Read the guide →
PRACTICAL FIELD GUIDE

A 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 GUIDE

Reconcile webhook consumers against the data API

A reconciliation routine compares the consumer's stored state with the authoritative backend.

Read the guide →
PRACTICAL FIELD GUIDE

Handle 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 GUIDE

Rotate 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 GUIDE

Prevent 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 →