get-chain-list
Retrieve comprehensive details of all blockchain chains supported by MetaMask MCP, enabling secure integration and interaction with multiple chains directly from your crypto wallet.
Instructions
Get a list of all chains information.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/chainlist.ts:9-26 (handler)The handler function for the 'get-chain-list' tool. It fetches chain data from 'https://chainlist.org/rpcs.json', parses it as JSON, and returns it as a text content block.execute: async () => { const url = "https://chainlist.org/rpcs.json"; const response = await fetch(url); if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } const data = await response.json(); return { content: [ { type: "text", text: JSON.stringify(data), }, ], }; },
- src/tools/chainlist.ts:5-27 (registration)Registers the 'get-chain-list' tool with the FastMCP server, including name, description, empty input schema, and the execute handler.server.addTool({ name: "get-chain-list", description: "Get a list of all chains information.", parameters: z.object({}), execute: async () => { const url = "https://chainlist.org/rpcs.json"; const response = await fetch(url); if (!response.ok) { throw new Error(`HTTP error! status: ${response.status}`); } const data = await response.json(); return { content: [ { type: "text", text: JSON.stringify(data), }, ], }; }, });