Skip to main content
Glama
dewanshparashar

Arbitrum MCP Server

chain_info

Retrieve detailed chain-specific data like rollup and bridge contract addresses, chain ID, RPC URL, explorer URL, and native token details for Arbitrum chains including Xai, Arbitrum One, and Nova.

Instructions

Get comprehensive chain information including rollup contract address, bridge addresses, chain ID, RPC URL, explorer URL, native token details, and all bridge contract addresses. Use this for questions about rollup addresses, bridge contracts, chain IDs, or any chain-specific data for Arbitrum chains like Xai, Arbitrum One, etc.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNameYesChain name to look up (e.g., 'Xai', 'Arbitrum One', 'Nova', 'Stylus')

Implementation Reference

  • Handler for the 'chain_info' tool that resolves the chain name using ChainLookupService.findChainByName and returns the chain data as formatted JSON or an error message if the chain is not found.
    case "chain_info": const chainInfo = await this.chainLookupService.findChainByName( args.chainName as string ); if (!chainInfo) { return { content: [ { type: "text", text: `Chain "${args.chainName}" not found`, }, ], }; } return { content: [ { type: "text", text: JSON.stringify(chainInfo, null, 2), }, ], };
  • src/index.ts:1064-1078 (registration)
    Tool registration entry in getAvailableTools() that defines the name, description, and input schema for the 'chain_info' tool.
    name: "chain_info", description: "Get comprehensive chain information including rollup contract address, bridge addresses, chain ID, RPC URL, explorer URL, native token details, and all bridge contract addresses. Use this for questions about rollup addresses, bridge contracts, chain IDs, or any chain-specific data for Arbitrum chains like Xai, Arbitrum One, etc.", inputSchema: { type: "object" as const, properties: { chainName: { type: "string", description: "Chain name to look up (e.g., 'Xai', 'Arbitrum One', 'Nova', 'Stylus')", }, }, required: ["chainName"], }, },
  • Core helper function findChainByName that performs exact, slug, or partial matching to retrieve OrbitChainData from the cached chains list.
    async findChainByName(name: string): Promise<OrbitChainData | null> { await this.ensureChainsData(); const searchName = name.toLowerCase().trim(); // Try exact name match first let chain = this.chainsData.find(chain => chain.name.toLowerCase() === searchName ); if (!chain) { // Try slug match chain = this.chainsData.find(chain => chain.slug?.toLowerCase() === searchName ); } if (!chain) { // Try partial name match chain = this.chainsData.find(chain => chain.name.toLowerCase().includes(searchName) || searchName.includes(chain.name.toLowerCase()) ); } return chain || null; }
  • Type definition for OrbitChainData interface used as the output structure for chain information returned by the tool.
    export interface OrbitChainData { chainId: number; name: string; slug: string; parentChainId: number; rpcUrl: string; explorerUrl?: string; nativeCurrency: { name: string; symbol: string; decimals: number; }; isArbitrum: boolean; isMainnet: boolean; isCustom?: boolean; isTestnet?: boolean; // Ethereum Bridge Contract Addresses (nested under ethBridge) ethBridge?: { bridge: string; inbox: string; outbox: string; rollup: string; sequencerInbox: string; }; // Legacy flat structure for backward compatibility bridge?: string; inbox?: string; outbox?: string; rollup?: string; sequencerInbox?: string; // Token Bridge Contract Addresses parentCustomGateway?: string; parentErc20Gateway?: string; parentGatewayRouter?: string; childCustomGateway?: string; childErc20Gateway?: string; childGatewayRouter?: string; // UI Configuration color?: string; description?: string; logo?: string; // Native Token (for custom tokens) nativeToken?: { name: string; symbol: string; decimals: number; address?: string; }; }

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/dewanshparashar/arbitrum-mcp'

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