home / mcp / dune analytics mcp server
Provides an MCP server that bridges Dune Analytics data to AI agents, offering DEX metrics, EigenLayer AVS stats, operator metrics, and Solana balances.
Configuration
View docs{
"mcpServers": {
"ekailabs-dune-mcp-server": {
"command": "bun",
"args": [
"/ABSOLUTE/PATH/TO/dune-mcp-server/src/index.ts",
"stdio"
],
"env": {
"DUNE_API_KEY": "your_api_key_here"
}
}
}
}You run an MCP server that connects Dune Analytics data to AI agents, exposing DEX metrics, EigenLayer AVS and operator stats, and Solana token balances in a structured, easily consumable format. This enables you to query data sources through your preferred MCP client and integrate insights into your workflows.
You deploy a local MCP server and connect your MCP client to it using standard stdio configuration. The server exposes endpoints that your client can call to fetch DEX metrics, token liquidity data, Solana balances, and EigenLayer AVS statistics. Use the provided client commands to request metrics for specific chains, token pairs, wallet addresses, or AVS names. The responses come back as structured JSON for straightforward processing in your automation or analysis pipelines.
Prerequisites: install Node.js 16+ or Bun 1.0+ and prepare a Dune Analytics API key.
Step 1: Install Bun or Node dependencies.
bun installStep 2: Ensure you have a DUNE_API_KEY available in your environment or a .env file.
Step 3: Start the server in development mode for hot reload or in production mode for stable runs.
# Development mode with hot reload
bun dev
# Production mode
bun start
# Or build and run
bun build src/index.ts --outdir dist
bun dist/index.jsConfiguration for running the MCP server locally is provided for integration with Claude for Desktop.
{
"mcpServers": {
"dune": {
"command": "bun",
"args": [
"/ABSOLUTE/PATH/TO/dune-mcp-server/src/index.ts",
"stdio"
]
}
}
}Environment variable example to authorize with Dune Analytics requires setting your API key.
DUNE_API_KEY=your_api_key_hereUse the following conceptual commands with your MCP client to obtain data from the Dune MCP Server. Replace parameters with real values in your environment.
Keep your DUNE_API_KEY secure and do not share it publicly. Rotate keys periodically and monitor server access. When deploying to production, prefer a secured environment and consider restricting network access to trusted clients.
Retrieves essential metadata and statistical data for a given token pair on a specific chain.
Finds the token pair with the highest USD liquidity on a given chain.
Gets token balances for a specific wallet address on Solana.
Gets statistics for a specific AVS.
Gets statistics for all operators in a specific AVS.