- RAW DATA
- MONITORING
- HUMAN
- REPORTING
Short answer
How can I use AI to automate my onchain research?
You give your agent a Dune query ID, and it executes the SQL to fetch the raw data rows. This lets you run recurring ecosystem checks or monitor protocol health without manual exports. You get direct access to the query results through your agent.
Research outcomes
What your agent produces
The data your agent pulls from Dune.
RAW DATA
Direct query results
The AI pulls the exact rows from your Dune SQL queries. You get the clean, structured data needed for immediate analysis.
MONITORING
Automated ecosystem checks
Your agent can run the same queries repeatedly to track changes in TVL, volume, or user counts over time.
HUMAN
Expert interpretation
The AI handles the data fetching, but you decide which trends actually matter for your investment or dev strategy.
REPORTING
Instant data summaries
Instead of looking at tables, you ask your agent to summarize the query results into a readable format.
The workflow
What your AI does when a query is requested.
The agent follows a specific loop to move from a SQL query to usable data.
Trigger the query
Your agent sends the specific query ID to Dune to start the execution process.
execute_queryTrack progress
The agent checks if the query is still running or if the data is ready to be read.
get_execution_statusFetch the data
Once the status is complete, the agent pulls the actual rows from the database.
get_execution_resultsAnalyze results
The agent uses the retrieved rows to answer your specific research questions.
get_execution_results
Try it
Copy these to start.
Use these prompts to kick off your research.
Starting points
Swap the query IDs and protocol names with the ones you actually use in Dune.
Dune Analytics Connector
You're all set. Choose your MCP client and follow the setup instructions.
https://edge.vinkius.com/vk_preview_eJSVmM35oPb3EQRWNnqipzpD87HbivFnslURw8ia/mcpClaude Desktop
Follow the steps below to connect in seconds.
- 1In Claude Desktop, open Settings → Connectors.
- 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
- 3Click Add and start a new chat — Dune Analytics capabilities are ready to use.
{
"mcpServers": {
"dune-analytics-web3-sql-analytics-api-mcp": {
"url": "https://edge.vinkius.com/vk_preview_eJSVmM35oPb3EQRWNnqipzpD87HbivFnslURw8ia/mcp"
}
}
}Run Dune query 123456 and tell me the total volume for the last 24 hours.
Check the status of my latest query and let me know when the data is ready.
Pull the results from query 789101 and summarize the top 5 holders.
Execute query 555666 and compare the current TVL to the value from yesterday.
Claude
ChatGPT
Cursor
VS Code
Windsurf
Claude Code
JetBrains
Cline
Start here
Connect Dune Analytics once, then ask.
One connection gives your agent access to your Dune queries. Your credentials stay encrypted and secure.
Connect Dune Analytics to your AIFAQ
How this task behaves
- 01
Can the AI create new Dune queries?
No. The AI can only execute existing queries that you have already created in Dune.
- 02
Does the AI change my Dune settings?
No. The AI only reads data and checks execution status; it cannot modify your Dune account or queries.
- 03
How does the AI know when a query is finished?
The agent uses a status check to monitor the execution before attempting to pull the results.
- 04
Can I use this to automate my entire dashboard?
The AI can run individual queries from your dashboard, but it doesn't see the visual dashboard layout itself.
- 05
What happens if a query fails?
The agent will see the failed status and can report the error back to you.
More questions about Dune Analytics? See everything the Dune Analytics Connector can do
Connect Dune Analytics to Claude, Cursor, ChatGPT & more
