MetaMask MCP

switch-chain

Switch blockchain networks in MetaMask MCP by specifying the chain ID. Add new chains by providing essential parameters like chain name, native currency, and RPC URLs.

Instructions

Switch the target chain.

Input Schema

NameRequiredDescriptionDefault
addEthereumChainParameterNoAdd not configured chains to Ethereum wallets.
chainIdYesID of chain to switch to.

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "addEthereumChainParameter": { "additionalProperties": false, "description": "Add not configured chains to Ethereum wallets.", "properties": { "blockExplorerUrls": { "items": { "type": "string" }, "type": "array" }, "chainName": { "type": "string" }, "iconUrls": { "items": { "type": "string" }, "type": "array" }, "nativeCurrency": { "additionalProperties": false, "properties": { "decimals": { "type": "number" }, "name": { "type": "string" }, "symbol": { "type": "string" } }, "required": [ "name", "symbol", "decimals" ], "type": "object" }, "rpcUrls": { "items": { "type": "string" }, "minItems": 1, "type": "array" } }, "required": [ "chainName", "nativeCurrency", "rpcUrls" ], "type": "object" }, "chainId": { "description": "ID of chain to switch to.", "type": "number" } }, "required": [ "chainId" ], "type": "object" }
ID: cw2ldcetl4