How to integrate Etherscan MCP with Atomic Agent

Connect Atomic Agent to Etherscan MCP. Check eth balance for a wallet address, list recent transactions for an ethereum address, and more using natural language, with authentication handled for you.

Etherscan logoEtherscan
Api Key

Etherscan is a blockchain explorer and API for Ethereum and multichain network data. It provides reliable access to balances, transactions, tokens, contracts, gas, logs, and blocks.

54 Tools

Introduction

Atomic Agent is an open-source AI agent that runs on your machine and supports local models through llama.cpp. Connect it to 1,700+ apps through Composio, including Etherscan.

This guide uses Atomic Agent's built-in Composio integration. You need Atomic Agent v0.5.6 or later, your own Composio API key, and a Etherscan account. See the Atomic Agent documentation for installation instructions.

Also integrate Etherscan with

How Atomic Agent connects to Etherscan

Atomic Agent connects to Composio's Tool Router over Streamable HTTP MCP. It discovers the tools needed for your request, and Composio handles account authentication.

Execution and account-connection tools follow Atomic Agent's configured approval policy. Review any approval prompt before allowing an action on your connected account.

Connect Etherscan to Atomic Agent

  1. Sign up or sign in to the Composio dashboard. Copy your API key.
  2. In Atomic Agent, open the Integrations tab and select Composio. Select API key, press e, paste the key, and press Enter. The tools become available immediately, without a restart.
  3. Ask Atomic Agent to do something in Etherscan. It searches Composio for the right tool.
  4. On first use, open the sign-in link returned in the chat. Connect your Etherscan account, then return to Atomic Agent to continue.

Headless setup

Add the following line to ~/.atomic-agent/.env, replacing YOUR_COMPOSIO_API_KEY with your key. Start Atomic Agent after saving the file.

bash
COMPOSIO_API_KEY=YOUR_COMPOSIO_API_KEY

What is the Etherscan MCP server, and what's possible with it?

The Etherscan MCP server is an implementation of the Model Context Protocol that connects your AI agent and assistants like Claude, Cursor, etc directly to your Etherscan account. It provides structured and secure access to blockchain account, transaction, contract, token, gas, and block data, so your agent can check balances and prices, inspect transactions and receipts, review verified contracts, track gas and block activity, and analyze token details on your behalf.

  • Account and market insights: Have your agent check native and ERC20 token balances, review Ether supply, look up token holder counts, and retrieve current native-token prices.
  • Transaction investigation: Direct your agent to look up transaction details, receipts, execution results, confirmation status, funding sources, and transaction counts for blockchain addresses.
  • Contract research: Let the agent retrieve verified source code, ABI details, bytecode, creation records, storage values, metadata, and read-only contract results.
  • Gas and network monitoring: Instruct your agent to check current gas recommendations, estimate transaction gas, track confirmation timing, inspect the latest block, and find block details by timestamp.
  • Token and blockchain analysis: Have your agent review token identity, supply, verification, project links, daily gas prices, block rewards, chain size, node counts, and beacon withdrawals.

Use Etherscan from Atomic Agent

With your account connected, ask Atomic Agent to work with Etherscan in natural language. You can connect more apps through the same Composio integration as you need them.

Visit the Atomic Agent website or inspect the Atomic Agent source code.

Troubleshooting

Why is my API key rejected?

Copy the key directly from the Composio dashboard. Atomic Agent requires ASCII characters because it sends the key in an HTTP header. Remove any extra characters introduced when copying.

Why are Composio tools unavailable after saving a key?

Check that you use Atomic Agent v0.5.6 or later and that Composio is enabled in your configuration. A "composio": { "enabled": false } setting disables the integration while keeping the saved key on disk.

Does Composio have a free plan?

The Hobby plan includes 100,000 tool calls per month. Composio-managed OAuth apps have a lower included allowance. See Composio pricing for the current limits that apply to your connection.

TOOLS

Supported Tools

Every Etherscan action and event your agent gets out of the box.

Call Contract

Execute a read-only eth_call at latest state and return raw ABI-encoded data; no transaction is created.

Estimate Confirmation Time

Estimate confirmation time in seconds for an optional exact gas price in wei.

Estimate Transaction Gas

Estimate gas required for a transaction-like call without submitting a transaction.

Get Address Funding Source

Get the first transaction and address that funded an externally owned account.

Get Address Metadata

Get Etherscan nametags, labels, reputation, notes, and provider-defined metadata for up to 100 addresses.

Get Address Transaction Count

Get the number of transactions sent from an address at an optional block tag, as hexadecimal.

Get API Usage

Get API credits used, available, and allowed for the connected API key's current interval.

Get Block by Number

Get JSON-RPC block information for an explicit hexadecimal block number or the latest block, returning transaction hashes or full transaction objects.

Get Block Countdown

Estimate blocks and seconds remaining until a future block is mined.

Get Block Number by Timestamp

Get the decimal block number closest before or after a Unix timestamp in seconds.

Get Block Rewards

Get a block's miner reward, uncle inclusion reward, and included uncle records.

Get Block Transaction Count

Get a block's total JSON-RPC transaction count as hexadecimal, without transfer-type breakdowns.

Get Block Transaction Counts

Get Ethereum mainnet normal, internal, ERC20, ERC721, and ERC1155 transaction counts for a decimal block number.

Get Contract ABI

Get the JSON-encoded ABI string for a verified contract.

Get Contract Bytecode

Get bytecode stored at an address for an optional named or hexadecimal block tag.

Get Contract Creation

Get creator, creation transaction, block, Unix-second timestamp, factory, and creation bytecode for up to five contracts on one chain.

Get Contract Execution Status

Get whether a transaction's contract execution failed and any provider error description.

Get Contract Source Code

Get source code plus compiler, proxy, implementation, license, and verification metadata for one contract.

Get Contract Storage

Get the raw value at a contract storage position for an optional block tag.

Get Current Gas Price

Get the canonical JSON-RPC current gas price in wei as hexadecimal; use Get Gas Oracle for recommendations.

Get ERC20 Balance

Get one address's ERC20 token balance in exact smallest units, optionally at a historical block.

Get ERC20 Total Supply

Get an ERC20 token's current total supply, or its historical supply when block_number is provided; historical lookup requires Standard+, is mainnet-only, and is unavailable on testnets.

Get Ether Supply

Get Ether supply in wei, either the basic block-reward supply or the ETH-specific component breakdown including staking, EIP-1559 burned fees, and staking withdrawals.

Get Gas Oracle

Get current safe, proposed, and fast gas-price recommendations and the suggested base fee as gwei strings.

Get Latest Block Number

Get the latest block number as an exact hexadecimal JSON-RPC quantity.

Get Latest Native Price

Get the latest native-token prices in BTC and USD with their Unix-second timestamps.

Get Native Balance

Get one address's native-token balance in exact wei, optionally at a historical block.

Get Native Balances

Get native-token balances for up to 20 addresses in one call, returning wei as exact decimal strings on one chain.

Get Node Count

Get the current discoverable-node count or daily historical counts over a UTC date range.

Get Token Holder Count

Get the number of addresses currently holding an ERC20 token.

Get Token Info

Get token identity, standard, supply, verification, project links, price, and logo metadata for an ERC20, ERC721, or ERC1155 contract.

Get Transaction

Get one full JSON-RPC transaction by hash or by hexadecimal block number and transaction index.

Get Transaction Receipt

Get a full JSON-RPC transaction receipt, including event logs, by hash on one chain.

Get Transaction Receipt Status

Get a transaction receipt's success or failure status string.

Get Uncle Block

Get an uncle block by optional hexadecimal parent block number and uncle index.

Get Verification Status

Check source-code or proxy verification status for a GUID returned by a prior verification submission.

List Beacon Withdrawals

List one page of beacon-chain withdrawals, optionally filtered by recipient and inclusive block range.

List Chain Size

List daily Ethereum node-chain size measurements for one client and sync mode over a date range.

List Daily Block Counts and Rewards

List daily mined-block counts and corresponding block rewards in ether over a UTC date range.

List Daily Gas Prices

List daily minimum, average, and maximum gas prices in wei over a UTC date range.

List Daily Network Metrics

List one normalized daily scalar metric over a UTC date range.

List Daily Uncle Counts and Rewards

List daily uncle-block counts and uncle rewards in ether over a UTC date range.

List ERC721 Inventory

List one page of ERC721 token IDs owned by an address for one collection.

List Event Logs

List one provider page of event logs over an inclusive block range, filtered by an emitting address, indexed topics, or both.

List Internal Transactions

List internal transactions by address, transaction hash, or an unfiltered block range.

List L2 Bridge Transactions

List one page of canonical L2 deposits from Ethereum or withdrawals to Ethereum for an address on a supported L2.

List Normal Transactions

List one provider page of an address's normal transactions, optionally filtered by start and end block.

List Plasma Deposits

List one page of Plasma deposit transactions on documented Polygon, Gnosis, or BitTorrent Chain networks, optionally filtered by recipient address.

List Supported Chains

List current Etherscan mainnet and testnet chains, explorer and API URLs, and service status.

List Token Holders

List one page of ERC20 holders or up to 1000 top holders for a token.

List Token Holdings

List one page of ERC20 token balances or ERC721 collection quantities held by an address.

List Token Transfers

List one provider page of ERC20, ERC721, or ERC1155 transfers, selected by token_standard and filtered by an account, token contract, or both on one chain.

List Validated Blocks

List one page of full blocks or pre-Merge uncle blocks validated by an address.

Resolve ENS Name

Resolve an ENS name or supported onchain subdomain to an address on Ethereum mainnet.

FAQ

Frequently asked questions

With a standalone Etherscan MCP server, the agents and LLMs can only access a fixed set of Etherscan tools tied to that server. However, with the Composio Tool Router, agents can dynamically load tools from Etherscan and many other apps based on the task at hand, all through a single MCP endpoint.

Yes, you can. Atomic Agent fully supports MCP integration. You get structured tool calling, message history handling, and model orchestration while Tool Router takes care of discovering and serving the right Etherscan tools.

Yes, absolutely. You can configure which Etherscan scopes and actions are allowed when connecting your account to Composio. You can also bring your own OAuth credentials or API configuration so you keep full control over what the agent can do.

All sensitive data such as tokens, keys, and configuration is fully encrypted at rest and in transit. Composio is SOC 2 Type 2 compliant and follows strict security practices so your Etherscan data and credentials are handled as safely as possible.

Start with Etherscan.It takes 30 seconds.

Managed auth, hosted MCP servers, and every Etherscan tool your agent needs.Free to start.

Start building