Skip to main content

Connect to EVM networks

Use @metamask/connect-evm to connect your dapp to Ethereum and other EVM networks in the MetaMask mobile app or browser extension. The MetaMask Connect EVM client provides an EIP-1193-compatible provider with the same shape as window.ethereum, meaning existing viem, ethers.js, or web3.js code works with minimal changes.

MetaMask Connect also includes automatic platform detection, relay-based connections, and session persistence.

Multichain support

If your dapp supports both EVM and Solana, use both the EVM and Solana clients. They share the same underlying multichain session, meaning the user only approves once.

Supported platforms and libraries

MetaMask Connect supports multiple integration paths. You can install it from npm, use it through developer libraries such as Wagmi, or integrate it through supported third-party libraries.

Choose a quickstart based on your stack.

Library compatibility

The EVM client works seamlessly with popular Ethereum libraries:

LibraryCompatibility
viemUse with custom() transport
ethers.jsPass client.getProvider() to BrowserProvider
web3.jsPass client.getProvider() to Web3 constructor