Provides access to Dune Analytics blockchain data, enabling execution of DuneSQL queries, retrieval of cached results, and management of saved queries for analyzing Ethereum transactions and other blockchain data.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Dune Analytics MCP Servershow me the latest Ethereum transaction count for the past week"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-server-dune
A Model Context Protocol (MCP) server for integrating AI agents with Dune Analytics blockchain data.
Requirements
Python 3.11+
Dune Analytics API key
Features
Tools
run_query - Execute saved Dune queries and wait for results
submit_query - Submit queries asynchronously for long-running jobs
get_execution_status - Check the status of running queries
get_execution_results - Retrieve results from completed executions
run_sql - Execute raw ad-hoc DuneSQL queries
create_query - Save new queries to your Dune library
update_query - Modify existing queries
archive_query - Archive queries from active workspace
Resources (dune:// scheme)
dune://query/{id}/latest- Cached results (zero credits)dune://query/{id}/sql- Query SQL definitiondune://execution/{id}/status- Execution job status
Prompts
generate_dune_sql - Guide for writing valid DuneSQL
analyze_result - Guide for interpreting query results
Installation
Configuration
Set your Dune API key as an environment variable:
Claude Desktop
Add to your claude_desktop_config.json:
Direct Execution
Usage Examples
Execute a Saved Query
Execute Ad-Hoc SQL
Read Cached Results (Zero Credits)
Access the resource dune://query/123456/latest to get cached results without consuming execution credits.
DuneSQL Tips
Addresses are bytearrays: use
0x...literals directlyDate intervals:
NOW() - INTERVAL '7' DAYPrefer decoded tables:
uniswap_v3_ethereum.Factory_evt_PoolCreatedAlways include
LIMITto prevent timeouts
Development
License
MIT