OpenCode logo

OpenCode + GoldRush

By OpenCode. Runs in Terminal, IDE, Extension.

OpenCode is an open-source AI coding agent with a fast terminal UI, desktop app, and editor integrations. Its Build and Plan agents make it easy to switch between read-only analysis and full implementation. With GoldRush configured as an MCP server, OpenCode can inspect live onchain data, generate Web3 features, and turn recurring blockchain tasks into reusable commands or project-level agents.

Step 3: Add GoldRush MCP server to your OpenCode config

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "goldrush": {
      "type": "local",
      "command": ["npx", "-y", "@covalenthq/goldrush-mcp-server"],
      "enabled": true,
      "environment": {
        "GOLDRUSH_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

Set up OpenCode with GoldRush

  1. 1Install OpenCode

    curl -fsSL https://opencode.ai/install | bash
  2. 2Install GoldRush CLI

    Use the CLI to validate blockchain queries before turning them into OpenCode tasks.

    npm install -g @covalenthq/goldrush-cli
  3. 3Add GoldRush MCP server to your OpenCode config

    Put this in ~/.config/opencode/opencode.json or a project-level opencode.json file.

    {
      "$schema": "https://opencode.ai/config.json",
      "mcp": {
        "goldrush": {
          "type": "local",
          "command": ["npx", "-y", "@covalenthq/goldrush-mcp-server"],
          "enabled": true,
          "environment": {
            "GOLDRUSH_API_KEY": "YOUR_API_KEY"
          }
        }
      }
    }
  4. 4Start OpenCode

    Use Build for implementation and switch to Plan when you want analysis without writes.

    opencode
  5. 5Run your first GoldRush task

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

Things to ask OpenCode

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

  • “Use GoldRush to build a wallet portfolio dashboard in this repo”
  • “Analyze recent transactions for this address and explain the wallet activity”
  • “Create a reusable OpenCode command that fetches token holders for any ERC-20”
  • “Debug why this GoldRush balance query is returning an empty dataset”
  • “Scaffold a webhook worker that tracks large token transfers”
  • “Add a typed GoldRush client and wire it into this Next.js app”
  • “Compare gas costs across Ethereum, Base, and Arbitrum for the last 24 hours”
  • “Generate a markdown report for this wallet's NFTs and token positions”

Common workflows

  • Plan then build a portfolio feature

    1. Start in Plan mode to inspect the codebase and define the GoldRush integration points
    2. Switch to Build mode once the architecture is clear
    3. Have OpenCode create the client utility, API route, and UI components
    4. Use live GoldRush tool calls to verify response shapes before final edits
  • Create reusable blockchain commands

    1. Ask OpenCode to turn a successful GoldRush workflow into a project command
    2. Store the command in your shared OpenCode config for repeatable usage
    3. Parameterize wallet addresses, chains, and token contracts
    4. Reuse the command across future sessions without rewriting prompts
  • Debug an onchain integration

    1. Open the failing project in OpenCode and explain the bug
    2. Let OpenCode inspect the code and call GoldRush tools against real data
    3. Ask it to patch the implementation and rerun the relevant checks
    4. Capture the fixed behavior as a reusable workflow or prompt
  • Ship a wallet analytics MVP

    1. Ask OpenCode to scaffold a minimal dashboard with GoldRush SDK support
    2. Use MCP tools to sample balances, transfers, and pricing data
    3. Have OpenCode build summary cards and portfolio views from those responses
    4. Refine the UX after it validates the data path end-to-end

The 37 MCP tools OpenCode can call

Each tool is a GoldRush API call or analytics query. OpenCode 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

  • Keep GoldRush in a project-level opencode.json when you want teammates to share the same MCP setup
  • Use Plan mode for architecture work, then switch to Build only when you're ready to apply changes
  • Turn successful blockchain prompts into reusable commands or agents instead of repeating long instructions
  • Be selective with enabled MCP servers. Extra tool catalogs add noise and context cost

Troubleshooting

GoldRush tools are not showing in OpenCode
Reload the session after editing opencode.json and verify the server entry is enabled. If it still fails, run npx -y @covalenthq/goldrush-mcp-server manually to check for local Node or API key issues.
OpenCode is reading the wrong config file
Confirm whether the repo has a project-level opencode.json that overrides your global config. OpenCode merges configs, so duplicate server names can hide unexpected values.
GoldRush queries consume too much context
Ask OpenCode for targeted queries, paginate large result sets, and disable unused MCP servers. Broad tool catalogs and oversized blockchain responses can crowd the context window quickly.

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.

  • Gemini CLI

    Google's open-source terminal AI agent powered by Gemini models with built-in MCP support and a file-based skill system.

See every agent

OpenCode and GoldRush FAQ

Yes. OpenCode merges config from project-level opencode.json files and the global ~/.config/opencode/opencode.json, so you can share GoldRush setup with a repo or keep it user-specific.