Etherscan MCP Skill
Use this skill to run Etherscan MCP operations through uxc.
Reuse the uxc skill for shared protocol discovery, output parsing, and generic auth/binding flows.
Prerequisites
- -
uxc is installed and available in PATH. - Network access to
https://mcp.etherscan.io/mcp. - An Etherscan API key is available for authenticated calls.
Core Workflow
- 1. Confirm endpoint and protocol with help-first probing:
-
uxc https://mcp.etherscan.io/mcp -h
- expected unauthenticated behavior today:
401 Unauthorized
- 2. Configure credential/binding for repeatable auth:
-
uxc auth credential set etherscan-mcp --auth-type bearer --secret-env ETHERSCAN_API_KEY
-
uxc auth credential set etherscan-mcp --auth-type bearer --secret-op op://Engineering/etherscan/api-key
-
uxc auth binding add --id etherscan-mcp --host mcp.etherscan.io --path-prefix /mcp --scheme https --credential etherscan-mcp --priority 100
- 3. Use fixed link command by default:
-
command -v etherscan-mcp-cli
- If missing, create it:
uxc link etherscan-mcp-cli https://mcp.etherscan.io/mcp
-
etherscan-mcp-cli -h
- 4. Inspect operation schema before execution:
-
etherscan-mcp-cli balance -h
-
etherscan-mcp-cli tokenTopHolders -h
-
etherscan-mcp-cli getContractAbi -h
-
etherscan-mcp-cli transaction -h
- 5. Prefer read operations first, then any workflow that could trigger heavy data pulls or follow-up automation.
Capability Map
-
balance
-
tokenHoldings
-
fundedBy
-
getAddressMetadata
-
balanceERC20
-
balanceERC20Historical
-
tokenTopHolders
-
getTokenInfo
- - Transaction investigation:
-
txList
-
internalTxsByAddress
-
erc20Transfers
-
erc721Transfers
-
erc1155Transfers
-
transaction
-
checkTransaction
-
getContractAbi
-
getContractSourceCode
-
getContractCreation
-
verifySourceCode
- INLINECODE36
Inspect etherscan-mcp-cli -h after auth setup for the current full tool list. Etherscan can expand MCP tools independently of this wrapper skill.
Recommended Usage Pattern
- 1. Start from a read-only investigation goal:
- balance or holdings for an address
- holder concentration for a token
- transaction inspection for a hash
- source/metadata lookup for a contract
- 2. Run
-h on the specific tool before the first real call. - Prefer one chain/address/token at a time before broadening the scope.
- Parse the JSON envelope first, then inspect
data.
Guardrails
- - Keep automation on JSON output envelope; do not rely on
--text. - Parse stable fields first:
ok, kind, protocol, data, error. - Use
etherscan-mcp-cli as default command path. - INLINECODE47 is equivalent to
uxc https://mcp.etherscan.io/mcp <operation> .... - If unauthenticated probe or runtime call returns
401 Unauthorized:
- confirm auth binding matches endpoint with
uxc auth binding match https://mcp.etherscan.io/mcp
- confirm credential shape with
uxc auth credential info etherscan-mcp
- reset credential as bearer if needed:
uxc auth credential set etherscan-mcp --auth-type bearer --secret-env ETHERSCAN_API_KEY
- - Use
key=value only for simple scalar inputs. - Prefer positional JSON when an operation accepts nested objects, arrays, or optional flags that may evolve.
- Do not assume tool argument names from memory; inspect
<operation> -h first because Etherscan may revise MCP schemas independently of this skill. - Some MCP tools are tier-gated by Etherscan plan. Today
getTokenInfo can return NOTOK with an API Pro upgrade message on non-Pro keys. - Treat
verifySourceCode as a write-like action requiring explicit user confirmation.
References
- INLINECODE58
Etherscan MCP 技能
使用此技能通过 uxc 运行 Etherscan MCP 操作。
复用 uxc 技能进行共享协议发现、输出解析以及通用认证/绑定流程。
前提条件
- - uxc 已安装并可在 PATH 中使用。
- 可访问 https://mcp.etherscan.io/mcp 网络。
- 拥有可用于认证调用的 Etherscan API 密钥。
核心工作流程
- 1. 通过帮助优先探测确认端点和协议:
- uxc https://mcp.etherscan.io/mcp -h
- 当前预期的未认证行为:401 Unauthorized
- 2. 配置凭据/绑定以实现可重复认证:
- uxc auth credential set etherscan-mcp --auth-type bearer --secret-env ETHERSCAN
APIKEY
- uxc auth credential set etherscan-mcp --auth-type bearer --secret-op op://Engineering/etherscan/api-key
- uxc auth binding add --id etherscan-mcp --host mcp.etherscan.io --path-prefix /mcp --scheme https --credential etherscan-mcp --priority 100
- 3. 默认使用固定链接命令:
- command -v etherscan-mcp-cli
- 如果缺失,创建它:uxc link etherscan-mcp-cli https://mcp.etherscan.io/mcp
- etherscan-mcp-cli -h
- 4. 执行前检查操作模式:
- etherscan-mcp-cli balance -h
- etherscan-mcp-cli tokenTopHolders -h
- etherscan-mcp-cli getContractAbi -h
- etherscan-mcp-cli transaction -h
- 5. 优先使用读取操作,然后再考虑可能触发大量数据拉取或后续自动化的任何工作流程。
能力映射
- balance
- tokenHoldings
- fundedBy
- getAddressMetadata
- balanceERC20
- balanceERC20Historical
- tokenTopHolders
- getTokenInfo
- txList
- internalTxsByAddress
- erc20Transfers
- erc721Transfers
- erc1155Transfers
- transaction
- checkTransaction
- getContractAbi
- getContractSourceCode
- getContractCreation
- verifySourceCode
- checkVerifyStatus
在认证设置后检查 etherscan-mcp-cli -h 以获取当前完整工具列表。Etherscan 可以独立于此包装技能扩展 MCP 工具。
推荐使用模式
- 1. 从只读调查目标开始:
- 地址的余额或持仓
- 代币的持有者集中度
- 哈希的交易检查
- 合约的源代码/元数据查询
- 2. 在首次实际调用前对特定工具运行 -h。
- 在扩大范围前优先一次处理一个链/地址/代币。
- 先解析 JSON 信封,然后检查 data。
防护措施
- - 保持自动化基于 JSON 输出信封;不要依赖 --text。
- 首先解析稳定字段:ok、kind、protocol、data、error。
- 使用 etherscan-mcp-cli 作为默认命令路径。
- etherscan-mcp-cli ... 等同于 uxc https://mcp.etherscan.io/mcp ...。
- 如果未认证探测或运行时调用返回 401 Unauthorized:
- 使用 uxc auth binding match https://mcp.etherscan.io/mcp 确认认证绑定与端点匹配
- 使用 uxc auth credential info etherscan-mcp 确认凭据格式
- 如有必要,重置为 bearer 凭据:uxc auth credential set etherscan-mcp --auth-type bearer --secret-env ETHERSCAN
APIKEY
- - 仅对简单标量输入使用 key=value。
- 当操作接受可能演变的嵌套对象、数组或可选标志时,优先使用位置 JSON。
- 不要凭记忆假设工具参数名称;首先检查 -h,因为 Etherscan 可能独立于此技能修改 MCP 模式。
- 某些 MCP 工具受 Etherscan 计划层级限制。目前,getTokenInfo 在非 Pro 密钥上可能返回带有 API Pro 升级消息的 NOTOK。
- 将 verifySourceCode 视为需要明确用户确认的类似写入操作。
参考
- references/usage-patterns.md