dune-data-aggregator-service
A service framework providing immediate access to decentralized exchange (DEX) performance statistics, EigenLayer staking/AVS metrics, and Solana ledger token ownership details via structured JSON interfaces. Facilitates rapid querying of on-chain analytical data to inform strategic planning and generate operational insights.
Author

ekailabs
Quick Info
Actions
Tags
Dune Data Aggregator Service (MCP Implementation)
This Model Context Protocol (MCP) server acts as a conduit, connecting AI agents to comprehensive datasets sourced from Dune Analytics, focusing on DEX activity, EigenLayer infrastructure statistics (Operators and AVS performance), and Solana token holdings.
Core Capabilities
- Tool Set:
fetch_pair_analytics: Retrieve core metadata and quantitative performance indicators for a specified trading pair on a selected network.identify_top_liquidity_pair: Determine which token pair possesses the maximum USD-denominated liquidity pool size across a specified chain.query_solana_wallet_holdings: Secure token balances associated with a given Solana public key.retrieve_avs_operational_stats: Fetch performance statistics specifically targeting an individual Actively Validated Service (AVS).analyze_avs_staking_distribution: Gather statistical data detailing the performance of all registered operators within a particular AVS framework.- Output Standard: All returned datasets adhere strictly to a machine-readable, structured JSON schema for deterministic processing.
Technical Prerequisites
- Runtime environment: Node.js version 16 or newer, or Bun 1.0 or newer.
- Authentication: A currently valid API credential from Dune Analytics (obtainable via Dune Analytics portal).
Deployment Procedure
-
Source Retrieval:
bash git clone https://github.com/ekailabs/dune-mcp-server.git cd dune-mcp-server -
Dependency Resolution: Using Bun:
bash bun installAlternatively, using npm:bash npm install -
Environment Configuration: Establish a
.envconfiguration file mirroring the structure of.env.example:DUNE_API_KEY=your_secure_api_keyOr set the key globally via shell export:bash export DUNE_API_KEY="your_secure_api_key"
Operational Guide
Executing the Backend Component
With Bun:
# Interactive development session with live reloading
bun dev
# Standard operational launch
bun start
# Build assets then execute
bun build src/index.ts --outdir dist
bun dist/index.js
With npm:
# Interactive development session with live reloading
npm run dev
# Standard operational launch
npm start
# Build assets then execute production instance
npm run build
npm run start:prod
Integration with Claude Desktop Client
To enable the AI client to invoke these tools, configure the following block in your local Claude desktop configuration file:
MacOS path: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows path: %APPDATA%/Claude/claude_desktop_config.json
{
"mcpServers": {
"dune": {
"command": "bun",
"args": [
"/ABSOLUTE/PATH/TO/dune-mcp-server/src/index.ts",
"stdio"
]
}
}
}
Tool Signatures and Descriptions
fetch_pair_analytics(chain, token_pair)- Purpose: Fetches detailed metadata and statistical measurements for a specified cryptocurrency trading pair.
- Inputs:
chain(string): The target blockchain environment.token_pair(string): The identified trading pair (e.g., 'ETH-USDC').
-
Output: A JSON object containing the relevant DEX metrics.
-
identify_top_liquidity_pair(chain) - Purpose: Locates and returns the metrics for the token pair exhibiting the greatest USD depth on the designated blockchain.
- Input:
chain(string): The network context. -
Output: A JSON object detailing the top liquidity pair's performance.
-
query_solana_wallet_holdings(wallet_address) - Purpose: Retrieves an inventory of token balances held by a specific address on the Solana network.
- Input:
wallet_address(string): The Solana public key to inspect. -
Output: A JSON array enumerating the discovered token holdings.
-
retrieve_avs_operational_stats(avs_name) - Purpose: Obtains the current operational statistics for an individual EigenLayer AVS.
- Input:
avs_name(string): The designated name of the AVS. -
Output: A JSON object containing AVS performance indicators.
-
analyze_avs_staking_distribution(avs_name) - Purpose: Gathers performance data across all registered staking operators associated with a specified AVS.
- Input:
avs_name(string): The targeted AVS identifier. - Output: A JSON object summarizing operator metrics.
Illustrative Query Examples in Claude Desktop
- "What are the stats for the 'ETH-USDC' pair on Ethereum?"
- "Pinpoint the pair with maximal liquidity on Arbitrum."
- "Display the stake delegation composition for EigenDA operators."
- "How many participants are currently securing the EigenDA AVS?"
Licensing Information
This software is distributed under the terms of the MIT License (refer to the LICENSE file for full details).
Evaluation Workflow
The integrated evaluation package employs an MCP client to exercise the index.ts file; thus, recompilation between test runs is unnecessary. Environment variables can be sourced by prefixing the execution command. Comprehensive documentation is available at https://www.mcpevals.io/docs.
OPENAI_API_KEY=your-key npx mcp-eval src/evals/evals.ts src/index.ts
Credits
- Thanks to Dune Analytics for providing the foundational data access API.
- Acknowledgment to the Model Context Protocol specification team.
