Skip to main content

Architecture

When a user connects, MetaMask Connect automatically handles the following:

  1. Platform detection: Checks for the MetaMask extension, browser type, and device.
  2. Transport selection: Connects directly to the extension, or falls back to a QR code or deeplink relay.
  3. Session creation: Establishes a CAIP-25 session for the requested chains.
  4. End-to-end encryption: Encrypts relay connections so the relay server never sees message content.
  5. Session persistence: Preserves sessions across page reloads and new tabs.

The following diagram illustrates this: