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:
- Emits JSON by default so agents can pipe output anywhere
- Has a generic
execcommand for any RPC method - Exposes tools via MCP so Claude, Cursor, or any AI agent can call it natively
- Ships as a single Rust binary —
cargo install arbitrum-cliand go
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
| Command | What 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 |
gas | Current gas price + block number |
watch blocks | Stream new blocks (polling) |
exec <method> --params '[...]' | Generic RPC passthrough |
mcp | Start MCP server for AI agents |
info | List 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
| Tool | Purpose |
|---|---|
| arbitrum-cli | Arbitrum chain access |
| superchain-trace | OP Superchain cross-chain message debugger |
| stylus-profiler | Arbitrum Stylus WASM binary analyzer |
| gas-oracle | L2 gas cost prediction via blob fees |