- DATA
- STATUS
- INSIGHT
- HUMAN
Short answer
How can I use AI to track protocol health?
Your AI client executes SQL queries via the Dune Analytics MCP and monitors them until they finish. Once the data is ready, the AI pulls the results so you can analyze protocol health instantly. You get a direct line from your chat to on-chain data.
Data outcomes
Where your data lands.
The AI moves data from Dune queries into your conversation.
DATA
Live query results
The AI pulls the final dataset from Dune after a query finishes. You get the exact numbers you asked for without leaving your chat.
STATUS
Execution tracking
The AI watches the progress of long-running SQL jobs. It knows exactly when a query is running, pending, or failed.
INSIGHT
Protocol health reports
Your agent interprets the raw SQL output to summarize trends. It turns rows of data into clear answers about protocol activity.
HUMAN
Manual query writing
The AI can't write or fix your SQL logic if the query itself is broken. You still need to provide valid Dune SQL to get results.
The workflow
What your AI does when a query is requested.
The AI manages the entire lifecycle of a Dune Analytics request.
Trigger the query
Your agent sends your SQL command to Dune to start the data retrieval process.
execute_queryCheck progress
The AI periodically checks if the query is still running or if it has finished.
get_execution_statusFetch the data
Once the status shows completion, the AI grabs the actual data rows.
get_execution_resultsReport findings
The AI reads the results and presents the protocol metrics to you in plain text.
get_execution_results
Try it
Copy these to start.
Use these prompts to begin monitoring your data.
Starting points
Swap the bracketed text for your specific Dune query or protocol name.
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 this Dune query to check the last 24h volume for [Protocol Name]: [SQL Query]
Check the status of my last query execution for [Query ID].
Get the results for the query that tracks [Metric Name] and summarize the trend.
Execute a query to find the current number of active wallets on [Protocol Name]: [SQL Query]
Claude
ChatGPT
Cursor
VS Code
Windsurf
Claude Code
JetBrains
Cline
Start here
Connect Dune Analytics once, then ask.
Just link your account once. Your credentials stay encrypted, and you can start querying Dune from any compatible client immediately.
Connect Dune Analytics to your AIFAQ
How the task behaves
- 01
Can the AI write complex SQL queries for me?
The AI can help draft queries, but it relies on the execute_query tool to run them. If the SQL is invalid, the tool will return an error.
- 02
Does the AI automatically run queries on a schedule?
No. The AI only runs queries when you explicitly ask it to via your chat client.
- 03
Can the AI change my Dune settings or delete queries?
No. The tools only allow the AI to execute queries, check status, and get results. It cannot modify your Dune account.
- 04
What happens if a query takes a long time to run?
The AI uses the get_execution_status tool to monitor the job. It won't give you the data until the status shows the query is complete.
- 05
Can the AI visualize the data with charts?
The AI retrieves the raw data results. It can describe the data or create text-based summaries, but it cannot generate image files or interactive Dune charts.
More questions about Dune Analytics? The Connector page answers them. See everything the Dune Analytics Connector can do
Connect Dune Analytics to Claude, Cursor, ChatGPT & more
