Skip to main content
Glama
dewanshparashar

Arbitrum MCP Server

gas_status

Monitor current gas prices on Arbitrum chains to identify spikes, understand transaction costs, and track network congestion for project management and support teams.

Instructions

Monitor current gas prices on the chain. Essential for identifying gas price spikes and understanding transaction costs. Useful for PM and support teams to monitor network congestion.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
rpcUrlNoThe RPC URL of the Arbitrum chain (optional if default is set)
chainNameNoChain name (e.g., 'Xai', 'Arbitrum One') - will auto-resolve to RPC URL

Implementation Reference

  • Core handler function in ArbitrumChainClient that fetches current gas price using viem's publicClient.getGasPrice(), converts to gwei, and returns formatted GasStatus object.
    async getGasStatus(): Promise<GasStatus> { try { const gasPrice = await this.publicClient.getGasPrice(); const gasPriceGwei = (Number(gasPrice) / 1e9).toFixed(2); const summary = `Current gas price: ${gasPriceGwei} gwei (${gasPrice.toString()} wei)`; return { currentGasPrice: gasPrice.toString(), currentGasPriceGwei: gasPriceGwei, summary }; } catch (error) { return { currentGasPrice: "0", currentGasPriceGwei: "0", summary: `Error checking gas price: ${error instanceof Error ? error.message : 'Unknown error'}` }; } }
  • src/index.ts:759-773 (registration)
    MCP server handler registration for 'gas_status' tool: resolves RPC URL, instantiates ArbitrumChainClient, calls getGasStatus(), and returns JSON response.
    case "gas_status": { const rpcUrl = await this.resolveRpcUrl( (args.rpcUrl as string) || (args.chainName as string) ); const chainDataClient = new ArbitrumChainClient(rpcUrl); const status = await chainDataClient.getGasStatus(); return { content: [ { type: "text", text: JSON.stringify(status, null, 2), }, ], }; }
  • Tool schema definition for 'gas_status' in getAvailableTools(): defines name, description, and inputSchema (optional rpcUrl or chainName).
    name: "gas_status", description: "Monitor current gas prices on the chain. Essential for identifying gas price spikes and understanding transaction costs. Useful for PM and support teams to monitor network congestion.", inputSchema: { type: "object" as const, properties: { rpcUrl: { type: "string", description: "The RPC URL of the Arbitrum chain (optional if default is set)", }, chainName: { type: "string", description: "Chain name (e.g., 'Xai', 'Arbitrum One') - will auto-resolve to RPC URL", }, }, required: [], }, },
  • TypeScript interface defining the output structure for GasStatus returned by getGasStatus().
    export interface GasStatus { currentGasPrice: string; // in wei currentGasPriceGwei: string; // in gwei for readability summary: 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