Etherscan MCP server for AI agents and assistants

Securely connect your AI agents and chatbots (Claude, ChatGPT, Cursor, etc) with Etherscan MCP or direct API to check balances, trace transactions, inspect token activity, and query blockchain data through natural language.

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

Try Etherscan now

Type what you want done — sign in and watch it run live in the Tool Router playground.

TOOL ROUTER PLAYGROUND
Etherscan
Try asking
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.

SETUP GUIDE

Connect Etherscan MCP Tool with your Agent

1

Install Composio

typescript
npm install @composio/core ai @ai-sdk/mcp @ai-sdk/openai
Install the Composio SDK and your agent framework
2

Create a session with MCP enabled

typescript
import { Composio } from "@composio/core";

const composio = new Composio();
const { mcp } = await composio.create("your-user-id", {
  toolkits: ["etherscan"],
  mcp: true,
});
Create a session scoped to Etherscan and read its MCP URL and headers
3

Connect your agent to the MCP server

typescript
import { createMCPClient } from "@ai-sdk/mcp";
import { openai } from "@ai-sdk/openai";
import { generateText, stepCountIs } from "ai";

const client = await createMCPClient({
  transport: { type: "http", url: mcp.url, headers: mcp.headers },
});

const { text } = await generateText({
  model: openai("gpt-5.6-sol"),
  tools: await client.tools(),
  prompt: "Get the ETH balance for address 0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
  stopWhen: stepCountIs(10),
});

console.log(text);
await client.close();
Pass the session's MCP URL and headers to your agent and run a Etherscan request
SETUP GUIDE

Connect Etherscan API Tool with your Agent

1

Install Composio

typescript
npm install @composio/core @composio/openai openai
Install the Composio SDK, the OpenAI provider, and the OpenAI SDK
2

Create a Composio session

typescript
import OpenAI from "openai";
import { Composio } from "@composio/core";
import { OpenAIResponsesProvider } from "@composio/openai";

const composio = new Composio({ provider: new OpenAIResponsesProvider() });
const client = new OpenAI();

const session = await composio.create("your-user-id", { toolkits: ["etherscan"] });
const tools = await session.tools();
Initialize Composio with the OpenAI Responses provider and create a session scoped to Etherscan
3

Run Etherscan tools with your agent

typescript
let response = await client.responses.create({
  model: "gpt-5.6-sol",
  tools,
  input: [{ role: "user", content: "Get the ETH balance for address 0x742d35Cc6634C0532925a3b844Bc454e4438f44e" }],
});

while (response.output.some((o) => o.type === "function_call")) {
  const outputs = await composio.provider.handleToolCalls(session, response.output);
  response = await client.responses.create({
    model: "gpt-5.6-sol",
    tools,
    previous_response_id: response.id,
    input: outputs,
  });
}

console.log(response.output_text);
Send a request, execute the Etherscan tool calls through the session, and print the final answer

Why Use Composio?

AI Native Etherscan Integration

  • Supports both Etherscan MCP and direct API based integrations
  • Structured, LLM-friendly schemas for reliable tool execution
  • Rich coverage for reading, analyzing, and querying your Etherscan data

Managed Auth

  • Connect your Etherscan API key without building custom credential plumbing
  • Central place to manage, scope, and revoke Etherscan access
  • Per user and per environment credentials instead of hard-coded keys

Agent Optimized Design

  • Tools are tuned using real error and success rates to improve reliability over time
  • Comprehensive execution logs so you always know what ran, when, and on whose behalf

Enterprise Grade Security

  • Fine-grained RBAC so you control which agents and users can access Etherscan
  • Scoped, least privilege access to Etherscan resources
  • Full audit trail of agent actions to support review and compliance

Rolling this out across your team?

Give your team centralized access control across every framework with Composio’s MCP Gateway.

EXPLORE MCP GATEWAY
FAQ

Frequently asked questions

Yes, Etherscan requires you to configure your own API key credentials. Once set up, Composio handles secure credential storage and API request handling for you.

Yes! Composio's Tool Router enables agents to use multiple toolkits. Learn more.

Yes. Composio is SOC 2 Type II compliant and is built to keep your Etherscan connection and credentials secure. OAuth tokens and API keys are encrypted, and sensitive customer data is protected at rest and in transit.

Composio also undergoes independent security testing and continuously monitors its systems for security threats. You can review the latest reports and policies in the Composio Trust Center.

Composio maintains and updates all toolkit integrations automatically, so your agents always work with the latest API versions.

Create the key in your Etherscan account settings, then paste it once on Composio's connection page. Composio stores it encrypted and uses it only for the Etherscan actions your agent runs. Nobody else in your workspace can read it, and you can revoke it inside Etherscan at any time.

When you connect a Etherscan account through Composio, every action runs under that account, so anything the agent creates, sends, or changes shows up in Etherscan as done by you. Keep an approval step in your prompt for actions with side effects, such as sending or deleting, and have the agent draft first.

Whatever the credentials you connect allow inside Etherscan. If Etherscan lets you scope a key to specific permissions, create a scoped one so the agent can only do what you intend. You can revoke the key inside Etherscan at any time.

Yes. Composio supports multiple connected accounts for the same app, and that works in Claude, ChatGPT, or any other assistant you connect through Composio. Give each Etherscan connection a name such as work or personal, and the assistant uses the one you mention in the request. Each account keeps its own credentials and nothing is merged.

The connection stops working the moment Etherscan rejects the old key. Create a new key in Etherscan and reconnect the account from the Composio dashboard or by asking your agent to reconnect Etherscan. Nothing else changes.

Composio's free Hobby plan includes 100,000 tool calls per month with no credit card, which covers most personal Etherscan use. Paid plans add higher limits and team features. Your Etherscan plan and its API limits still apply as usual.

Built-in connectors usually give one AI access to a limited set of apps. Many people use Composio because it lets their AI connect to more apps than it normally supports, or connect to multiple accounts for the same app (e.g. connect Claude to multiple Etherscan accounts).

With Composio, you connect Etherscan once and then use it across different AI assistants without setting it up separately in each one. Connect your apps to Composio once, then connect Composio to whichever AI you use, whether that's Claude, ChatGPT, Hermes, or your own custom assistant.

Start with Etherscan.It takes 30 seconds.

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

Start building