Mercure hub discovery

Demo · format-valid IANA · provisional

/.well-known/mercure

Standard: Mercure

Real-time updates protocol discovery: where a site advertises its Mercure hub.

What it is

Mercure is a publish-subscribe protocol built on Server-Sent Events. A site can advertise its hub by serving /.well-known/mercure with the publish and subscribe URLs (and optional JWT), so clients can subscribe to live updates without configuration.

The threat it addresses

Live updates need a server push channel; SSE-based Mercure avoids WebSocket complexity but clients must find the hub. Well-known discovery makes the hub URL deterministic.

How it works

  • The site serves /.well-known/mercure with publishUrl, subscribeUrl and jwt.
  • Clients subscribe via EventSource to the subscribe URL and receive updates as SSE.

Honesty notes

  • Demo: URLs are illustrative — no real hub runs here.

Try it

Live demo

Format-valid demo (no real hub)

Content-Type: application/json; charset=utf-8
{
  "mercure": {
    "publishUrl": "https://well-known.page/demo/mercure/publish",
    "subscribeUrl": "https://well-known.page/demo/mercure/subscribe",
    "_demo_note": "Illustrative Mercure hub discovery. No real hub runs here."
  }
}