Connect to EVM networks
@metamask/connect-evm is the modern replacement for @metamask/sdk.
Use it to connect your dapp to Ethereum and other EVM networks in the MetaMask mobile app
or browser extension.
The 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.
It also includes automatic platform detection, relay-based connections, session persistence, and
convenience methods like connectAndSign and
connectWith.
@metamask/sdk?See the migration guide for a step-by-step upgrade path covering package changes, API differences, and new capabilities.
If your dapp supports (or plans to support) both EVM and Solana, you can use the multichain client instead. The EVM and Solana clients share the same underlying multichain session, meaning the user only approves once. See the multichain quickstart to get started.
Supported platforms and libraries
MetaMask Connect EVM 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:
| Library | Compatibility |
|---|---|
| viem | Use with custom() transport |
| ethers.js | Pass client.getProvider() to BrowserProvider |
| web3.js | Pass client.getProvider() to Web3 constructor |