MCP Directory

How to add Dune Analytics MCP Server to Windsurf

Bridge Dune Analytics on-chain query results to AI agents as CSV. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.

Last updated June 14, 2026 · 40 · stdio · apikey

Windsurf 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 Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
  2. 2Paste the Dune Analytics MCP Server config below.
  3. 3Fill in placeholder secrets, then save.
  4. 4Click Refresh in the MCP panel.
  5. 5Dune Analytics MCP Server's tools become available to Cascade.

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 Windsurf

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 + Windsurf FAQ

Where is the Windsurf config file?

Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_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 Windsurf?

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