npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dune-analytics-mcp

v1.0.1

Published

Model Context Protocol server for Dune Analytics - Execute queries, manage tables, and access blockchain analytics

Downloads

13

Readme

Dune Analytics MCP Server

A Model Context Protocol (MCP) server that provides seamless integration with Dune Analytics. Execute queries, manage tables, work with materialized views, and access blockchain analytics data directly through the MCP protocol.

Features

  • Query Execution: Execute Dune queries with parameters, get results in JSON or CSV format
  • Query Management: Create, update, archive, and manage Dune queries programmatically
  • Custom Tables: Create and manage custom data tables in your Dune namespace
  • Materialized Views: Set up and manage materialized views with automatic refresh schedules
  • Custom Endpoints: Access custom API endpoints for specialized data retrieval
  • Full API Coverage: Comprehensive support for the Dune Analytics API

Prerequisites

You need a Dune Analytics API key to use this MCP server.

Get your API key from dune.com/settings/api. You'll need to:

  1. Sign up or log in to Dune Analytics
  2. Navigate to Settings → API
  3. Create a new API key
  4. Copy the key for use in the installation steps below

Installation

Quick Start with Claude Code

claude mcp add --transport stdio dune-analytics-tools --env DUNE_API_KEY=your_api_key_here -- npx -y dune-analytics-mcp

Replace your_api_key_here with your actual Dune API key from dune.com/settings/api.

Using with Claude Desktop

Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "dune": {
      "command": "npx",
      "args": ["-y", "dune-analytics-mcp"],
      "env": {
        "DUNE_API_KEY": "your_api_key_here"
      }
    }
  }
}

Package Installation

npm install dune-analytics-mcp

Or install globally:

npm install -g dune-analytics-mcp

Available Tools

Query Execution

  • execute_query - Start a query execution (returns execution_id)
  • get_execution_status - Check status of a running query
  • get_execution_results - Get results of a completed query (JSON)
  • get_execution_results_csv - Get results in CSV format
  • cancel_execution - Cancel a running query
  • run_query - Execute query and wait for results (convenience method)
  • get_latest_results - Get cached results without using credits
  • get_latest_results_csv - Get cached results in CSV format

Query Management

  • create_query - Create a new Dune query
  • update_query - Update an existing query
  • read_query - Read query metadata and SQL
  • archive_query - Archive a query
  • unarchive_query - Restore an archived query
  • make_query_private - Make a query private
  • make_query_public - Make a query public

Table Management

  • create_table - Create a custom data table
  • insert_table - Insert data into a table (CSV/JSON/NDJSON)
  • delete_table - Delete a table

Materialized Views

  • list_materialized_views - List all materialized views
  • upsert_materialized_view - Create or update a materialized view
  • delete_materialized_view - Delete a materialized view
  • refresh_materialized_view - Manually trigger a refresh

Custom Endpoints

  • get_custom_results - Access custom API endpoints by username/slug

API Coverage

This MCP server provides complete coverage of the Dune Analytics API:

  • ✅ Query Execution API
  • ✅ Query Management API
  • ✅ Table Management API
  • ✅ Materialized Views API
  • ✅ Custom Endpoints API

Development

# Clone the repository
git clone https://github.com/hajnalben/dune-analytics-mcp.git
cd dune-mcp

# Install dependencies
npm install

# Build
npm run build

# Run locally
DUNE_API_KEY=your_key node dist/index.js

Requirements

  • Node.js >= 20.0.0 (LTS)
  • Dune Analytics API key

Links

License

MIT License - see LICENSE file for details

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Support

For issues and questions: