# Dune

> Dune is an MCP server for databases. Remote MCP server giving AI clients access to Dune's onchain data, DuneSQL queries. It runs as a hosted remote server, so there is nothing to install locally.

- **Kind:** MCP server
- **Platforms:** API, CLI
- **Website:** https://docs.dune.com/docs/agents/mcp
- **MCP Registry name:** com.dune/mcp
- **Categories:** [databases](https://ai-powered.com/categories/databases)
- **Listing updated:** 2026-11-27

## About

Dune's MCP server connects an AI assistant to the blockchain datasets Dune indexes, so you can locate tables for a protocol, contract or chain without writing schema lookups by hand. Once connected, the assistant can draft and run DuneSQL queries, read the results, and turn them into charts, counters or tables shown inline in the conversation.

Beyond one-off analysis, the server manages the objects you already keep in Dune. It can update saved queries, build dashboards from a description, store query results as materialized views on a refresh schedule, and submit contracts for decoding. Access is scoped to the team you pick at sign-in, so it sees the queries, dashboards and folders that team owns.

It suits analysts, researchers and developers who already work in Claude, Cursor, Codex or OpenCode and want to stay in that environment while querying onchain data. Query runs consume Dune credits, and the server exposes a tool that reports credit usage for the current billing period.

## Features

- **Table discovery:** Search Dune's catalog of blockchain tables by protocol, chain, category or contract address.
- **Query authoring and execution:** Create, edit, run and fetch results for saved DuneSQL queries from the chat.
- **Inline charts:** Generate charts, counters and tables from query results with interactive and static image links.
- **Dashboard management:** Create, update, fetch and archive dashboards with widgets and layout.
- **Materialized views and schedules:** Store query results as queryable tables and set refresh schedules for queries and dashboards.
- **Contract decoding:** Submit up to 100 contracts for decoding and track the status of each submission.

## Good for

- Find the right decoded table for a protocol's swap or transfer activity
- Build and run a daily metric query for a chain without leaving the AI client
- Turn query results into a chart or counter for a quick summary
- Create a multi-widget dashboard from a plain-language description
- Schedule an hourly refresh of a materialized view and confirm its status
- Check how many credits recent query runs have consumed

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add --transport http mcp https://api.dune.com/mcp/v1
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "mcp": {
      "type": "http",
      "url": "https://api.dune.com/mcp/v1"
    }
  }
}
```

### Claude Desktop (Customize → Connectors → Add → Add custom connector)

```text
https://api.dune.com/mcp/v1
```

Paste this URL, choose how to sign in, then click Add and Connect. On Team and Enterprise an Owner adds it in Organization settings → Connectors.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "mcp": {
      "url": "https://api.dune.com/mcp/v1"
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "mcp": {
      "type": "http",
      "url": "https://api.dune.com/mcp/v1"
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### ChatGPT (chatgpt.com → Plugins → + → Add custom MCP server)

```text
https://api.dune.com/mcp/v1
```

Paste this URL, set up sign-in, accept the warning and install the plugin. Then type @ in a chat to use it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add mcp --url https://api.dune.com/mcp/v1
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.mcp]
url = "https://api.dune.com/mcp/v1"
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "mcp": {
      "httpUrl": "https://api.dune.com/mcp/v1"
    }
  }
}
```

Or run: gemini mcp add -s user --transport http mcp https://api.dune.com/mcp/v1

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp": {
      "serverUrl": "https://api.dune.com/mcp/v1"
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "mcp": {
      "url": "https://api.dune.com/mcp/v1",
      "transport": "http"
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "mcp": {
      "type": "streamableHttp",
      "url": "https://api.dune.com/mcp/v1"
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "mcp": {
      "url": "https://api.dune.com/mcp/v1"
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "mcp": {
      "url": "https://api.dune.com/mcp/v1"
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "mcp": {
      "url": "https://api.dune.com/mcp/v1"
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "mcp": {
      "url": "https://api.dune.com/mcp/v1"
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Grok Bot (Grok Bot desktop app → Connect apps → Add a custom connector)

```sh
https://api.dune.com/mcp/v1
```

Enter a Name (for example "Dune"), choose Type: Remote HTTPS, paste this as the Server URL and choose Add plugin.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "mcp": {
      "type": "http",
      "url": "https://api.dune.com/mcp/v1"
    }
  }
}
```

## Tools

From the tool list in its README, going by the names, 4 of 42 tools delete data and 15 change data; 4 names don't say. From the server's own tool labels and tool names; not verified by us.

- `searchTables` (name suggests: reads): Find tables in the Dune catalog by protocol, chain, category, or schema
- `listBlockchains` (name suggests: reads): List indexed blockchains with table counts
- `searchTablesByContractAddress` (name suggests: reads): Find the decoded event and call tables for a contract address
- `getTableSize` (name suggests: reads): Get the storage size of a table and of the physical tables behind it
- `createAndExecuteQuery` (name suggests: changes): Create a query, run it, optionally add a visualization, and return a preview of the results
- `createDuneQuery` (name suggests: changes): Create and save a query without running it
- `getDuneQuery` (name suggests: reads): Fetch the SQL, metadata, and latest execution of a saved query
- `searchDuneQueries` (name suggests: reads): Find saved queries by name
- `updateDuneQuery` (name suggests: changes): Change a query's SQL, title, description, privacy, tags, or parameters
- `executeQueryById` (name suggests: changes): Run a saved query and return an execution ID
- `getExecutionResults` (name suggests: reads): Fetch the status and rows of an execution
- `generateVisualization`: Create a chart, counter, or table from query results
- `renderVisualization`: Show an existing visualization as an interactive chart in the conversation
- `getVisualization` (name suggests: reads): Fetch a visualization's type, configuration, and chart URLs
- `listQueryVisualizations` (name suggests: reads): List the visualizations of a query
- `updateVisualization` (name suggests: changes): Change a visualization's name, chart type, or configuration
- `deleteVisualization` (name suggests: deletes): Permanently delete a visualization
- `createDashboard` (name suggests: changes): Create a dashboard with widgets and layout
- `getDashboard` (name suggests: reads): Fetch a dashboard's metadata, widgets, and layout
- `searchDuneDashboards` (name suggests: reads): Find dashboards by name
- `updateDashboard` (name suggests: changes): Change a dashboard's metadata, or replace its widgets and layout
- `archiveDashboard` (name suggests: changes): Archive a dashboard and remove it from public view
- `createMaterializedView` (name suggests: changes): Store a saved query's results as a queryable table, with an optional scheduled refresh
- `listMaterializedViews` (name suggests: reads): List the materialized views that you or your team own
- `getMaterializedView` (name suggests: reads): Fetch a materialized view's metadata, size, and execution status
- `refreshMaterializedView` (name suggests: reads): Run the source query again and replace the table contents
- `updateMaterializedView` (name suggests: changes): Change the performance tier, or add, change, or remove the refresh schedule
- `deleteMaterializedView` (name suggests: deletes): Permanently delete a materialized view and its refresh schedule
- `listDuneFolders` (name suggests: reads): List folders in your library, with item counts
- `getDuneFolder` (name suggests: reads): Fetch a folder with its subfolders, queries, and dashboards
- `createDuneFolder` (name suggests: changes): Create a folder at the top level or inside another folder
- `updateDuneFolder` (name suggests: changes): Rename a folder or change its description, color, or icon
- `moveDuneFolder` (name suggests: changes): Move a folder under another folder or to the top level
- `moveContentToFolder` (name suggests: changes): Move queries and dashboards into a folder or out of folders
- `deleteDuneFolder` (name suggests: deletes): Delete a folder
- `listSchedules` (name suggests: reads): List query, dashboard, and materialized view schedules
- `setSchedule` (name suggests: changes): Create or replace the schedule of a query or a dashboard
- `deleteSchedule` (name suggests: deletes): Delete the schedule of a query or a dashboard
- `submitContractsForDecoding`: Submit up to 100 contracts for decoding, or ask to upgrade, rename, or delete a decoded contract
- `listContractSubmissions` (name suggests: reads): List your decoding submissions and their status
- `getUsage` (name suggests: reads): Check credit usage in the current billing period
- `submit_feedback`: Send Dune a rating of whether a tool result helped

## FAQ

### Is Dune MCP the official Dune MCP server?

Yes, it is Dune's official MCP server, served at https://api.dune.com/mcp/v1.

### Which AI clients can use Dune MCP?

The docs cover Claude Code, Claude Desktop, Cursor, Codex and OpenCode, plus other MCP clients that support remote servers over Streamable HTTP.

### Do I need a Dune API key to use Dune MCP?

Interactive clients sign in with a Dune account through OAuth. Headless and CI setups can instead pass an x-dune-api-key header.

### What data can Dune MCP access?

It reads Dune's blockchain tables, including raw, decoded and curated tables, plus the queries, visualizations, dashboards, folders and materialized views owned by the selected team, and Dune's documentation.

### How do I add Dune to Claude Code?

Run this command in your terminal: claude mcp add --transport http mcp https://api.dune.com/mcp/v1

### What are the best alternatives to Dune?

The closest alternatives to Dune are Datanika MCP, Diogenes Database Intelligence & SQL Engine MCP, icedq-tools, Db Access MCP and Databricks MCP Server.

## Where this comes from

- Description: written from the project's website and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Datanika MCP](https://ai-powered.com/mcp/datanika-mcp): Datanika MCP is an open-source MCP server for databases.
- [Diogenes Database Intelligence & SQL Engine MCP](https://ai-powered.com/mcp/diogenes-database-intelligence-and-sql-engine-mcp): Diogenes Database Intelligence & SQL Engine MCP is a freemium MCP server for databases.
- [icedq-tools](https://ai-powered.com/mcp/icedq-tools): icedq-tools is an open-source MCP server for databases.
- [Db Access MCP](https://ai-powered.com/mcp/db-access-mcp): Db Access MCP is an open-source MCP server for databases.
- [Databricks MCP Server](https://ai-powered.com/mcp/databricks-mcp-server): Databricks MCP Server is an open-source MCP server for databases.
- [dataoil.tech](https://ai-powered.com/mcp/dataoil-tech): dataoil.tech is an MCP server for databases.
- [DataLink](https://ai-powered.com/mcp/datalink): DataLink is an open-source MCP server for databases.
- [Dbridge MCP](https://ai-powered.com/mcp/dbridge-mcp): Dbridge MCP is an open-source MCP server for databases.

---
Source: https://ai-powered.com/mcp/dune
