Skip to main content
MCP (Model Context Protocol) is an open-source standard for connecting AI applications to external systems. Dune MCP gives your agent direct, structured access to Dune workflows: discover the right tables, create and run queries, inspect results, and create visualizations in the same conversation. This is the fastest way to move from prompt to reliable onchain analysis. Dune MCP currently ships with these official tools:
CategoryToolDescription
DiscoverysearchDocsSearch Dune docs for guides, examples, and API references
DiscoverysearchTablesFind tables by protocol, chain, category, or schema
DiscoverylistBlockchainsList indexed blockchains with table counts
DiscoverysearchTablesByContractAddressFind decoded event/call tables for a contract address
Query LifecyclecreateDuneQueryCreate and save a new Dune query
Query LifecyclegetDuneQueryFetch SQL and metadata for an existing query
Query LifecycleupdateDuneQueryUpdate SQL, title, description, tags, or parameters
Query LifecycleexecuteQueryByIdExecute a saved query and return an execution ID
Query LifecyclegetExecutionResultsFetch status and results for a query execution
VisualizationgenerateVisualizationCreate charts, counters, and tables from query results
AccountgetUsageCheck current billing-period credit usage

Connect Dune MCP

All clients authenticate to Dune MCP with your Dune API key.
  • MCP endpoint: https://api.dune.com/mcp/v1
  • Header auth: x-dune-api-key: <dune-api-key>
  • Query auth (for clients that prefer URL auth): ?api_key=<dune_api_key>
OAuth with your Dune account is coming soon. For now, authenticate with a Dune API key.

Claude Code

claude mcp add --scope user --transport http dune https://api.dune.com/mcp/v1 --header "x-dune-api-key: <dune-api-key>"

Claude Desktop / Web App

OpenCode

Connect opencode to Dune MCP

Codex

codex mcp add dune_prod --url "https://api.dune.com/mcp/v1?api_key=<dune_api_key>"

Cursor

ChatGPT

ChatGPT support is planned via OAuth and will be documented here once available.

Key Benefits

Natural Language to SQL

Describe the question in plain English and let your agent discover tables, draft SQL, and return results.

Cross-Chain Coverage

Work across Dune’s indexed chains through one MCP interface, with discovery and query tools in the same flow.

End-to-End Workflow

Go from question to execution to visualization in one conversation without switching apps.

Use Cases

Protocol Analytics

Track core metrics like volume, users, or activity using curated and decoded datasets.

Wallet Intelligence

Analyze wallet behavior, holdings, and flows across multiple chains from a single prompt.

Market Research

Compare sectors, tokens, and venues with reusable query and visualization workflows.

Data Workflow Prototyping

Iterate quickly on query ideas, validate results, and turn them into saved assets.