Skip to main content
Glama

get-chains

Retrieve the configured blockchain chains integrated with MetaMask MCP server, enabling secure interaction with decentralized networks without exposing private keys.

Instructions

Get the configured chains.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Executes the get-chains tool: calls getChains from wagmi/core with the config and returns the result as a JSON string in MCP text content format.
    execute: async () => { const result = getChains(wagmiConfig); return { content: [ { type: "text", text: JSONStringify(result), }, ], }; },
  • Input schema for the get-chains tool: no parameters (empty object).
    parameters: z.object({}),
  • Registers the get-chains tool on the FastMCP server within the registerGetChainsTools function.
    server.addTool({ name: "get-chains", description: "Get the configured chains.", parameters: z.object({}), execute: async () => { const result = getChains(wagmiConfig); return { content: [ { type: "text", text: JSONStringify(result), }, ], }; }, });
  • Invokes registerGetChainsTools as part of the central registerTools function that sets up all tools.
    registerGetChainsTools(server, wagmiConfig);

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