Skip to main content

Seamlessly connect to the MetaMask wallet

MetaMask Connect enables a fast, reliable connection from your dapp to the MetaMask browser extension and the MetaMask mobile app. With a single integration, you can onboard users and interact with their accounts across desktop browsers, mobile browsers, and native apps.

MetaMask Connect replaces the legacy MetaMask SDK with a complete rewrite built on the CAIP-25 Multichain API. The MetaMask Connect SDK detects the user’s environment and selects the best connection method, whether it communicates directly with the MetaMask browser extension, prompts the user to scan a QR code, or deep links to the MetaMask mobile app.

Why use MetaMask Connect?

If the MetaMask browser extension is installed, standards such as EIP-6963 support wallet discovery. When the extension isn't available (for example, on mobile, in a different browser, or on a new device), users need another way to connect. MetaMask Connect fills that gap and provides the following benefits:

  1. Cross-platform connections: Reach users on any device. When the MetaMask browser extension isn’t available, MetaMask Connect connects users through the MetaMask mobile app with no additional setup.
  2. Multichain sessions : Request access to EVM, Solana, and future ecosystems in a single connection instead of connecting per chain.
  3. Persistent sessions: Keep sessions across page reloads and new tabs so users don’t need to reconnect.
  4. Consistent APIUse the same interface whether users connect through the extension or MetaMask Mobile.

Get started

Integration options

There are three ways to integrate, depending on what works best for your dapp:

Option A: Single-ecosystem client (drop-in for existing dapps)

If your dapp targets a single ecosystem, use @metamask/connect-evm or @metamask/connect-solana for a familiar experience with minimal changes to your existing code.

  • EVM: Provides an EIP-1193 compatible provider, so existing ethers.js, viem, or web3.js integrations work with minimal changes.
  • Solana: Provides a Wallet Standard compatible wallet that integrates with the Solana wallet adapter ecosystem.

Use this option when you want to add MetaMask Connect to an existing single-ecosystem dapp.

Option B: Multiple ecosystem clients

If your dapp supports both EVM and Solana, use @metamask/connect-evm and @metamask/connect-solana together. This option gives you ecosystem-specific APIs while supporting both ecosystems, and is a good fit when you want to keep familiar provider interfaces for each ecosystem.

Use @metamask/connect-multichain to work directly with the Multichain API. This option uses scopes and wallet_invokeMethod instead of per-chain RPC and supports a single connection prompt across ecosystems.. This is the recommended long-term path.

All options use the same underlying multichain client and share transport and session infrastructure. You can start with the option that fits your dapp today and move to the multichain client (Option C) when you need full multichain control.

Packages

PackagePurpose
@metamask/connect-evmEVM client — EIP-1193 provider
@metamask/connect-solanaSolana client — Wallet Standard
@metamask/connect-multichainMultichain client — full Multichain API