Skip to main content
Glama

MetaMask MCP

by Xiawpohr

switch-chain

Change the active blockchain network in MetaMask by specifying the desired chain ID or adding new chains with required parameters for Ethereum wallet integration.

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" }

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Xiawpohr/metamask-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server