kcolbchain / docs / arbitrum-cli

arbitrum-cli

Agent-first Arbitrum CLI. JSON in, JSON out. MCP-compatible. Single Rust binary built for LLMs and automation.

Why

Every blockchain CLI today is either a heavyweight toolkit (Foundry) or a chain-specific SDK bundle. Neither is built for agents. arbitrum-cli wraps Arbitrum RPC behind a clean surface that:

Install

cargo install arbitrum-cli

Quick Start

# Query the latest block (JSON output, agent-ready)
arbitrum-cli block latest

# Check an address balance
arbitrum-cli balance 0xC75020d5f669F5D15Afcb81b0e5F6d21bCDa9664

# Check a token balance (USDC on Arbitrum)
arbitrum-cli token \
  0xaf88d065e77c8cC2239327C5EDb3A432268e5831 \
  0xC75020d5f669F5D15Afcb81b0e5F6d21bCDa9664

# Get current gas price
arbitrum-cli gas

# Human-readable output
arbitrum-cli block latest --human

Commands

CommandWhat it does
block <number|latest>Fetch block info
tx <hash>Fetch transaction by hash
balance <address>Native ETH balance
token <token> <address>ERC-20 balance with decimals
call --data <hex> <to>Read contract via eth_call
gasCurrent gas price + block number
watch blocksStream new blocks (polling)
exec <method> --params '[...]'Generic RPC passthrough
mcpStart MCP server for AI agents
infoList supported Arbitrum chains

Agent mode

All commands default to JSON output. No flags, no ceremony — pipe it into jq, feed it to an LLM, or forward to any tool.

# Agent-friendly
arbitrum-cli balance 0xC750... | jq .balance_eth

# Generic RPC for agents — any method, any params
arbitrum-cli exec eth_chainId --params '[]'
arbitrum-cli exec eth_getLogs --params '[{"fromBlock":"latest","address":"0x..."}]'

Use --human for colored terminal output when you're debugging.

MCP server

Expose arbitrum-cli as a Model Context Protocol server so Claude, Cursor, or any MCP-compatible agent can call Arbitrum directly.

arbitrum-cli mcp --bind 127.0.0.1:3456

Tools exposed: arbitrum.block, arbitrum.tx, arbitrum.balance, arbitrum.token, arbitrum.call, arbitrum.gas, arbitrum.exec.

(MCP integration is stubbed in v0.1 — full stdio + SSE support in v0.2.)

Configuration

# Use a custom RPC (env var)
export ARBITRUM_RPC_URL=https://arb-mainnet.g.alchemy.com/v2/YOUR_KEY
arbitrum-cli block latest

# Or pass inline
arbitrum-cli --rpc https://arb1.arbitrum.io/rpc gas

Default RPC: https://arb1.arbitrum.io/rpc (Arbitrum One)

Part of the kcolbchain agent-first suite

ToolPurpose
arbitrum-cliArbitrum chain access
superchain-traceOP Superchain cross-chain message debugger
stylus-profilerArbitrum Stylus WASM binary analyzer
gas-oracleL2 gas cost prediction via blob fees

GitHub Repository

Source code, issues, contributions

superchain-trace

OP Superchain message debugger

stylus-profiler

Arbitrum Stylus WASM binary analyzer