Dune Analytics MCP 服务器
将 Dune Analytics 数据桥接到 AI 代理的 mcp 服务器。
特征
工具:
get_latest_result:通过 ID 获取 Dune 查询的最新结果。run_query:通过 ID 执行 Dune 查询并检索结果。
CSV 输出:所有结果都以 CSV 格式的字符串返回,以便于处理。
先决条件
Python 3.10+
有效的 Dune Analytics API 密钥(从Dune Analytics获取)
安装
克隆存储库:
git clone https://github.com/kukapay/dune-analytics-mcp.git cd dune-analytics-mcp设置环境变量:在项目根目录中创建一个
.env文件:DUNE_API_KEY=your_api_key_here或者,将其设置为系统环境变量:
export DUNE_API_KEY="your_api_key_here"
用法
运行服务器
开发模式:
mcp dev main.py这将启动服务器并进行热加载以进行开发。
为 Claude Desktop 安装:
mcp install main.py --name "Dune Analytics"安装服务器作为服务以供 Claude Desktop 使用。
工具使用
get_latest_result(query_id)描述:检索指定 Dune 查询的最新结果。
输入:
query_id(int)-Dune 查询的 ID。输出:查询结果的 CSV 格式字符串。
例子:
get_latest_result(query_id=4853921)
run_query(query_id)描述:执行 Dune 查询并返回结果。
输入:
query_id(int)-要运行的 Dune 查询的 ID。输出:查询结果的 CSV 格式字符串。
例子:
run_query(query_id=1215383)
Claude Desktop 中的示例命令
“获取沙丘查询 1215383 的最新结果”
“运行沙丘查询 1215383”
执照
该项目根据 MIT 许可证获得许可 - 有关详细信息,请参阅LICENSE文件。
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
将 Dune Analytics 数据桥接到 AI 代理的 mcp 服务器。
Related Resources
Related MCP Servers
- Asecurity-licenseAqualityMCP Server that connects AI agents to Chargebee Platform.Last updated -23813MIT License
- -security-license-qualityA flexible server that enables communication between AI models and tools, supporting multiple MCP servers and compatible with Claude, MCP Dockmaster, and other MCP clients.Last updated -241
- -security-license-qualityAn MCP server that enables AI applications to interact with DiceDB databases.Last updated -5MIT License
- -security-license-qualityA Model Context Protocol server that connects AI agents to Dune Analytics data, providing access to DEX metrics, EigenLayer statistics, and Solana token balances through structured tools.Last updated -2MIT License