Skip to main content
Glama
dewanshparashar

Arbitrum MCP Server

arbtrace_replayTransaction

Replay and trace a transaction on Arbitrum chains using a transaction hash. Supports multiple trace types to analyze transaction details and state changes.

Instructions

Replay and trace a specific transaction (requires trace API)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
chainNameNoChain name (e.g., 'Xai', 'Arbitrum One') - will auto-resolve to RPC URL
rpcUrlNoThe RPC URL of the Arbitrum node (optional if default is set)
traceTypesNoArray of trace types (e.g., ['trace', 'stateDiff'])
txHashYesTransaction hash to replay

Implementation Reference

  • Core handler function in NitroNodeClient that executes the RPC call to 'arbtrace_replayTransaction' on the Arbitrum Nitro node.
    async replayTransaction( txHash: string, traceTypes: string[] ): Promise<TraceResult> { try { const traces = await this.makeRpcCall("arbtrace_replayTransaction", [ txHash, traceTypes, ]); return { traces }; } catch (error) { return { traces: null, error: `Trace replayTransaction not supported on this RPC endpoint: ${ (error as Error).message }`, }; } }
  • MCP server tool handler that resolves RPC URL, creates NitroNodeClient, calls replayTransaction, and formats response.
    case "arbtrace_replayTransaction": { const rpcUrl = await this.resolveRpcUrl( (args.rpcUrl as string) || (args.chainName as string) ); const nodeClient = new NitroNodeClient(rpcUrl); const result = await nodeClient.replayTransaction( args.txHash as string, (args.traceTypes as string[]) || ["trace"] ); return { content: [ { type: "text", text: JSON.stringify(result, null, 2), }, ], }; }
  • Tool schema definition including name, description, and input schema for validation in MCP listTools response.
    name: "arbtrace_replayTransaction", description: "Replay and trace a specific transaction (requires trace API)", inputSchema: { type: "object" as const, properties: { rpcUrl: { type: "string", description: "The RPC URL of the Arbitrum node (optional if default is set)", }, chainName: { type: "string", description: "Chain name (e.g., 'Xai', 'Arbitrum One') - will auto-resolve to RPC URL", }, txHash: { type: "string", description: "Transaction hash to replay", }, traceTypes: { type: "array", description: "Array of trace types (e.g., ['trace', 'stateDiff'])", items: { type: "string" }, }, }, required: ["txHash"], },

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