Spice MCP

Spice MCP

Enables querying and analyzing blockchain data from Dune Analytics with Polars-optimized workflows, including schema discovery, Sui package exploration, and query management through natural language.

Category
访问服务器

README

spice-mcp

PyPI version <a href="https://glama.ai/mcp/servers/@Evan-Kim2028/spice-mcp"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@Evan-Kim2028/spice-mcp/badge" alt="Spice MCP server" /> </a>

An MCP server that provides AI agents with direct access to Dune Analytics data. Execute queries, discover schemas and tables, and manage saved queries—all through a clean, type-safe interface optimized for AI workflows.

Discover High-Quality Tables: Leverages Dune Spellbook, Dune's official GitHub repository of curated dbt models, to surface verified, production-ready tables with rich metadata.

Why spice-mcp?

  • Agent-friendly: Designed for AI agents using the Model Context Protocol (MCP)
  • High-Quality Discovery: Leverages Dune Spellbook's GitHub repository to find verified, production-ready tables with rich metadata
  • Efficient: Polars-first pipeline keeps data lazy until needed, reducing memory usage
  • Discovery: Built-in tools to explore Dune's extensive blockchain datasets from both Dune API and Spellbook
  • Type-safe: Fully typed parameters and responses with FastMCP
  • Reproducible: Automatic query history logging and SQL artifact storage

Quick Start

  1. Install:

    uv pip install spice-mcp
    
  2. Set API key (choose one method):

    • Option A: Create a .env file in your project root:
      echo "DUNE_API_KEY=your-api-key-here" > .env
      
    • Option B: Export in your shell:
      export DUNE_API_KEY=your-api-key-here
      
  3. Use with Cursor IDE: Add to Cursor Settings → MCP Servers:

    {
      "name": "spice-mcp",
      "command": "spice-mcp",
      "env": {
        "DUNE_API_KEY": "your-dune-api-key-here"
      }
    }
    

Note: Query history logging is enabled by default. Logs are saved to logs/queries.jsonl (or ~/.spice_mcp/logs/queries.jsonl if not in a project directory). To customize paths, set SPICE_QUERY_HISTORY and SPICE_ARTIFACT_ROOT environment variables.

Core Tools

Tool Description Key Parameters
dune_query Execute queries by ID, URL, or raw SQL query (str), parameters (object), limit (int), offset (int), format (preview|raw|metadata|poll), refresh (bool), timeout_seconds (float)
dune_query_info Get metadata for a saved query query (str - ID or URL)
dune_discover Unified discovery across Dune API and Spellbook (returns verified tables only). Leverages Dune Spellbook GitHub repository for high-quality, curated tables. keyword (str|list), schema (str), limit (int), source (dune|spellbook|both), include_columns (bool)
dune_describe_table Get column metadata for a table schema (str), table (str)
dune_health_check Verify API key and configuration (no parameters)
dune_query_create Create a new saved query name (str), query_sql (str), description (str), tags (list), parameters (list)
dune_query_update Update an existing saved query query_id (int), name (str), query_sql (str), description (str), tags (list), parameters (list)
dune_query_fork Fork an existing saved query source_query_id (int), name (str)

Resources

  • spice:history/tail/{n} — View last N lines of query history (1-1000)
  • spice:artifact/{sha} — Retrieve stored SQL by SHA-256 hash

What is Dune?

Dune is a crypto data platform providing curated blockchain datasets and a public API. It aggregates on-chain data from Ethereum, Solana, Polygon, and other chains into queryable SQL tables. See the Dune Docs for more information.

What is Dune Spellbook?

Dune Spellbook is Dune's official GitHub repository containing thousands of curated dbt models. These models represent high-quality, production-ready tables that are:

  • Verified: All tables are verified to exist in Dune before being returned
  • Well-documented: Rich metadata including column descriptions and types
  • Maintained: Regularly updated by the Dune community and team
  • Production-ready: Used by analysts and dashboards across the ecosystem

spice-mcp automatically clones and parses the Spellbook repository to discover these high-quality tables, parsing dbt config blocks to resolve actual Dune table names and verifying their existence before returning them to you.

Installation

From PyPI (recommended):

uv pip install spice-mcp

From source:

git clone https://github.com/Evan-Kim2028/spice-mcp.git
cd spice-mcp
uv sync
uv pip install -e .

Requirements: Python 3.13+

Documentation

License

See LICENSE file for details.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选