Dune Analytics MCP Server

Blockchain Analytics AI Tools MCP

Contact us to host your MCP Server in FlowHunt

FlowHunt provides an additional security layer between your internal systems and AI tools, giving you granular control over which tools are accessible from your MCP servers. MCP servers hosted in our infrastructure can be seamlessly integrated with FlowHunt's chatbot as well as popular AI platforms like ChatGPT, Claude, and various AI editors.

What does “Dune Analytics” MCP Server do?

The Dune Analytics MCP Server is a Model Context Protocol (MCP) server that serves as a bridge between Dune Analytics and AI agents. Its primary purpose is to enable seamless integration of blockchain analytics data into AI-powered workflows by allowing assistants to fetch and execute Dune queries programmatically. By exposing Dune Analytics data as tools, developers and AI clients can perform real-time blockchain data retrieval, analysis, and reporting within their automation or agent workflows. The server’s CSV output format ensures compatibility with downstream data processing, making it valuable for tasks like on-chain analytics, dashboard generation, and automated reporting in developer environments.

List of Prompts

No explicit prompt templates are listed in the repository or documentation.

Logo

Ready to grow your business?

Start your free trial today and see results within days.

List of Resources

No explicit resources are described or exposed in the documentation or code.

List of Tools

  • get_latest_result
    • Fetches the latest results of a Dune Analytics query by its ID. The output is a CSV-formatted string containing the query results.
  • run_query
    • Executes a specified Dune Analytics query by its ID and retrieves the results. Also returns data in a CSV-formatted string.

Use Cases of this MCP Server

  • Blockchain Data Analytics
    • Automate the retrieval and analysis of blockchain data by running Dune Analytics queries directly from AI agents.
  • Dashboard Generation
    • Power dynamic dashboards or reporting tools by fetching and updating Dune Analytics data via the MCP interface.
  • Automated Crypto Market Reporting
    • Enable bots or assistants to generate up-to-date reports on blockchain activity, DeFi protocols, or token analytics.
  • Data-Driven Smart Contract Monitoring
    • Integrate real-time monitoring for smart contracts or on-chain events by querying Dune for specific triggers and surfacing the results.
  • Research and Data Science Workflows
    • Facilitate rapid experimentation and data gathering for crypto research through automated Dune queries embedded in data science pipelines.

How to set it up

Windsurf

  1. Ensure you have Python 3.10+ and a valid Dune Analytics API key.
  2. In your Windsurf configuration, locate the mcpServers section.
  3. Add the Dune Analytics MCP Server with the following JSON snippet:
    {
      "mcpServers": {
        "dune-analytics": {
          "command": "python",
          "args": ["main.py"]
        }
      }
    }
    
  4. Save the configuration and restart Windsurf.
  5. Verify the setup by issuing a test Dune query through the interface.

Securing API Keys: Set your DUNE_API_KEY in environment variables. Example:

{
  "mcpServers": {
    "dune-analytics": {
      "command": "python",
      "args": ["main.py"],
      "env": {
        "DUNE_API_KEY": "${DUNE_API_KEY}"
      },
      "inputs": {
        "DUNE_API_KEY": "your_api_key_here"
      }
    }
  }
}

Claude

  1. Install the server using Smithery CLI:
    npx -y @smithery/cli install @kukapay/dune-analytics-mcp --client claude
    
  2. Ensure your DUNE_API_KEY is set as an environment variable.
  3. In Claude Desktop, confirm the MCP server is listed and running.
  4. Use the command interface to run Dune queries directly.
  5. Verify output is received in CSV format.

Cursor

  1. Install Python 3.10+ and obtain a Dune API key.
  2. In Cursor’s configuration file, add:
    {
      "mcpServers": {
        "dune-analytics": {
          "command": "python",
          "args": ["main.py"]
        }
      }
    }
    
  3. Set your API key in the environment or configuration.
  4. Restart Cursor and test the connection.

Cline

  1. Make sure Python 3.10+ is installed and your API key is ready.
  2. Add the MCP server definition to your Cline config:
    {
      "mcpServers": {
        "dune-analytics": {
          "command": "python",
          "args": ["main.py"]
        }
      }
    }
    
  3. Export DUNE_API_KEY in your shell or as an environment variable.
  4. Restart Cline and run a sample query to validate.

Securing API Keys (applies to all platforms): Always use environment variables to avoid exposing your API keys in plaintext configuration files.

How to use this MCP inside flows

Using MCP in FlowHunt

To integrate MCP servers into your FlowHunt workflow, start by adding the MCP component to your flow and connecting it to your AI agent:

FlowHunt MCP flow

Click on the MCP component to open the configuration panel. In the system MCP configuration section, insert your MCP server details using this JSON format:

{
  "dune-analytics": {
    "transport": "streamable_http",
    "url": "https://yourmcpserver.example/pathtothemcp/url"
  }
}

Once configured, the AI agent is now able to use this MCP as a tool with access to all its functions and capabilities. Remember to change “dune-analytics” to the actual name and replace the URL with your own MCP server URL.


Overview

SectionAvailabilityDetails/Notes
OverviewDune Analytics MCP enables Dune data access for AI agents
List of PromptsNo prompt templates provided
List of ResourcesNo explicit resources listed
List of Toolsget_latest_result, run_query
Securing API KeysRequires DUNE_API_KEY in environment
Sampling Support (less important in evaluation)Not mentioned

Our opinion

The Dune Analytics MCP Server is straightforward and focused on providing access to Dune Analytics queries as tools, making it valuable in blockchain analytics workflows. However, it lacks prompt templates and explicit resources, and does not mention advanced MCP features like roots or sampling. It is well-documented for setup and usage. On a scale of 0–10, we would rate this MCP a 6/10, mainly due to its clear utility and good documentation but limited breadth in MCP feature support.

MCP Score

Has a LICENSE✅ (MIT)
Has at least one tool
Number of Forks6
Number of Stars20

Frequently asked questions

Integrate Dune Analytics with FlowHunt

Supercharge your AI workflows with real-time blockchain analytics from Dune. Connect, analyze, and automate crypto data in minutes.

Learn more

Dune Analytics
Dune Analytics

Dune Analytics

Integrate FlowHunt with Dune Analytics MCP Server to empower AI agents with live blockchain data. Instantly fetch or execute Dune queries, automate analytics, a...

4 min read
AI Dune Analytics +3
Grafana MCP Server Integration
Grafana MCP Server Integration

Grafana MCP Server Integration

Integrate and automate Grafana’s dashboards, datasources, and monitoring tools into AI-driven development workflows using FlowHunt's Grafana MCP Server. Enable ...

5 min read
Grafana DevOps +4
TheGraph MCP Server
TheGraph MCP Server

TheGraph MCP Server

TheGraph MCP Server connects AI agents with indexed blockchain data from The Graph protocol, enabling seamless access, querying, and analysis of on-chain inform...

5 min read
Blockchain AI +6