Skip to content

Events webhook: receive and display deliveries in the Inspector (local receiver + user-supplied tunnel) #3064

Done

Description

@BobDickinson

Summary

The Events extension's webhook delivery mode (#3026, shipped in #3040/#3031) covers subscription management only — subscribe, refresh, deliveryStatus, unsubscribe. The Inspector never stands up anything to actually receive a delivery, so a server author debugging a webhook event type still has to reach for an external tool (RequestBin, a manual ngrok/curl setup, etc.) just to see what's being sent.

This was a deliberate scope cut in #3026, not an oversight:

Webhook receipt is not practical for a local Inspector. The callback must be https and globally routable (the server rejects private addresses for SSRF), and the server must verify the endpoint. So webhook support is subscription management only... Receiving deliveries in-app is a non-goal for this issue.

This issue tracks doing the receiving half anyway, accepting that it needs a tunnel the user supplies themselves.

Precedent. This is not a novel ask:

  • MCPJam's Inspector already does this: its local app offers a callback picker — "This machine" (its own local address, plain http, gated behind an explicit "allow plain HTTP for local dev" opt-in since conformant servers refuse it) or "Custom URL" (a public https tunnel/reverse-proxy address, with the forwarding rule to configure shown alongside it). Both have equivalent CLI flags.
  • n8n's N8N_WEBHOOK_URL env var is the same shape we're proposing below: override the public base URL for webhooks, falling back to a value derived from the bind host/port when unset.

Proposed design

Receiver route. A new route on the existing Inspector web server (clients/web/server) — not a separate process. It must live outside the /api/* auth gate: every /api/* route requires x-mcp-remote-auth: Bearer <MCP_INSPECTOR_API_TOKEN> (browser↔backend auth), which the external MCP server delivering a webhook has no way to supply. The Standard Webhooks signature check is the trust boundary for this route instead (same shape as /health already being outside /api/*, for the same can't-authenticate-this-caller reason).

One shared path, not one per subscription. events/subscribe's response id is, per SEP-3415, "deterministic over (principal, delivery.url, name, arguments)... so that the receiver can route deliveries: it appears in the X-MCP-Subscription-Id header on every POST." So a single receiver path demuxes each inbound delivery by that header, matched against the id returned at subscribe time, to find the right subscription record/secret to verify against — no need to mint a per-subscription path segment ourselves.

Base URL configuration, consistent with the existing MCP_SANDBOX_FULL_ADDRESS / MCP_APP_ORIGIN_FULL_ADDRESS precedent (server/public-address.ts) and mirroring n8n's N8N_WEBHOOK_URL:

  • A new env var (MCP_WEBHOOK_PUBLIC_ADDRESS or similar) plus an equivalent launcher/CLI flag, same precedence pattern used elsewhere (flag > env var > default).
  • Default unset/null → falls back to a localhost URL derived from the bind, same as the sandbox/app-origin fallback.
  • If the tunnel host changes mid-session, that's on the user to handle (restart with a new flag/env var, or re-set it live) — Inspector does not manage the tunnel.
  • Also editable at runtime in Inspector-level Settings (not per-server — it's a deployment property, not a connection property), so a user can update it after starting a tunnel without restarting the process.

Verification and display.

  • Each inbound POST's Standard Webhooks signature is verified against the whsec_ secret already generated/held for that subscription. A failed/unsigned POST is rejected and surfaced as an error, not silently dropped.
  • Verified deliveries are appended to the subscription's occurrence/event log in the Events tab — the same place poll/push occurrences already render — payload shown as inert JSON only (deliveries are untrusted input, same rule as live occurrences).
  • Docs: note the tunnel requirement and link to the test-servers webhook walkthrough (docs/test-servers.md) for a by-hand way to exercise it without a real tunnel.

Out of scope (for this issue)

  • Automatically provisioning or managing a tunnel on the user's behalf.
  • CLI/TUI support (web only, for now).
  • Anything to do with poll/push delivery modes — unaffected by this.

References

Activity

  1. added this to the v2.18.0 milestone on Nov 27, 2026
  2. added
    enhancement
    v2
    on Nov 27, 2026
  3. BobDickinson commented on Nov 27, 2026

    @BobDickinson
    ContributorAuthor

    Triage: Priority Low (total 5)

    • Severity 3 — a real (debugging) capability is missing: a webhook delivery can be subscribed to but never observed in-app, so authors fall back to an external tool
    • Urgency 2 — wanted eventually; nothing blocks on it and no dated external dependency
    • Bonuses: none

    Board: #28, Status Todo, milestone v2.18.0 (filed through the create flow).

  4. self-assigned this
    on Nov 30, 2026
  5. cliffhall commented on Nov 30, 2026

    @cliffhall
    Member

    Shipped in #3093 (merged into v2/main). It was also proven alongside the rest of the v2.18.0 non-CLI PRs in the rollup check #3096.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementv2

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions