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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/get-chains.ts:12-22 (handler)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), }, ], }; },
- src/tools/get-chains.ts:11-11 (schema)Input schema for the get-chains tool: no parameters (empty object).parameters: z.object({}),
- src/tools/get-chains.ts:8-23 (registration)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), }, ], }; }, });
- src/tools/register-tools.ts:45-45 (registration)Invokes registerGetChainsTools as part of the central registerTools function that sets up all tools.registerGetChainsTools(server, wagmiConfig);