logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

dune-data-connector-mcp

Facilitates access to Dune Analytics datasets for autonomous agents by executing SQL queries and delivering outputs formatted as delimited text strings for straightforward integration.

Author

dune-data-connector-mcp logo

yuri-xyz

MIT License

Quick Info

GitHub GitHub Stars 1
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

apisduneanalyticsdune analyticsdune queriesai agents

Dune Analytics Data Access MCP Server

A dedicated MCP service engineered to interface Dune Analytics query outputs with AI computational entities.

Core Capabilities

  • Tooling Suite:
  • fetch_current_snapshot: Pulls the most recent execution output for a given Dune query identifier.
  • execute_query_and_fetch: Triggers a specified Dune query and retrieves its resulting dataset.
  • Data Serialization: All retrieved query results are uniformly presented as standard Comma Separated Values (CSV) strings, optimizing them for subsequent agent processing.

Prerequisites for Deployment

  • Runtime environment requires Python version 3.10 or newer.
  • A valid, authenticated API credential for Dune Analytics is mandatory (obtainable via Dune Analytics settings).

Deployment Instructions

  1. Source Retrieval: bash git clone https://github.com/kukapay/dune-analytics-mcp.git cd dune-analytics-mcp

  2. Credential Configuration: Establish a .env file within the primary directory:

DUNE_API_KEY=your_secret_key_here

Alternatively, inject this key into the operational shell environment: bash export DUNE_API_KEY="your_secret_key_here"

Operational Guidelines

Starting the Service

  • Development/Testing Mode: bash mcp dev main.py

Initiates the server with capabilities for automated code updates upon modification.

  • Integration with Claude Desktop: bash mcp install main.py --name "Dune Data Bridge"

Registers the service as a persistent tool for use within the Claude environment.

Tool Invocation Details

  1. fetch_current_snapshot(query_id)
  2. Purpose: Obtains the previously computed data set associated with the provided Dune query identifier.
  3. Input: query_id (integer) - The unique numerical identifier for the target Dune query.
  4. Output: A string containing the tabular data rendered in CSV format.
  5. Invocation Example:

    fetch_current_snapshot(query_id=4853921)

  6. execute_query_and_fetch(query_id)

  7. Purpose: Forces a fresh execution of the specified Dune query and immediately returns the resulting dataset.
  8. Input: query_id (integer) - The numerical handle of the Dune query intended for execution.
  9. Output: A string representing the newly generated query results in CSV format.
  10. Invocation Example:

    execute_query_and_fetch(query_id=1215383)

Example Agent Prompts (for Claude Desktop)

  • "Retrieve the most recent output for dune query identifier 1215383"
  • "Initiate and fetch results from dune query 1215383"

This software is distributed under the terms of the MIT License (refer to the accompanying [LICENSE] file for specifics).

See Also

`