Skip to main content
Glama
dewanshparashar

Arbitrum MCP Server

chain_info

Retrieve chain-specific data for Arbitrum networks including contract addresses, chain IDs, RPC URLs, and native token details to support development and monitoring tasks.

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

  • Executes the chain_info tool by invoking ChainLookupService.findChainByName(chainName) and returning the chain information as JSON text content or error if 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:1063-1078 (registration)
    Registers the chain_info tool in the list of available tools, including its description and input schema requiring 'chainName'.
    { 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"], }, },
  • Defines the OrbitChainData interface which structures the output data returned by the chain_info 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; }; }
  • Core helper function that performs fuzzy matching on chain names (exact, slug, partial) to retrieve OrbitChainData from 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; }

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