getSupportedNetworks
Retrieve a list of all supported blockchain networks and their configurations for interacting with Ethereum-based systems through the MCP Ethers Wallet server.
Instructions
Get a list of all supported networks and their configurations. For more detailed information about networks, use the getAllNetworks and getNetwork tools.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/core.ts:26-49 (handler)The complete registration and inline handler for the 'getSupportedNetworks' tool. It takes no parameters, calls ethersService.getSupportedNetworks(), and returns the networks as formatted JSON or an error message.server.tool( "getSupportedNetworks", "Get a list of all supported networks and their configurations. For more detailed information about networks, use the getAllNetworks and getNetwork tools.", {}, async () => { try { const networks = await ethersService.getSupportedNetworks(); return { content: [{ type: "text", text: JSON.stringify(networks, null, 2) }] }; } catch (error) { return { isError: true, content: [{ type: "text", text: `Error getting supported networks: ${error instanceof Error ? error.message : String(error)}` }] }; } } );
- src/tools/index.ts:23-23 (registration)Calls registerCoreTools which registers the getSupportedNetworks tool among others.registerCoreTools(server, ethersService);
- src/mcpServer.ts:51-51 (registration)Top-level registration call that leads to getSupportedNetworks tool being registered.registerAllTools(server, ethersService);
- src/config/networks.ts:39-76 (helper)Defines the list of DEFAULT_PROVIDERS which is likely returned by ethersService.getSupportedNetworks().export const DEFAULT_PROVIDERS: DefaultProvider[] = [ "Ethereum", "Polygon PoS", "Arbitrum", "Arbitrum Nova", "Optimism", "Avalanche C-Chain", "Gnosis", "CrossFi", "Berachain", "Lens", "World Chain", "Base", "Unichain", "Geist", "ZKsync", "Abstract", "Polygon zkEVM", "Blast", "Linea", "Flow", "Soneium", "Fantom Opera", "BNB Smart Chain", "opBNB Chain", "Rootstock", "Lumia", "ZetaChain", "Mantle", "Metis", "Astar", "Holešky", "Scroll", "Monad Testnet", "MEGA Testnet", "Rari Chain Mainnet", "Sonic Mainnet", ];