etherscan-mcp-skill

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Etherscan MCP Skill

Etherscan MCP 技能

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.
使用本技能通过
uxc
执行Etherscan MCP操作。
复用
uxc
技能以实现共享协议发现、输出解析以及通用认证/绑定流程。

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.
  • uxc
    已安装且可在
    PATH
    中访问。
  • 可访问网络地址
    https://mcp.etherscan.io/mcp
  • 拥有Etherscan API密钥以进行认证调用。

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.
  1. 通过优先查看帮助的方式确认端点和协议:
    • uxc https://mcp.etherscan.io/mcp -h
    • 当前预期未认证行为:
      401 Unauthorized
  2. 配置凭证/绑定以实现可重复认证:
    • 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. 默认使用固定链接命令:
    • 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. 优先执行读取操作,再执行可能触发大量数据拉取或后续自动化的工作流。

Capability Map

能力映射

  • Address investigation:
    • balance
    • tokenHoldings
    • fundedBy
    • getAddressMetadata
  • Token holder analysis:
    • balanceERC20
    • balanceERC20Historical
    • tokenTopHolders
    • getTokenInfo
  • Transaction investigation:
    • txList
    • internalTxsByAddress
    • erc20Transfers
    • erc721Transfers
    • erc1155Transfers
    • transaction
    • checkTransaction
  • Contract research:
    • getContractAbi
    • getContractSourceCode
    • getContractCreation
  • Verification:
    • verifySourceCode
    • checkVerifyStatus
Inspect
etherscan-mcp-cli -h
after auth setup for the current full tool list. Etherscan can expand MCP tools independently of this wrapper skill.
  • 地址调查:
    • balance
      (余额)
    • tokenHoldings
      (代币持仓)
    • fundedBy
      (资金来源)
    • getAddressMetadata
      (获取地址元数据)
  • 代币持有者分析:
    • balanceERC20
      (ERC20余额)
    • balanceERC20Historical
      (ERC20历史余额)
    • tokenTopHolders
      (代币顶级持有者)
    • getTokenInfo
      (获取代币信息)
  • 交易调查:
    • txList
      (交易列表)
    • internalTxsByAddress
      (按地址查询内部交易)
    • erc20Transfers
      (ERC20转账记录)
    • erc721Transfers
      (ERC721转账记录)
    • erc1155Transfers
      (ERC1155转账记录)
    • transaction
      (交易详情)
    • checkTransaction
      (核查交易)
  • 合约研究:
    • getContractAbi
      (获取合约ABI)
    • getContractSourceCode
      (获取合约源代码)
    • getContractCreation
      (获取合约创建信息)
  • 验证:
    • verifySourceCode
      (验证源代码)
    • checkVerifyStatus
      (核查验证状态)
完成认证设置后,可通过
etherscan-mcp-cli -h
查看当前完整工具列表。Etherscan可独立于本封装技能扩展MCP工具。

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.
  3. Prefer one chain/address/token at a time before broadening the scope.
  4. Parse the JSON envelope first, then inspect
    data
    .
  1. 从只读调查目标开始:
    • 地址的余额或持仓
    • 代币的持有者集中度
    • 交易哈希的交易核查
    • 合约的源代码/元数据查询
  2. 在首次实际调用前,运行特定工具的
    -h
    命令查看帮助。
  3. 优先一次处理一条链/一个地址/一种代币,再扩大范围。
  4. 先解析JSON包,再查看
    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.
  • etherscan-mcp-cli <operation> ...
    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.
  • 仅对JSON输出包进行自动化处理;不要依赖
    --text
    格式。
  • 优先解析稳定字段:
    ok
    kind
    protocol
    data
    error
  • 使用
    etherscan-mcp-cli
    作为默认命令路径。
  • etherscan-mcp-cli <operation> ...
    等价于
    uxc https://mcp.etherscan.io/mcp <operation> ...
  • 若未认证探测或运行时调用返回
    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_API_KEY
  • 仅对简单标量输入使用
    key=value
    格式。
  • 当操作接受嵌套对象、数组或可能演变的可选标志时,优先使用位置JSON格式。
  • 不要凭记忆假设工具参数名称;先查看
    <operation> -h
    ,因为Etherscan可能独立于本技能修订MCP模式。
  • 部分MCP工具受Etherscan套餐等级限制。目前,非Pro密钥调用
    getTokenInfo
    可能返回
    NOTOK
    及API Pro升级提示信息。
  • verifySourceCode
    视为需要用户明确确认类的写入操作。

References

参考资料

  • Invocation patterns:
    • references/usage-patterns.md
  • 调用模式:
    • references/usage-patterns.md