Guides
Connect a wallet
metamask-mcp connects to MetaMask Mobile with a QR code. Once connected, the agent can read your address and send prompts to your wallet.
Connect#
Just ask:
Connect my MetaMask wallet.Behind the scenes, the agent follows these steps:
Check for an existing connection
get-accountreturns the connected address, or nothing if no wallet is connected yet.Create a connect link
get-connect-uristarts a MetaMask connection and returns a one-time URI.Show the QR code
show-connect-qrcodeturns that URI into a QR code image in the chat. Open MetaMask Mobile, tap the scan icon, scan the code, and approve the connection.Confirm
get-accountnow returns your address andget-chain-idthe network your wallet is on.
Choose a network#
metamask-mcp is configured for two networks:
- Ethereum Mainnet — chain ID
1 - Sepolia testnet — chain ID
11155111
Switch to Sepolia.The agent calls switch-chain and MetaMask asks you to approve the switch. Use get-chains to see the configured networks at any time.
Disconnect#
Disconnect my wallet.disconnect ends the session. The session also ends whenever the server stops, for example when you quit your MCP client, so you'll scan a fresh code next time.
Next#
With a wallet connected, try sending tokens or deploying a contract.