Dune Analytics MCP Server
Connect Dune Analytics with your AI agents for real-time blockchain data retrieval, analytics, and reporting via FlowHunt’s MCP integration.

What does “Dune Analytics” MCP Server do?
The Dune Analytics MCP Server is a Model Context Protocol (MCP) server that serves as a bridge between Dune Analytics and AI agents. Its primary purpose is to enable seamless integration of blockchain analytics data into AI-powered workflows by allowing assistants to fetch and execute Dune queries programmatically. By exposing Dune Analytics data as tools, developers and AI clients can perform real-time blockchain data retrieval, analysis, and reporting within their automation or agent workflows. The server’s CSV output format ensures compatibility with downstream data processing, making it valuable for tasks like on-chain analytics, dashboard generation, and automated reporting in developer environments.
List of Prompts
No explicit prompt templates are listed in the repository or documentation.
List of Resources
No explicit resources are described or exposed in the documentation or code.
List of Tools
- get_latest_result
- Fetches the latest results of a Dune Analytics query by its ID. The output is a CSV-formatted string containing the query results.
- run_query
- Executes a specified Dune Analytics query by its ID and retrieves the results. Also returns data in a CSV-formatted string.
Use Cases of this MCP Server
- Blockchain Data Analytics
- Automate the retrieval and analysis of blockchain data by running Dune Analytics queries directly from AI agents.
- Dashboard Generation
- Power dynamic dashboards or reporting tools by fetching and updating Dune Analytics data via the MCP interface.
- Automated Crypto Market Reporting
- Enable bots or assistants to generate up-to-date reports on blockchain activity, DeFi protocols, or token analytics.
- Data-Driven Smart Contract Monitoring
- Integrate real-time monitoring for smart contracts or on-chain events by querying Dune for specific triggers and surfacing the results.
- Research and Data Science Workflows
- Facilitate rapid experimentation and data gathering for crypto research through automated Dune queries embedded in data science pipelines.
How to set it up
Windsurf
- Ensure you have Python 3.10+ and a valid Dune Analytics API key.
- In your Windsurf configuration, locate the
mcpServers
section. - Add the Dune Analytics MCP Server with the following JSON snippet:
{ "mcpServers": { "dune-analytics": { "command": "python", "args": ["main.py"] } } }
- Save the configuration and restart Windsurf.
- Verify the setup by issuing a test Dune query through the interface.
Securing API Keys: Set your DUNE_API_KEY in environment variables. Example:
{
"mcpServers": {
"dune-analytics": {
"command": "python",
"args": ["main.py"],
"env": {
"DUNE_API_KEY": "${DUNE_API_KEY}"
},
"inputs": {
"DUNE_API_KEY": "your_api_key_here"
}
}
}
}
Claude
- Install the server using Smithery CLI:
npx -y @smithery/cli install @kukapay/dune-analytics-mcp --client claude
- Ensure your DUNE_API_KEY is set as an environment variable.
- In Claude Desktop, confirm the MCP server is listed and running.
- Use the command interface to run Dune queries directly.
- Verify output is received in CSV format.
Cursor
- Install Python 3.10+ and obtain a Dune API key.
- In Cursor’s configuration file, add:
{ "mcpServers": { "dune-analytics": { "command": "python", "args": ["main.py"] } } }
- Set your API key in the environment or configuration.
- Restart Cursor and test the connection.
Cline
- Make sure Python 3.10+ is installed and your API key is ready.
- Add the MCP server definition to your Cline config:
{ "mcpServers": { "dune-analytics": { "command": "python", "args": ["main.py"] } } }
- Export
DUNE_API_KEY
in your shell or as an environment variable. - Restart Cline and run a sample query to validate.
Securing API Keys (applies to all platforms): Always use environment variables to avoid exposing your API keys in plaintext configuration files.
How to use this MCP inside flows
Using MCP in FlowHunt
To integrate MCP servers into your FlowHunt workflow, start by adding the MCP component to your flow and connecting it to your AI agent:

Click on the MCP component to open the configuration panel. In the system MCP configuration section, insert your MCP server details using this JSON format:
{
"dune-analytics": {
"transport": "streamable_http",
"url": "https://yourmcpserver.example/pathtothemcp/url"
}
}
Once configured, the AI agent is now able to use this MCP as a tool with access to all its functions and capabilities. Remember to change “dune-analytics” to the actual name and replace the URL with your own MCP server URL.
Overview
Section | Availability | Details/Notes |
---|---|---|
Overview | ✅ | Dune Analytics MCP enables Dune data access for AI agents |
List of Prompts | ⛔ | No prompt templates provided |
List of Resources | ⛔ | No explicit resources listed |
List of Tools | ✅ | get_latest_result, run_query |
Securing API Keys | ✅ | Requires DUNE_API_KEY in environment |
Sampling Support (less important in evaluation) | ⛔ | Not mentioned |
Our opinion
The Dune Analytics MCP Server is straightforward and focused on providing access to Dune Analytics queries as tools, making it valuable in blockchain analytics workflows. However, it lacks prompt templates and explicit resources, and does not mention advanced MCP features like roots or sampling. It is well-documented for setup and usage. On a scale of 0–10, we would rate this MCP a 6/10, mainly due to its clear utility and good documentation but limited breadth in MCP feature support.
MCP Score
Has a LICENSE | ✅ (MIT) |
---|---|
Has at least one tool | ✅ |
Number of Forks | 6 |
Number of Stars | 20 |
Frequently asked questions
- What is the Dune Analytics MCP Server?
It is a Model Context Protocol server that bridges Dune Analytics and AI agents, enabling programmatic execution and retrieval of Dune queries for blockchain data analytics, dashboards, and reporting.
- What tools does this MCP server provide?
It exposes two main tools: get_latest_result (fetches the latest Dune query result by ID) and run_query (executes a Dune query by ID), both returning results as CSV-formatted strings.
- How is the Dune Analytics MCP Server typically used?
It is used for automating blockchain data retrieval and analytics, powering dashboards, generating automated crypto market reports, and supporting data-driven monitoring and research workflows.
- How do I secure my API key?
Always use environment variables (e.g., DUNE_API_KEY) rather than hardcoding credentials in your config files to protect sensitive information.
- What platforms support this MCP server?
It is compatible with Windsurf, Claude, Cursor, and Cline, and can be used in FlowHunt flows to integrate blockchain analytics into AI-powered automation.
- What is the output format of the data?
Query results are returned as CSV-formatted strings, making them easy to process in downstream automation or analytics tools.
Integrate Dune Analytics with FlowHunt
Supercharge your AI workflows with real-time blockchain analytics from Dune. Connect, analyze, and automate crypto data in minutes.