返回顶部
d

dune-mcp-skillDune MCP技能

Use Dune MCP through UXC for blockchain table discovery, SQL query creation/execution, execution result retrieval, and visualization with help-first schema inspection, explicit auth binding, and guarded credit-consuming operations.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
278
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

dune-mcp-skill

Dune MCP 技能

使用此技能通过 uxc 运行 Dune MCP 操作。

复用 uxc 技能进行共享协议发现、输出解析以及通用认证/绑定流程。

前置条件

  • - uxc 已安装并可在 PATH 中使用。
  • 可访问 https://api.dune.com/mcp/v1 的网络连接。
  • 拥有 Dune API 密钥用于认证调用。

核心工作流

  1. 1. 通过优先使用帮助探测来确认端点和协议:
- uxc https://api.dune.com/mcp/v1 -h
  1. 2. 配置凭证/绑定以实现可重复认证:
- uxc auth credential set dune-mcp --auth-type apikey --header x-dune-api-key={{secret}} --secret-env DUNEAPI_KEY - uxc auth credential set dune-mcp --auth-type api_key --header x-dune-api-key={{secret}} --secret-op op://Engineering/dune/api-key - uxc auth binding add --id dune-mcp --host api.dune.com --path-prefix /mcp/v1 --scheme https --credential dune-mcp --priority 100
  1. 3. 默认使用固定链接命令:
- command -v dune-mcp-cli - 如果缺失,创建它:uxc link dune-mcp-cli https://api.dune.com/mcp/v1 - dune-mcp-cli -h
  1. 4. 在执行前检查操作模式:
- dune-mcp-cli searchTables -h - dune-mcp-cli searchTablesByContractAddress -h - dune-mcp-cli createDuneQuery -h - dune-mcp-cli executeQueryById -h - dune-mcp-cli getExecutionResults -h
  1. 5. 优先执行读取/发现操作,然后进行查询创建或消耗积分的执行。

能力映射

  • - 发现:
- searchDocs - searchTables - listBlockchains - searchTablesByContractAddress
  • - 查询生命周期:
- createDuneQuery - getDuneQuery - updateDuneQuery - executeQueryById - getExecutionResults
  • - 分析辅助:
- generateVisualization - getTableSize - getUsage

推荐使用模式

  1. 1. 首先找到正确的表:
- dune-mcp-cli searchTables query=uniswap swaps - dune-mcp-cli searchTablesByContractAddress contractAddress=0x...
  1. 2. 当高级 spell 表已暴露所需指标时,优先使用它们。
  2. 保持 SQL 分区感知:
- 在 WHERE 中使用 blockdate、evtblock_date 或其他分区/日期列
  1. 4. 仅在确认表选择和日期范围后创建临时查询。
  2. 通过执行 ID 执行并获取结果。

防护措施

  • - 保持自动化使用 JSON 输出格式;不要依赖 --text。
  • 首先解析稳定字段:ok、kind、protocol、data、error。
  • 使用 dune-mcp-cli 作为默认命令路径。
  • dune-mcp-cli ... 等同于 uxc https://api.dune.com/mcp/v1 ...。
  • 发现操作为只读:
- searchDocs - searchTables - listBlockchains - searchTablesByContractAddress - getDuneQuery - getExecutionResults - getTableSize - getUsage
  • - 在消耗积分或改变状态的操作前需要明确的用户确认:
- createDuneQuery - updateDuneQuery - executeQueryById - generateVisualization
  • - 注意隐私:
- 在将查询从私有切换为公开前进行确认 - 临时查询仍然可见;检查 isprivate 和 istemp
  • - key=value 输入现在支持数字 MCP 参数的自动类型转换。
  • 数字 ID 可以直接使用 key=value 传递,例如:
- query_id=6794106 - queryId=6794106
  • - 位置 JSON 对于嵌套对象或需要精确混合字符串和数字字段时仍然有用:
- {executionId:01...,timeout:90,limit:20}
  • - 对于通过 key=value 传递的 SQL,将整个 SQL 字符串用双引号包裹,以便内部的 SQL 单引号能通过 shell 解析。
  • 如果 listBlockchains 返回 Dune 端的模式/方面错误,回退到使用 blockchains 过滤器的 searchTables。

已验证的真实场景

以下流程已通过 uxc 成功执行:

  • - 发现表:uniswap.uniswapx_trades
  • 创建 Base 每日交易量的临时查询
  • 执行查询
  • 获取结果

成功的 SQL 格式如下:

sql
SELECT block_date,
ROUND(SUM(amountusd), 2) AS dailyvolume_usd,
COUNT(*) AS trades
FROM uniswap.uniswapx_trades
WHERE blockchain = base
AND blockdate >= dateadd(day, -7, CURRENT_DATE)
GROUP BY 1
ORDER BY 1 DESC
LIMIT 7

参考

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

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 dune-mcp-skill-1776193960 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 dune-mcp-skill-1776193960 技能

通过命令行安装

skillhub install dune-mcp-skill-1776193960

下载

⬇ 下载 dune-mcp-skill v1.0.0(免费)

文件大小: 5.74 KB | 发布时间: 2026-4-15 12:46

v1.0.0 最新 2026-4-15 12:46
Initial release of dune-mcp-skill — use Dune MCP via UXC for blockchain data discovery, querying, and analysis.

- Adds integration with Dune MCP using the uxc protocol for API access.
- Provides credential management and explicit binding for secure authenticated queries.
- Enables table discovery, SQL query creation/execution, and result retrieval with structured workflow guidance.
- Introduces guardrails for safe credit-consuming and privacy-sensitive operations.
- Supports automatic type conversions for MCP numeric arguments and direct passing of IDs.
- Recommends best practices for partition-aware querying and usage of output parsing.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部