Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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), }, ], }; },
  • 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), }, ], }; }, });

Latest Blog Posts

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