databasesanalytics-data

Cryo

z80dev

by z80dev

Access advanced Ethereum blockchain data with Cryo. Efficient SQL queries & analytics using DuckDB. Powerful on-chain ex

Provides a powerful Ethereum blockchain data extraction and analysis interface using Cryo and DuckDB, enabling efficient SQL-based querying of on-chain datasets with advanced filtering capabilities.

github stars

90

0 commentsdiscussion

Both formats append explainx.ai attribution and the canonical URL for this MCP server listing.

SQL-based querying with DuckDBNo external APIs — direct blockchain accessFlexible block range filtering

best for

  • / Blockchain developers analyzing on-chain activity
  • / Data analysts researching Ethereum transactions
  • / DeFi researchers studying protocol usage
  • / Web3 applications needing historical blockchain data

capabilities

  • / Download Ethereum blockchain datasets (blocks, transactions, logs)
  • / Query blockchain data with SQL using DuckDB
  • / Export data to Parquet and CSV formats
  • / Filter data by block ranges or latest blocks
  • / Explore table schemas and column structures
  • / Run complex analytics queries on on-chain data

what it does

Extracts Ethereum blockchain data and lets you query it with SQL using DuckDB. Downloads on-chain datasets like blocks, transactions, and logs into queryable formats.

about

Cryo is a community-built MCP server published by z80dev that provides AI assistants with tools and capabilities via the Model Context Protocol. Access advanced Ethereum blockchain data with Cryo. Efficient SQL queries & analytics using DuckDB. Powerful on-chain ex It is categorized under databases, analytics data.

how to install

You can install Cryo in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

license

MIT

Cryo is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

readme

Cryo MCP 🧊

A Model Completion Protocol (MCP) server for the Cryo blockchain data extraction tool.

Cryo MCP allows you to access Cryo's powerful blockchain data extraction capabilities via an API server that implements the MCP protocol, making it easy to query blockchain data from any MCP-compatible client.

For LLM Users: SQL Query Workflow Guide

When using this MCP server to run SQL queries on blockchain data, follow this workflow:

  1. Download data with query_dataset:

    result = query_dataset(
        dataset="blocks",  # or "transactions", "logs", etc.
        blocks="15000000:15001000",  # or use blocks_from_latest=100
        output_format="parquet"  # important: use parquet for SQL
    )
    files = result.get("files", [])  # Get the returned file paths
    
  2. Explore schema with get_sql_table_schema:

    # Check what columns are available in the file
    schema = get_sql_table_schema(files[0])
    # Now you can see all columns, data types, and sample data
    
  3. Run SQL with query_sql:

    # Option 1: Simple table reference (DuckDB will match the table name to file)
    sql_result = query_sql(
        query="SELECT block_number, timestamp, gas_used FROM blocks",
        files=files  # Pass the files from step 1
    )
    
    # Option 2: Using read_parquet() with explicit file path
    sql_result = query_sql(
        query=f"SELECT block_number, timestamp, gas_used FROM read_parquet('{files[0]}')",
        files=files  # Pass the files from step 1
    )
    

Alternatively, use the combined approach with query_blockchain_sql:

# Option 1: Simple table reference
result = query_blockchain_sql(
    sql_query="SELECT * FROM blocks",
    dataset="blocks",
    blocks_from_latest=100
)

# Option 2: Using read_parquet()
result = query_blockchain_sql(
    sql_query="SELECT * FROM read_parquet('/path/to/file.parquet')",  # Path doesn't matter
    dataset="blocks",
    blocks_from_latest=100
)

For a complete working example, see examples/sql_workflow_example.py.

Features

  • Full Cryo Dataset Access: Query any Cryo dataset through an API server
  • MCP Integration: Works seamlessly with MCP clients
  • Flexible Query Options: Support for all major Cryo filtering and output options
  • Block Range Options: Query specific blocks, latest block, or relative ranges
  • Contract Filtering: Filter data by contract address
  • Latest Block Access: Easy access to the latest Ethereum block data
  • Multiple Output Formats: JSON, CSV, and Parquet support
  • Schema Information: Get detailed dataset schemas and sample data
  • SQL Queries: Run SQL queries directly against downloaded blockchain data

Installation (Optional)

This is not required if you will run the tool with uvx directly.

# install with UV (recommended)
uv tool install cryo-mcp

Requirements

  • Python 3.8+
  • uv
  • A working installation of Cryo
  • Access to an Ethereum RPC endpoint
  • DuckDB (for SQL query functionality)

Quick Start

Usage with Claude Code

  1. Run claude mcp add for an interactive prompt.
  2. Enter uvx as the command to run.
  3. Enter cryo-mcp --rpc-url <ETH_RPC_URL> [--data-dir <DATA_DIR>] as the args
  4. Alternatively, provide ETH_RPC_URL and CRYO_DATA_DIR as environment variables instead.

New instances of claude will now have access to cryo as configured to hit your RPC endpoint and store data in the specified directory.

Available Tools

Cryo MCP exposes the following MCP tools:

list_datasets()

Returns a list of all available Cryo datasets.

Example:

client.list_datasets()

query_dataset()

Query a Cryo dataset with various filtering options.

Parameters:

  • dataset (str): The name of the dataset to query (e.g., 'blocks', 'transactions', 'logs')
  • blocks (str, optional): Block range specification (e.g., '1000:1010')
  • start_block (int, optional): Start block number (alternative to blocks)
  • end_block (int, optional): End block number (alternative to blocks)
  • use_latest (bool, optional): If True, query the latest block
  • blocks_from_latest (int, optional): Number of blocks from latest to include
  • contract (str, optional): Contract address to filter by
  • output_format (str, optional): Output format ('json', 'csv', 'parquet')
  • include_columns (list, optional): Columns to include alongside defaults
  • exclude_columns (list, optional): Columns to exclude from defaults

Example:

# Get transactions from blocks 15M to 15.01M
client.query_dataset('transactions', blocks='15M:15.01M')

# Get logs for a specific contract from the latest 100 blocks
client.query_dataset('logs', blocks_from_latest=100, contract='0x1234...')

# Get just the latest block
client.query_dataset('blocks', use_latest=True)

lookup_dataset()

Get detailed information about a specific dataset, including schema and sample data.

Parameters:

  • name (str): The name of the dataset to look up
  • sample_start_block (int, optional): Start block for sample data
  • sample_end_block (int, optional): End block for sample data
  • use_latest_sample (bool, optional): Use latest block for sample
  • sample_blocks_from_latest (int, optional): Number of blocks from latest for sample

Example:

client.lookup_dataset('logs')

get_latest_ethereum_block()

Returns information about the latest Ethereum block.

Example:

client.get_latest_ethereum_block()

SQL Query Tools

Cryo MCP includes several tools for running SQL queries against blockchain data:

query_sql()

Run a SQL query against downloaded blockchain data.

Parameters:

  • query (str): SQL query to execute
  • files (list, optional): List of parquet file paths to query. If None, will use all files in the data directory.
  • include_schema (bool, optional): Whether to include schema information in the result

Example:

# Run against all available files
client.query_sql("SELECT * FROM read_parquet('/path/to/blocks.parquet') LIMIT 10")

# Run against specific files
client.query_sql(
    "SELECT * FROM read_parquet('/path/to/blocks.parquet') LIMIT 10",
    files=['/path/to/blocks.parquet']
)

query_blockchain_sql()

Query blockchain data using SQL, automatically downloading any required data.

Parameters:

  • sql_query (str): SQL query to execute
  • dataset (str, optional): The dataset to query (e.g., 'blocks', 'transactions')
  • blocks (str, optional): Block range specification
  • start_block (int, optional): Start block number
  • end_block (int, optional): End block number
  • use_latest (bool, optional): If True, query the latest block
  • blocks_from_latest (int, optional): Number of blocks before the latest to include
  • contract (str, optional): Contract address to filter by
  • force_refresh (bool, optional): Force download of new data even if it exists
  • include_schema (bool, optional): Include schema information in the result

Example:

# Automatically downloads blocks data if needed, then runs the SQL query
client.query_blockchain_sql(
    sql_query="SELECT block_number, gas_used, timestamp FROM blocks ORDER BY gas_used DESC LIMIT 10",
    dataset="blocks",
    blocks_from_latest=100
)

list_available_sql_tables()

List all available tables that can be queried with SQL.

Example:

client.list_available_sql_tables()

get_sql_table_schema()

Get the schema for a specific parquet file.

Parameters:

  • file_path (str): Path to the parquet file

Example:

client.get_sql_table_schema("/path/to/blocks.parquet")

get_sql_examples()

Get example SQL queries for different blockchain datasets.

Example:

client.get_sql_examples()

Configuration Options

When starting the Cryo MCP server, you can use these command-line options:

  • --rpc-url URL: Ethereum RPC URL (overrides ETH_RPC_URL environment variable)
  • --data-dir PATH: Directory to store downloaded data (overrides CRYO_DATA_DIR environment variable, defaults to ~/.cryo-mcp/data/)

Environment Variables

  • ETH_RPC_URL: Default Ethereum RPC URL to use when not specified via command line
  • CRYO_DATA_DIR: Default directory to store downloaded data when not specified via command line

Advanced Usage

SQL Queries Against Blockchain Data

Cryo MCP allows you to run powerful SQL queries against blockchain data, combining the flexibility of SQL with Cryo's data extraction capabilities:

Two-Step SQL Query Flow

You can split data extraction and querying into two separate steps:

# Step 1: Download data and get file paths
download_result = client.query_dataset(
    dataset="transactions",
    blocks_from_latest=1000,
    output_format="parquet"
)

# Step 2: Use the file paths to run SQL queries
file_paths = download_result.get("files", [])
client.query_sql(
    query=f"""
    SELECT 
        to_address as contract_address, 
        COUNT(*) as tx_count,
        SUM(gas_used) as total_gas,
        AVG(gas_used) as avg_gas
    FROM read_parquet('{file_paths[0]}')
    WHERE to_address IS NOT NULL
    GROUP BY to_address
    ORDER BY total_gas DESC
    LIMIT 20
    """,
    files=file_paths
)

Combined SQL Query Flow

For convenience, you can also use the combined function that handles both steps:

# Get top gas-consuming contracts
client.query_blockchain_sql(
    sql_query="""
    SELECT 
        to_address as contract_address, 
        COUNT(*) as tx_count,
        SUM(gas_used) as total_gas,
        AVG(gas_used) as avg_gas
    FROM read_parquet('/path/to/transactions.parquet')
    WHERE to_address IS NOT NULL
    GROUP BY to_address
    ORDER BY total_gas DESC
    LIMIT 20
    """,
    dataset="transactions",
    blocks_from_latest=1000
)

# Find blocks with the most transactions
client.que

---

FAQ

What is the Cryo MCP server?
Cryo is a Model Context Protocol (MCP) server profile on explainx.ai. MCP lets AI hosts (e.g. Claude Desktop, Cursor) call tools and resources through a standard interface; this page summarizes categories, install hints, and community ratings.
How do MCP servers relate to agent skills?
Skills are reusable instruction packages (often SKILL.md); MCP servers expose live capabilities. Teams frequently combine both—skills for workflows, MCP for APIs and data. See explainx.ai/skills and explainx.ai/mcp-servers for parallel directories.
How are reviews shown for Cryo?
This profile displays 66 aggregated ratings (sample rows for discoverability plus signed-in user reviews). Average score is about 4.6 out of 5—verify behavior in your own environment before production use.

Use Cases

Direct Database Queries from AI

Enable Claude to query your database directly using natural language

Example

Ask 'Show me top 10 customers by revenue this month' and get SQL results instantly

Eliminate manual SQL writing for ad-hoc queries, get insights 10x faster

Data Analysis & Reporting

Generate complex reports and analytics without leaving conversation

Example

Analyze sales trends, cohort retention, user behavior patterns conversationally

Democratize data access—non-technical team members can query databases

Schema Exploration

Understand database structure, relationships, and data models

Example

'Explain the user_orders table schema and its relationships'

Onboard engineers faster, explore unfamiliar databases efficiently

Data Validation & Quality Checks

Run data quality queries to catch anomalies and inconsistencies

Example

Find duplicate records, missing values, orphaned foreign keys automatically

Maintain data integrity with less manual SQL work

Implementation Guide

Prerequisites

  • Claude Desktop 0.7.0+ or Cursor with MCP support
  • Database credentials (read-only recommended for safety)
  • Network access from Claude client to database
  • Understanding of database security and access control

Time Estimate

15-30 minutes including configuration and testing

Installation Steps

  1. 1.Install MCP server: npm install -g @modelcontextprotocol/server-[name]
  2. 2.Configure database connection in Claude Desktop config (~/.claude/mcp.json)
  3. 3.Provide connection string: host, port, database, username, password
  4. 4.Restart Claude Desktop to load MCP server
  5. 5.Test connection: 'List all tables in database'
  6. 6.Run simple query: 'Show me 5 rows from users table'
  7. 7.Verify results and permissions are correct
  8. 8.Document query patterns for team use

Troubleshooting

  • Connection refused: Check database is running and network accessible
  • Authentication failed: Verify credentials, check user permissions
  • Claude can't see tables: Grant appropriate read permissions to database user
  • Slow queries: Add indexes, limit result set size, use read replicas
  • MCP server not loading: Check config syntax, restart Claude Desktop

Best Practices

✓ Do

  • +Use read-only database credentials to prevent accidental writes
  • +Connect to read replica, not production primary database
  • +Set query timeout limits to prevent long-running queries
  • +Document database schema and common queries for AI context
  • +Monitor query performance and optimize slow queries
  • +Use connection pooling for better performance
  • +Test with non-production data first

✗ Don't

  • Don't use production write credentials—risk of data corruption
  • Don't query production database during peak traffic hours
  • Don't expose sensitive PII without proper access controls
  • Don't skip query result validation—AI can misinterpret schema
  • Don't allow unlimited result set sizes—set LIMIT clauses
  • Don't share database credentials in plain text config files

💡 Pro Tips

  • Create database views for common queries to simplify AI access
  • Add schema comments/descriptions so AI understands column meanings
  • Use semantic table/column names ('customer_lifetime_value' not 'clv')
  • Set up query logging to audit what Claude is querying
  • Create saved query templates for recurring analysis
  • Combine with data visualization tools for better insights

Technical Details

Architecture

MCP server acts as bridge between Claude and database, translating natural language to SQL queries and returning results in structured format.

Protocols

  • Model Context Protocol (MCP)
  • Database-specific protocols (PostgreSQL, MySQL, MongoDB)

Compatibility

  • PostgreSQL
  • MySQL
  • SQLite
  • MongoDB
  • Redis

When to Use This

✓ Use When

Use for ad-hoc data queries, exploratory analysis, report generation, schema exploration, and democratizing data access. Best for read-heavy analytics workloads.

✗ Avoid When

Avoid for production write operations, mission-critical transactions, real-time OLTP workloads, or when database contains sensitive PII without proper access controls. Use read replicas, not primary.

Integration

  • Read replica connection for analytics queries
  • Database view layer to abstract complex joins
  • Query result caching for repeated questions
  • Audit logging of all AI-generated queries

Discussion

Product Hunt–style comments (not star reviews)
  • No comments yet — start the thread.

List & Promote Your MCP Server

Share your MCP server with the developer community

GET_STARTED →
MCP server reviews

Ratings

4.666 reviews
  • Dhruvi Jain· Dec 28, 2024

    Cryo is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.

  • Anaya Thomas· Dec 20, 2024

    Cryo is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.

  • Anaya Desai· Dec 4, 2024

    Cryo is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.

  • Noah Lopez· Dec 4, 2024

    We evaluated Cryo against two servers with overlapping tools; this profile had the clearer scope statement.

  • Advait Chen· Nov 23, 2024

    Cryo is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.

  • Kabir Abbas· Nov 23, 2024

    We wired Cryo into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.

  • Oshnikdeep· Nov 19, 2024

    Cryo is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.

  • Kwame Gupta· Nov 11, 2024

    Cryo reduced integration guesswork — categories and install configs on the listing matched the upstream repo.

  • Hana Choi· Nov 11, 2024

    Cryo is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.

  • Noor Tandon· Oct 14, 2024

    We evaluated Cryo against two servers with overlapping tools; this profile had the clearer scope statement.

showing 1-10 of 66

1 / 7