Integrations
Enables configuration through environment variables for API access and server settings, particularly for storing the Dune Analytics API key.
Provides a web interface and REST API endpoints as an alternative to the MCP service, allowing access to Dune Analytics data through HTTP requests.
Used for source code management and enables contribution to the project through a structured branching workflow.
沙丘查询 MCP
通过模型控制协议 (MCP) 将 Dune Analytics 数据连接到智能代理的现代桥梁。
概述
dune-query-mcp 可将区块链数据分析无缝集成到您的 AI 应用程序中。通过利用 Dune Analytics 强大的查询功能和模型控制协议,该服务允许 LLM 和其他 AI 系统通过简单的自然语言交互访问链上数据。
核心能力
数据检索工具
工具 | 描述 | 用例 |
---|---|---|
get_latest_result | 检索预先计算的查询结果 | 快速访问现有数据 |
run_query | 按需执行查询 | 实时数据分析 |
数据格式
所有数据均以 CSV 格式返回,提供:
- 通用兼容性
- 大多数数据分析工具都可以轻松解析
- 人类可读的输出
入门
系统要求
- Python 3.10 或更高版本
- 有效的 Dune Analytics API 密钥(在此获取)
快速设置
- 克隆和导航Copy
- 环境设置Copy
- 配置 API 访问Copy
用法
运行服务
dune-query-mcp 提供两种运行方式:
作为 MCP 服务
这将在默认端口 8000 上启动 MCP 服务。
作为 Web 服务器
这提供了对 Web 界面和 REST API 端点的访问。
与应用程序集成
MCP 客户端集成
REST API
端点 | 方法 | 描述 |
---|---|---|
/dune/health | 得到 | 服务健康检查 |
/dune/query/{query_id}/latest | 得到 | 检索最新结果 |
/dune/query/{query_id}/execute | 邮政 | 运行查询 |
REST 调用示例:
建筑学
高级配置
环境变量
多变的 | 目的 | 默认 |
---|---|---|
DUNE_API_密钥 | Dune API 的身份验证 | 无(必填) |
港口 | 服务器端口 | 8000 |
性能调优
对于大容量查询执行:
故障排除
常见问题及解决方案:
问题 | 解决方案 |
---|---|
API 密钥错误 | 确保.env 文件存在且密钥有效 |
超时错误 | 增加复杂查询的超时时间 |
CSV解析问题 | 检查查询返回正确的表格数据 |
贡献
欢迎贡献!请按以下步骤操作:
- 分叉存储库
- 创建功能分支:
git checkout -b feature/amazing-feature
- 提交您的更改:
git commit -am 'Add some amazing feature'
- 推送到分支:
git push origin feature/amazing-feature
- 打开拉取请求
执照
本项目遵循 MIT 许可证。详情请参阅LICENSE
文件。
致谢
- 使用FastMCP构建
- 由Dune Analytics提供支持的查询功能
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 应用程序的桥梁,允许 LLM 通过自然语言交互访问链上数据。
Related MCP Servers
- -securityFlicense-qualityA Model Context Protocol server that enables AI assistants to access Flow blockchain data and perform operations such as checking balances, resolving domains, executing scripts, and submitting transactions.Last updated -JavaScript
- AsecurityFlicenseAqualityImplements the Model Context Protocol to allow AI models to access and interact with blockchain data, including reading contract states, retrieving events, and accessing transaction information across various networks.Last updated -104530TypeScript
Hashkey MCP Serverofficial
-security-license-qualityA Model Context Protocol server that provides onchain tools for AI applications to interact with the Hashkey Network, enabling cryptocurrency transfers, smart contract deployment, and blockchain interactions.Last updated -TypeScriptMIT License- -securityFlicense-qualityA Solana blockchain interaction server that allows AI tools to query blockchain data using natural language, access structured token information, and generate human-readable explanations of complex blockchain concepts.Last updated -7Python