get_supported_networks
Retrieve a list of supported EVM networks through the EVM MCP Server, simplifying integration with 30+ Ethereum-compatible blockchains for token transfers, contract interactions, and ENS resolution.
Instructions
Get a list of supported EVM networks
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/core/tools.ts:120-132 (handler)The async handler function registered for the MCP tool 'get_supported_networks'. It calls getSupportedNetworks(), formats the result as JSON text content, and handles errors.async () => { try { const networks = getSupportedNetworks(); return { content: [{ type: "text", text: JSON.stringify({ supportedNetworks: networks }, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error: ${error instanceof Error ? error.message : String(error)}` }], isError: true }; } }
- src/core/tools.ts:109-119 (schema)The input schema (empty object), description, and annotations for the 'get_supported_networks' tool.{ description: "Get a list of all supported EVM networks", inputSchema: {}, annotations: { title: "Get Supported Networks", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false } },
- src/core/tools.ts:107-133 (registration)The server.registerTool call that registers the 'get_supported_networks' tool with its schema and handler.server.registerTool( "get_supported_networks", { description: "Get a list of all supported EVM networks", inputSchema: {}, annotations: { title: "Get Supported Networks", readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false } }, async () => { try { const networks = getSupportedNetworks(); return { content: [{ type: "text", text: JSON.stringify({ supportedNetworks: networks }, null, 2) }] }; } catch (error) { return { content: [{ type: "text", text: `Error: ${error instanceof Error ? error.message : String(error)}` }], isError: true }; } } );
- src/core/chains.ts:353-357 (helper)The core utility function getSupportedNetworks() that extracts and sorts the list of supported network names from the networkNameMap, excluding short aliases like 'eth' or 'op'.export function getSupportedNetworks(): string[] { return Object.keys(networkNameMap) .filter(name => name.length > 2) // Filter out short aliases .sort(); }