Gemini CLI logo

Gemini CLI + GoldRush

By Google. Runs in Terminal.

Gemini CLI is Google's open-source agentic coding tool that runs in your terminal. Powered by Gemini models, it can read and edit files, run shell commands, and search the web. With native MCP support and a file-based skill system, Gemini CLI integrates with GoldRush to give you autonomous blockchain data access directly from the command line. Configure the MCP Server once and Gemini CLI can fetch balances, transactions, and token data across 100+ chains.

Step 3: Add GoldRush MCP server

gemini mcp add goldrush -- npx -y @covalenthq/goldrush-mcp-server

Set up Gemini CLI with GoldRush

  1. 1Install Gemini CLI

    Requires Node.js 20+. Authenticate with your Google account on first run.

    npm install -g @google/gemini-cli
  2. 2Install GoldRush CLI

    Query onchain data directly from your terminal, useful for testing queries before using them in Gemini CLI.

    npm install -g @covalenthq/goldrush-cli
  3. 3Add GoldRush MCP server

    Set your GOLDRUSH_API_KEY environment variable before running. You can also add it manually to ~/.gemini/settings.json.

    gemini mcp add goldrush -- npx -y @covalenthq/goldrush-mcp-server
  4. 4Launch Gemini CLI in your project

    gemini
  5. 5Query onchain data

    Ask: "Use the GoldRush MCP tools to get token balances for vitalik.eth on Ethereum, Base, and Polygon"

Things to ask Gemini CLI

Once GoldRush is connected, ask in plain words. Gemini CLI picks the calls.

  • “Get the token balances for this wallet on Ethereum”
  • “Show me the top 10 token holders for USDC on Base”
  • “Track all transactions for this address in the last 24 hours”
  • “Build a portfolio dashboard showing balances across 5 chains”
  • “Analyze DEX trading volume on Uniswap v3 for the past week”
  • “Create a GoldRush skill that monitors large token transfers”
  • “Compare gas costs across Ethereum, Arbitrum, and Base”
  • “Write a script that exports NFT ownership data for any wallet”

Common workflows

  • Deploy a portfolio tracker

    1. Ask Gemini CLI to scaffold a project with GoldRush SDK integration
    2. Request multi-chain balance fetching for a given wallet
    3. Have Gemini CLI build display components using the fetched data
    4. Ask it to add historical portfolio charting with GoldRush pricing data
  • Analyze a wallet

    1. Provide a wallet address and ask for a comprehensive analysis
    2. Gemini CLI fetches token balances, transaction history, and NFTs via MCP
    3. Request a summary of DEX activity and token transfer patterns
    4. Ask Gemini CLI to export the analysis as a formatted markdown report
  • Create a reusable GoldRush skill

    1. Ask Gemini CLI to build a blockchain query workflow end-to-end
    2. Save the working approach as a skill in .gemini/skills/
    3. Reuse the skill in future sessions without rewriting the prompt
    4. Share the skill with teammates by committing .gemini/ to the repo
  • Debug a smart contract interaction

    1. Provide a transaction hash and ask Gemini CLI to decode it
    2. It uses GoldRush MCP tools to fetch decoded event logs
    3. Request analysis of state changes and token transfers
    4. Ask for suggestions on fixing any identified issues

The 37 MCP tools Gemini CLI can call

Each tool is a GoldRush API call or analytics query. Gemini CLI reads the descriptions and picks the tools a request needs.

Cross-chain

  • multichain_balances

    Fetch spot and historical balances for an address on up to 10 EVM chains.

  • multichain_transactions

    Fetch paginated transactions for up to 10 addresses and 10 chains.

  • multichain_address_activity

    Locate chains an address is active on with a single API call.

Balances

  • token_balances

    Get native and ERC20 token balances with spot prices and metadata.

  • historical_token_balances

    Get token balances at a specific block height or date.

  • historical_portfolio_value

    Get daily portfolio balance broken down by token.

  • erc20_token_transfers

    Get transfer-in and transfer-out events with historical prices.

  • token_holders

    Get paginated current or historical holders of a token.

  • native_token_balance

    Get native token balance with current market value.

Transactions

  • transaction

    Fetch a single transaction with decoded log events.

  • transaction_summary

    Get earliest/latest transactions and count for a wallet.

  • transactions_for_address

    Get paginated transactions with decoded logs for an address.

  • transactions_for_block

    Get all transactions in a block with decoded events.

Bitcoin

  • bitcoin_hd_wallet_balances

    Get balances for child addresses from an HD wallet xpub key.

  • bitcoin_transactions

    Get full transaction history for a Bitcoin wallet.

  • bitcoin_non_hd_wallet_balances

    Get balance for a non-HD Bitcoin address.

NFTs

  • nft_for_address

    Get ERC721 and ERC1155 NFTs held by an address.

  • nft_check_ownership

    Verify NFT ownership within a collection.

  • nft_check_ownership_token_id

    Verify ownership of a specific NFT by token ID.

Pricing

  • historical_token_prices

    Get historical prices for ERC20 and native tokens.

  • pool_spot_prices

    Get spot prices for a Uniswap V2/V3 pool.

Security

  • token_approvals

    Get token approvals categorized by spender with risk levels.

Utility

  • gas_prices

    Get real-time gas estimates for low, medium, and high speeds.

  • block

    Fetch a single block with timestamp, tx count, and miner info.

  • block_heights

    Get block heights within a date range.

  • log_events_by_address

    Get event logs emitted from a contract address.

  • log_events_by_topic

    Get event logs by topic hash across all contracts.

  • resolve_address

    Resolve an ENS, RNS or Unstoppable Domains name to an address.

Protocol analytics

  • list_entities

    List every dataset with live analytics, with its metrics and dimensions.

  • search_catalog

    Find a dataset, metric, dimension or ticker before querying it.

  • get_metadata

    Read what a dataset's metrics measure, how they split and what they can't answer.

  • get_metric

    Get one metric of a dataset as a daily, weekly or monthly series.

  • get_metrics

    Get several metrics of one dataset in a single call.

  • get_breakdown

    Split a metric by a dimension such as chain, asset or market.

  • list_members

    List the values a dimension holds, ranked, to filter on one of them.

  • compare_entities

    Compare two to ten named datasets on one metric.

  • rank_entities

    Rank every dataset that serves a metric.

GoldRush Agent Skills

Agent Skills give your agent the context it needs for every GoldRush endpoint: parameters, response shapes and credit costs. One command installs all of them.

npx skills add covalenthq/goldrush-agent-skills
  • Foundational API

    REST endpoints for historical blockchain data. Balances, transactions, NFTs, token prices, security checks, cross-chain queries across 100+ networks.

  • x402

    Pay-per-request access without API keys. Agents pay with stablecoins using the HTTP 402 protocol. No accounts, no rate limits, no key management.

  • CLI

    Terminal-first blockchain data with native MCP support. 17 commands that work for both humans and AI agents.

Tips

  • Use gemini mcp add for quick server setup instead of editing settings.json manually
  • Set GOLDRUSH_API_KEY as an environment variable to avoid passing it each time
  • Save successful blockchain workflows as skills in .gemini/skills/ for reuse
  • Use the /compact command to manage context in long sessions

Troubleshooting

MCP Server not connecting
Ensure Node.js 20+ is installed. Run npx -y @covalenthq/goldrush-mcp-server manually to check for errors. Verify your GOLDRUSH_API_KEY is set correctly.
API key not recognized
Check that GOLDRUSH_API_KEY is exported in your shell profile (~/.bashrc or ~/.zshrc). Restart Gemini CLI after setting environment variables.
Rate limiting errors
The free tier allows 4 requests/second. Add delays between rapid queries, or upgrade your plan at goldrush.dev/pricing for higher limits.

More agents

  • Claude Code

    Anthropic's agentic coding tool that lives in your terminal and understands your codebase end-to-end.

  • Codex

    OpenAI's cloud-native coding agent that runs tasks in a sandboxed environment with full autonomy.

  • OpenCode

    Open-source AI coding agent with a terminal-first UI, configurable agents, and MCP-native tool access.

See every agent

Gemini CLI and GoldRush FAQ

Yes, Gemini CLI calls the GoldRush API through the MCP Server, which requires an internet connection. The MCP Server runs locally and handles all API communication.