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.
Dune Query MCP
A modern bridge connecting Dune Analytics data to intelligent agents through Model Control Protocol (MCP).
Overview
dune-query-mcp enables seamless integration of blockchain data analytics into your AI applications. By leveraging Dune Analytics' powerful query capabilities with the Model Control Protocol, this service allows LLMs and other AI systems to access on-chain data through simple, natural language interactions.
Core Capabilities
Data Retrieval Tools
Tool | Description | Use Case |
---|---|---|
get_latest_result | Retrieves pre-computed query results | Quick access to existing data |
run_query | Executes a query on-demand | Real-time data analysis |
Data Format
All data is returned in CSV format, providing:
- Universal compatibility
- Easy parsing by most data analysis tools
- Human-readable output
Getting Started
System Requirements
- Python 3.10 or higher
- Valid Dune Analytics API key (Get yours here)
Quick Setup
- Clone & NavigateCopy
- Environment SetupCopy
- Configure API AccessCopy
Usage
Running the Service
dune-query-mcp offers two ways to run:
As MCP Service
This starts the MCP service on default port 8000.
As Web Server
This provides access to the web interface and REST API endpoints.
Integrating with Applications
MCP Client Integration
REST API
Endpoint | Method | Description |
---|---|---|
/dune/health | GET | Service health check |
/dune/query/{query_id}/latest | GET | Retrieve latest results |
/dune/query/{query_id}/execute | POST | Run a query |
Example REST Call:
Architecture
Advanced Configuration
Environment Variables
Variable | Purpose | Default |
---|---|---|
DUNE_API_KEY | Authentication for Dune API | None (Required) |
PORT | Server port | 8000 |
Performance Tuning
For high-volume query execution:
Troubleshooting
Common issues and solutions:
Problem | Solution |
---|---|
API Key errors | Ensure .env file exists with valid key |
Timeout errors | Increase timeout for complex queries |
CSV parsing issues | Check query returns proper tabular data |
Contributing
Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Commit your changes:
git commit -am 'Add some amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
License
This project is released under the MIT License. See LICENSE
file for details.
Acknowledgments
- Built with FastMCP
- Query functionality powered by 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.
A bridge that connects Dune Analytics blockchain data to AI applications through Model Control Protocol, allowing LLMs to access on-chain data via natural language interactions.
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