MCP Directory

How to add Dune Analytics MCP Server to Claude Desktop

Bridge Dune Analytics on-chain query results to AI agents as CSV. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.

Last updated June 14, 2026 ยท 40โ˜… ยท stdio ยท apikey

Claude Desktop config for Dune Analytics MCP Server

npx -y @smithery/cli install @kukapay/dune-analytics-mcp --client claude
{
  "mcpServers": {
    "dune-analytics-mcp-server": {
      "command": "mcp",
      "args": [
        "install",
        "main.py",
        "--name",
        "Dune Analytics"
      ],
      "env": {
        "DUNE_API_KEY": "your_api_key_here"
      }
    }
  }
}

Setup steps

  1. 1Open Claude Desktop โ†’ Settings โ†’ Developer โ†’ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
  2. 2Paste the Dune Analytics MCP Server config below under the top-level "mcpServers" key.
  3. 3Fill in any placeholder secrets (API keys, paths) in the snippet.
  4. 4Save the file, then fully quit and reopen Claude Desktop.
  5. 5Open a chat and confirm Dune Analytics MCP Server's tools appear under the ๐Ÿ”Œ tools menu.

Before you start

  • Python 3.10+
  • A valid Dune Analytics API key (get one from https://dune.com/settings/api)
  • The mcp CLI / MCP-capable client such as Claude Desktop

What Dune Analytics MCP Server can do in Claude Desktop

get_latest_result

Fetch the latest (cached) results of a Dune query by ID. Input: query_id (int). Output: CSV-formatted string of the query results.

run_query

Execute a Dune query by ID and retrieve the results. Input: query_id (int). Output: CSV-formatted string of the query results.

Security

Requires a Dune Analytics API key supplied via the DUNE_API_KEY environment variable. Treat the key as a secret; do not commit the .env file. The run_query tool executes Dune queries against your account, which may consume Dune API credits.

Dune Analytics MCP Server + Claude Desktop FAQ

Where is the Claude Desktop config file?

Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the Dune Analytics MCP Server config there under the "mcpServers" key and restart the client.

Is Dune Analytics MCP Server safe to use with Claude Desktop?

Requires a Dune Analytics API key supplied via the DUNE_API_KEY environment variable. Treat the key as a secret; do not commit the .env file. The run_query tool executes Dune queries against your account, which may consume Dune API credits.

What do I need to run this server?

Python 3.10+ and a valid Dune Analytics API key set via the DUNE_API_KEY environment variable. You can get an API key from https://dune.com/settings/api.

How do I install it for Claude Desktop?

Use the Smithery CLI: 'npx -y @smithery/cli install @kukapay/dune-analytics-mcp --client claude'. Alternatively, clone the repo, set DUNE_API_KEY, and run 'mcp install main.py --name "Dune Analytics"'.

What format are results returned in?

Both tools return results as CSV-formatted strings, which makes them easy for AI models and downstream tooling to parse.

View repo Full Dune Analytics MCP Server page