# kukapay/dune-analytics-mcp [Health: Active]

**Category:** 💰 Finance & Fintech  
**Repository:** https://github.com/kukapay/dune-analytics-mcp  
**GitHub Stars:** 41  
**Views:** 3  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/kukapay-dune-analytics-mcp

## Description
A mcp server that bridges Dune Analytics data to AI agents.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "dune-analytics-mcp": {
    "command": "npx",
    "args": ["-y","@smithery/cli"],
    "env": {
      "DUNE_API_KEY": ""
    }
  }
}
```

**Requires environment variables:** `DUNE_API_KEY` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What kukapay/dune-analytics-mcp MCP server does

The kukapay/dune-analytics-mcp MCP server connects AI agents to Dune Analytics query data. It supports two operations: retrieving the most recent result for a query and executing a query to obtain results. Both operations use a numeric Dune query ID and return the result as a CSV-formatted string.

This is suited to workflows where an agent needs to read data from queries that already exist in Dune Analytics. It does not provide a tool for writing SQL, creating queries, or managing Dune dashboards based on the supplied documentation.

## How it works

The server uses the Dune Analytics API and authenticates with the `DUNE_API_KEY` environment variable. When an agent invokes `get_latest_result`, the server requests the latest available output for the supplied query ID. When it invokes `run_query`, the server executes the specified Dune query and returns its results.

The returned data is represented as CSV text rather than a structured MCP-specific result type. Agents or client applications can then process that text as needed. Example query IDs in the documentation include `4853921` for fetching a latest result and `1215383` for running a query.

## Setup and configuration

Python 3.10 or newer and a valid Dune Analytics API key are required. The repository can be cloned locally, after which the key can be supplied in a `.env` file at the project root or exported as a system environment variable:

```bash
export DUNE_API_KEY="your_api_key_here"
```

The README documents `mcp dev main.py` for development mode with hot reloading. It also documents `mcp install main.py --name "Dune Analytics"` for registering the server with Claude Desktop. Smithery installation is listed as another setup path, but it is a client installation command rather than the server's own runtime command.

## Tools and capabilities

- `get_latest_result(query_id)`: fetches the latest results for a specified Dune query.
- `run_query(query_id)`: executes a specified Dune query and returns its results.
- CSV output: returns both tool results as CSV-formatted strings.
- Query-ID input: each tool accepts an integer Dune query ID.

The README gives Claude Desktop example requests such as “Get latest results for dune query 1215383” and “Run dune query 1215383.”

## Limitations and notes

The kukapay/dune-analytics-mcp MCP server requires access to Dune Analytics and a valid API key. The provided material does not describe query creation, SQL editing, dashboard access, pagination, result schemas, or controls for query execution. It also does not specify whether Dune API usage is free or paid.

Results are documented as CSV strings, so consumers that require typed rows or JSON may need to parse the returned content. The documented client integration is Claude Desktop; compatibility with other MCP clients is not established by the supplied material.

_Full upstream README: https://allmcps.com/mcp/kukapay-dune-analytics-mcp/readme_

