For AI agents: a documentation index is available at /llms.txt. A markdown version of this page is available at the same URL with .md appended (or via Accept: text/markdown).
Skip to main content

Integration options

MetaMask Connect offers three integration paths:

  • Multichain (@metamask/connect-multichain) for connecting to EVM and Solana in a single session.
  • Single-ecosystem (@metamask/connect-evm or @metamask/connect-solana) for drop-in per-chain providers.
  • Multi-ecosystem (both single-ecosystem packages together) for dapps supporting both chains with familiar interfaces.

We recommend using the multichain client, which provides a single connection prompt across all ecosystems. If your dapp targets a single chain or you prefer per-chain provider interfaces, you can use the single-ecosystem or multi-ecosystem option.

All options share the same underlying transport and session infrastructure, so you can start with the option that fits your dapp today and migrate later. The EVM and Solana clients wrap the same createMultichainClient singleton core.

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

Single-ecosystem

If your dapp targets a single ecosystem, use @metamask/connect-evm or @metamask/connect-solana to add MetaMask Connect to an existing dapp with minimal code changes.

  • EVM: Provides an EIP-1193 compatible provider that works with ethers.js, viem, and web3.js.
  • Solana: Provides a Wallet Standard compatible wallet that works with the Solana Wallet Adapter ecosystem.

Multi-ecosystem

If your dapp supports both EVM and Solana, use @metamask/connect-evm and @metamask/connect-solana together to support both ecosystems while keeping familiar provider interfaces for each.

Compare options

MultichainSingle-ecosystemMulti-ecosystem
Packageconnect-multichainconnect-evm or connect-solanaBoth connect-evm and connect-solana
EffortMedium (scope-based API)Low (drop-in provider)Low (two providers)
EVM supportVia wallet_invokeMethodEIP-1193 providerEIP-1193 provider
Solana supportVia wallet_invokeMethodWallet StandardWallet Standard
Cross-chain UXSingle prompt for all ecosystemsSingle ecosystemSeparate connect per ecosystem
SessionsFull controlAutomaticAutomatic per-client
Best forMultichain-native dappsExisting single-chain dappsDapps supporting EVM and Solana

Frequently asked questions

Which integration option should I choose?

Choose multichain (@metamask/connect-multichain) if your dapp needs to connect to both EVM and Solana in a single session with one approval prompt. Choose single-ecosystem (@metamask/connect-evm or @metamask/connect-solana) if your dapp targets one chain and you want a drop-in provider compatible with existing libraries. Choose multi-ecosystem (both single-ecosystem packages) if you want per-chain providers for both EVM and Solana.

Can I migrate between integration options later?

Yes. All three options share the same underlying transport and session infrastructure, so you can start with a single-ecosystem client and migrate to multichain later without changing your backend or connection logic. The migration involves updating your client initialization code and adopting scope-based RPC routing.

Does MetaMask Connect work with Wagmi, ethers.js, and viem?

Yes. The EVM client (@metamask/connect-evm) provides an EIP-1193 compatible provider that works directly with viem's custom transport, ethers.js BrowserProvider, and web3.js Web3 constructor. The Solana client provides a Wallet Standard compatible wallet that works with the Solana Wallet Adapter ecosystem.