mercure Documentation

An open, easy, fast, reliable and battery-efficient solution for real-time communications

RAW Doc

Docker & Self-Hosted Deployment Verified OCI

Deploy mercure on any server, homelab, or cloud container platform.

1-Click Terminal Command
bash (docker run)
docker run -d --name mercure -p 8080:8080 --restart always dunglas/mercure:latest

Mercure.rocks

Mercure is an open real-time protocol that pushes updates from a server to connected clients over plain HTTP and Server-Sent Events. The Mercure.rocks Hub is the production-ready, AGPL-3.0 reference implementation, with OAuth 2.0 authorization (RFC 9068 access tokens, RFC 9396 authorization_details, RFC 6750 errors, RFC 9728 discovery), reconnection, replay, and two topic matcher types (Exact and URL Pattern). Use it for LLM token streaming, AI agent state sync, live dashboards, collaborative editing, async job progress, in-app notifications, and any case where a server has fresh data to push to web, mobile, or server clients.

Core concepts

Setup and deployment

AI and LLM use cases

Application use cases

Production

Reference

  • Mercure protocol specification: The IETF Internet-Draft canonical protocol specification.
  • Mercure protocol overview: Quick orientation to subscriptions, publications, authorization, replay, and matchers.
  • Mercure FAQ: Comparisons with WebSockets, Pusher, Ably, WebSub, Web Push, plus connection limits and history.
  • Mercure hub license: AGPL-3.0 reference hub, open protocol specification, commercial Self-Hosted licensing.
  • Mercure 1.0 upgrade guide: Migration from Mercure 0.x to 1.0: two matcher types, OAuth 2.0 access tokens, RFC 6750 errors, new subscription API.

Ecosystem

Optional