Dune AnalyticsSAFE
A mcp server that bridges Dune Analytics data to AI agents.
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
[](https://smithery.ai/server/@kukapay/dune-analytics-mcp)
A mcp server that bridges Dune Analytics data to AI agents.
Features
- Tools:
get_latest_result: Fetch the latest results of a Dune query by ID.run_query: Execute a Dune query by ID and retrieve results.- CSV Output: All results are returned as CSV-formatted strings for easy processing.
Prerequisites
- Python 3.10+
- A valid Dune Analytics API key (get one from Dune Analytics)
Installation
Installing via Smithery
To install Dune Analytics for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @kukapay/dune-analytics-mcp --client claude
Manual Installation
- Clone the Repository:
git clone https://github.com/kukapay/dune-analytics-mcp.git cd dune-analytics-mcp
- Set Up Environment Variables:
Create a .env file in the project root:
DUNE_API_KEY=your_api_key_here
Alternatively, set it as a system environment variable:
export DUNE_API_KEY="your_api_key_here"
Usage
Running the Server
- Development Mode:
mcp dev main.py
This starts the server with hot reloading for development.
- Install for Claude Desktop:
mcp install main.py --name "Dune Analytics"
Installs the server as a service for use with Claude Desktop.
Tool Usage
- `get_latest_result(query_id)`
- Description: Retrieves the latest results of a specified Dune query.
- Input:
query_id(int) - The ID of the Dune query. - Output: CSV-formatted string of the query results.
- Example:
get_latest_result(query_id=4853921)
- `run_query(query_id)`
- Description: Executes a Dune quer
bba0481477feOBSERVED · 2026-10-08Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add dune-analytics-mcp --env DUNE_API_KEY=${DUNE_API_KEY} -- uvx dune-analytics-mcp{
"mcpServers": {
"dune-analytics-mcp": {
"command": "uvx",
"args": [
"dune-analytics-mcp"
],
"env": {
"DUNE_API_KEY": "${DUNE_API_KEY}"
}
}
}
}Exposed tools (2)
1 read · 1 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
get_latest_result | read | Get the latest results for a specific query ID as a CSV string on dune analytics |
run_query | write | Run a query by ID and return results as a CSV string on dune analytics |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | PASS |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- declared (4 observation(s))
- Shell
- none-observed
- Dependencies
- pinned
- Secrets in source
- none-found
Findings (0)
No findings outside the package's declared scope.
Gates applied: no_behavioural_pass.
bba0481477fefull audit observations/trust-audit/mcp-server/kukapay__dune-analytics.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-08 | bba0481477fe | SAFE | B | 89 | first audit |
Questions
What is the Dune Analytics MCP server?
A mcp server that bridges Dune Analytics data to AI agents.
What tools does Dune Analytics expose?
2 in total: 1 read-only, 1 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Dune Analytics safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Dune Analytics need?
It reads DUNE_API_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How current is this page?
The grade is for one exact copy of the source (bba0481477fe), read on 2026-10-08. The repository is watched and re-audited when it changes.