Skip to main content
Glama

MCPilot

by Xiawpohr
chainlist.ts682 B
import { FastMCP } from "fastmcp"; import { z } from "zod"; export function registerChainlistTools(server: FastMCP): void { 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) } ] } }, }); };

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/mcpilot'

If you have feedback or need assistance with the MCP directory API, please join our Discord server