Cryo MCP Server
크라이오 MCP 🧊
Cryo 블록체인 데이터 추출 도구를 위한 모델 완성 프로토콜(MCP) 서버입니다.
Cryo MCP를 사용하면 MCP 프로토콜을 구현하는 API 서버를 통해 Cryo의 강력한 블록체인 데이터 추출 기능에 액세스할 수 있으므로 모든 MCP 호환 클라이언트에서 블록체인 데이터를 쉽게 쿼리할 수 있습니다.
LLM 사용자를 위한 SQL 쿼리 워크플로 가이드
이 MCP 서버를 사용하여 블록체인 데이터에 대한 SQL 쿼리를 실행할 때 다음 워크플로를 따르세요.
query_dataset사용하여 데이터 다운로드 :지엑스피1
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 dataquery_sql로 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 )
또는 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
)전체 작동 예제를 보려면 examples/sql_workflow_example.py를 참조하세요.
Related MCP server: EVM MCP Server
특징
전체 Cryo 데이터 세트 액세스 : API 서버를 통해 모든 Cryo 데이터 세트 쿼리
MCP 통합 : MCP 클라이언트와 원활하게 작동합니다.
유연한 쿼리 옵션 : 모든 주요 Cryo 필터링 및 출력 옵션 지원
블록 범위 옵션 : 특정 블록, 최신 블록 또는 상대 범위 쿼리
계약 필터링 : 계약 주소로 데이터 필터링
최신 블록 접근 : 최신 이더리움 블록 데이터에 쉽게 접근
다양한 출력 형식 : JSON, CSV 및 Parquet 지원
스키마 정보 : 자세한 데이터 세트 스키마 및 샘플 데이터 가져오기
SQL 쿼리 : 다운로드한 블록체인 데이터에 대해 SQL 쿼리를 직접 실행합니다.
설치(선택 사항)
uvx 로 도구를 직접 실행하는 경우에는 필요하지 않습니다.
# install with UV (recommended)
uv tool install cryo-mcp요구 사항
파이썬 3.8 이상
자외선
Cryo 의 작동 설치
Ethereum RPC 엔드포인트에 액세스
DuckDB(SQL 쿼리 기능용)
빠른 시작
Claude Code와 함께 사용
대화형 프롬프트를 표시하려면
claude mcp add실행하세요.실행할 명령어로
uvx입력합니다.인수로
cryo-mcp --rpc-url <ETH_RPC_URL> [--data-dir <DATA_DIR>]입력하세요.또는
ETH_RPC_URL과CRYO_DATA_DIR환경 변수로 제공하세요.
이제 claude 의 새로운 인스턴스는 RPC 엔드포인트에 접근하고 지정된 디렉토리에 데이터를 저장하도록 구성된 Cryo에 액세스할 수 있습니다.
사용 가능한 도구
Cryo MCP는 다음과 같은 MCP 도구를 제공합니다.
list_datasets()
사용 가능한 모든 Cryo 데이터 세트 목록을 반환합니다.
예:
client.list_datasets()query_dataset()
다양한 필터링 옵션을 사용하여 Cryo 데이터 세트를 쿼리합니다.
매개변수:
dataset(str): 쿼리할 데이터 세트의 이름(예: '블록', '거래', '로그')blocks(str, 선택 사항): 블록 범위 지정(예: '1000:1010')start_block(int, 선택 사항): 시작 블록 번호(blocks의 대안)end_block(int, 선택 사항): 종료 블록 번호(blocks의 대안)use_latest(bool, 선택 사항): True인 경우 최신 블록을 쿼리합니다.blocks_from_latest(int, 선택 사항): 포함할 최신 블록 수contract(str, 선택 사항): 필터링할 계약 주소output_format(str, 선택 사항): 출력 형식('json', 'csv', 'parquet')include_columns(목록, 선택 사항): 기본값과 함께 포함할 열exclude_columns(목록, 선택 사항): 기본값에서 제외할 열
예:
# 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()
스키마와 샘플 데이터를 포함하여 특정 데이터 세트에 대한 자세한 정보를 얻으세요.
매개변수:
name(str): 조회할 데이터 세트의 이름sample_start_block(int, 선택 사항): 샘플 데이터의 시작 블록sample_end_block(int, 선택 사항): 샘플 데이터의 종료 블록use_latest_sample(bool, 선택 사항): 샘플에 최신 블록을 사용합니다.sample_blocks_from_latest(int, 선택 사항): 샘플의 최신 블록 수
예:
client.lookup_dataset('logs')get_latest_ethereum_block()
최신 Ethereum 블록에 대한 정보를 반환합니다.
예:
client.get_latest_ethereum_block()SQL 쿼리 도구
Cryo MCP에는 블록체인 데이터에 대한 SQL 쿼리를 실행하기 위한 여러 도구가 포함되어 있습니다.
query_sql()
다운로드한 블록체인 데이터에 대해 SQL 쿼리를 실행합니다.
매개변수:
query(str): 실행할 SQL 쿼리files(목록, 선택 사항): 쿼리할 Parquet 파일 경로 목록입니다. 없으면 데이터 디렉터리의 모든 파일을 사용합니다.include_schema(bool, 선택 사항): 결과에 스키마 정보를 포함할지 여부
예:
# 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()
SQL을 사용하여 블록체인 데이터를 쿼리하고, 필요한 데이터를 자동으로 다운로드합니다.
매개변수:
sql_query(str): 실행할 SQL 쿼리dataset(str, 선택 사항): 쿼리할 데이터 세트(예: '블록', '거래')blocks(str, 선택 사항): 블록 범위 지정start_block(int, 선택 사항): 시작 블록 번호end_block(int, 선택 사항): 종료 블록 번호use_latest(bool, 선택 사항): True인 경우 최신 블록을 쿼리합니다.blocks_from_latest(int, 선택 사항): 포함할 최신 블록 이전의 블록 수contract(str, 선택 사항): 필터링할 계약 주소force_refresh(bool, 선택 사항): 새 데이터가 존재하더라도 강제로 다운로드합니다.include_schema(bool, 선택 사항): 결과에 스키마 정보를 포함합니다.
예:
# 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()
SQL로 쿼리할 수 있는 모든 사용 가능한 테이블을 나열하세요.
예:
client.list_available_sql_tables()get_sql_table_schema()
특정 Parquet 파일에 대한 스키마를 가져옵니다.
매개변수:
file_path(str): Parquet 파일 경로
예:
client.get_sql_table_schema("/path/to/blocks.parquet")get_sql_examples()
다양한 블록체인 데이터 세트에 대한 SQL 쿼리 예를 가져옵니다.
예:
client.get_sql_examples()구성 옵션
Cryo MCP 서버를 시작할 때 다음 명령줄 옵션을 사용할 수 있습니다.
--rpc-url URL: Ethereum RPC URL(ETH_RPC_URL 환경 변수보다 우선함)--data-dir PATH: 다운로드한 데이터를 저장할 디렉토리(CRYO_DATA_DIR 환경 변수보다 우선하며, 기본값은 ~/.cryo-mcp/data/)
환경 변수
ETH_RPC_URL: 명령줄을 통해 지정되지 않은 경우 사용할 기본 Ethereum RPC URLCRYO_DATA_DIR: 명령줄을 통해 지정하지 않을 경우 다운로드된 데이터를 저장할 기본 디렉토리
고급 사용법
블록체인 데이터에 대한 SQL 쿼리
Cryo MCP를 사용하면 SQL의 유연성과 Cryo의 데이터 추출 기능을 결합하여 블록체인 데이터에 대해 강력한 SQL 쿼리를 실행할 수 있습니다.
2단계 SQL 쿼리 흐름
데이터 추출과 쿼리를 두 개의 별도 단계로 나눌 수 있습니다.
# 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
)결합된 SQL 쿼리 흐름
편의상 두 단계를 모두 처리하는 결합된 함수를 사용할 수도 있습니다.
# 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.query_blockchain_sql(
sql_query="""
SELECT
block_number,
COUNT(*) as tx_count
FROM read_parquet('/path/to/transactions.parquet')
GROUP BY block_number
ORDER BY tx_count DESC
LIMIT 10
""",
dataset="transactions",
blocks="15M:16M"
)
# Analyze event logs by topic
client.query_blockchain_sql(
sql_query="""
SELECT
topic0,
COUNT(*) as event_count
FROM read_parquet('/path/to/logs.parquet')
GROUP BY topic0
ORDER BY event_count DESC
LIMIT 20
""",
dataset="logs",
blocks_from_latest=100
)참고 : SQL 쿼리의 경우 DuckDB에서 최적의 성능을 보장하기 위해 데이터를 다운로드할 때 항상 output_format="parquet" 사용하세요. query_blockchain_sql 사용하는 경우, read_parquet() 함수를 사용하여 SQL에서 파일 경로를 직접 참조해야 합니다.
블록 범위를 사용한 쿼리
Cryo MCP는 Cryo의 블록 사양 구문의 전체 범위를 지원합니다.
# Using block numbers
client.query_dataset('transactions', blocks='15000000:15001000')
# Using K/M notation
client.query_dataset('logs', blocks='15M:15.01M')
# Using offsets from latest
client.query_dataset('blocks', blocks_from_latest=100)계약 필터링
계약 주소로 로그 및 기타 데이터를 필터링합니다.
# Get all logs for USDC contract
client.query_dataset('logs',
blocks='16M:16.1M',
contract='0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48')열 선택
필요한 열만 포함하세요:
# Get just block numbers and timestamps
client.query_dataset('blocks',
blocks='16M:16.1M',
include_columns=['number', 'timestamp'])개발
프로젝트 구조
cryo-mcp/
├── cryo_mcp/ # Main package directory
│ ├── __init__.py # Package initialization
│ ├── server.py # Main MCP server implementation
│ ├── sql.py # SQL query functionality
├── tests/ # Test directory
│ ├── test_*.py # Test files
├── pyproject.toml # Project configuration
├── README.md # Project documentation테스트 실행
uv run pytest
특허
MIT
크레딧
Available Tools
10 toolsget_latest_ethereum_blockB
Get information about the latest Ethereum block
Returns:
Information about the latest block including block number
Inputs: no named parameters.
get_sql_examplesA
Get example SQL queries for different blockchain datasets with DuckDB
SQL WORKFLOW TIPS:
1. First download data: result = query_dataset('dataset_name', blocks='...', output_format='parquet')
2. Inspect schema: schema = get_sql_table_schema(result['files'][0])
3. Run SQL: query_sql("SELECT * FROM read_parquet('/path/to/file.parquet')", files=result['files'])
OR use the combined approach:
- query_blockchain_sql(sql_query="SELECT * FROM read_parquet('...')", dataset='blocks', blocks='...')
Returns:
Dictionary of example queries categorized by dataset type and workflow patterns
Inputs: no named parameters.
get_sql_table_schemaA
Get the schema and sample data for a specific parquet file
WORKFLOW NOTE: Use this function to explore the structure of parquet files
before writing SQL queries against them. This will show you:
1. All available columns and their data types
2. Sample data from the file
3. Total row count
Usage example:
1. Get list of files: files = list_available_sql_tables()
2. For a specific file: schema = get_sql_table_schema(files[0]['path'])
3. Use columns in your SQL: query_sql("SELECT column1, column2 FROM read_parquet('/path/to/file.parquet')")
Args:
file_path: Path to the parquet file (from list_available_sql_tables or query_dataset)
Returns:
Table schema information including columns, data types, and sample data
Inputs: file_path (required).
get_transaction_by_hashC
Get detailed information about a transaction by its hash
Args:
tx_hash: The transaction hash to look up
Returns:
Detailed information about the transaction
Inputs: tx_hash (required).
list_available_sql_tablesA
List all available parquet files that can be queried with SQL
USAGE NOTES:
- This function lists parquet files that have already been downloaded
- Each file can be queried using read_parquet('/path/to/file.parquet') in your SQL
- For each file, this returns the file path, dataset type, and other metadata
- Use these file paths in your SQL queries with query_sql()
Returns:
List of available files and their metadata
Inputs: no named parameters.
list_datasetsB
Return a list of all available cryo datasets
Inputs: no named parameters.
lookup_datasetA
Look up a specific dataset and return detailed information about it. IMPORTANT: Always use this
function before querying a new dataset to understand its required parameters and schema.
The returned information includes:
1. Required parameters for the dataset (IMPORTANT for datasets like 'balances' that need an address)
2. Schema details showing available columns and data types
3. Example queries for the dataset
When the dataset requires specific parameters like 'address' (for 'balances'),
ALWAYS use the 'contract' parameter in query_dataset() to pass these values.
Example:
For 'balances' dataset, lookup_dataset('balances') will show it requires an 'address' parameter.
You should then query it using:
query_dataset('balances', blocks='1000:1010', contract='0x1234...')
Args:
name: The name of the dataset to look up
sample_start_block: Optional start block for sample data (integer)
sample_end_block: Optional end block for sample data (integer)
use_latest_sample: If True, use the latest block for sample data
sample_blocks_from_latest: Number of blocks before the latest to include in sample
Returns:
Detailed information about the dataset including schema and available fields
Inputs: name (required), sample_blocks_from_latest, sample_end_block, sample_start_block, +1 more.
query_blockchain_sqlA
Download blockchain data and run SQL query in a single step
CONVENIENCE FUNCTION: This combines query_dataset and query_sql into one call.
You can write SQL queries using either approach:
1. Simple table references: "SELECT * FROM blocks LIMIT 10"
2. Explicit read_parquet: "SELECT * FROM read_parquet('/path/to/file.parquet') LIMIT 10"
DATASET-SPECIFIC PARAMETERS:
For datasets that require specific address parameters (like 'balances', 'erc20_transfers', etc.),
ALWAYS use the 'contract' parameter to pass ANY Ethereum address. For example:
- For 'balances' dataset: Use contract parameter for the address you want balances for
query_blockchain_sql(
sql_query="SELECT * FROM balances",
dataset="balances",
blocks='1000:1010',
contract='0x123...' # Address you want balances for
)
Examples:
```
# Using simple table name
query_blockchain_sql(
sql_query="SELECT * FROM blocks LIMIT 10",
dataset="blocks",
blocks_from_latest=100
)
# Using read_parquet() (the path will be automatically replaced)
query_blockchain_sql(
sql_query="SELECT * FROM read_parquet('/any/path.parquet') LIMIT 10",
dataset="blocks",
blocks_from_latest=100
)
```
ALTERNATIVE WORKFLOW (more control):
If you need more control, you can separate the steps:
1. Download data: result = query_dataset('blocks', blocks_from_latest=100, output_format='parquet')
2. Inspect schema: schema = get_sql_table_schema(result['files'][0])
3. Run SQL query: query_sql("SELECT * FROM blocks", files=result['files'])
Args:
sql_query: SQL query to execute - using table names or read_parquet()
dataset: The specific dataset to query (e.g., 'transactions', 'logs', 'balances')
If None, will be extracted from the SQL query
blocks: Block range specification as a string (e.g., '1000:1010')
start_block: Start block number (alternative to blocks)
end_block: End block number (alternative to blocks)
use_latest: If True, query the latest block
blocks_from_latest: Number of blocks before the latest to include
contract: Contract address to filter by - IMPORTANT: Use this parameter for ALL address-based filtering
regardless of the parameter name in the native cryo command (address, contract, etc.)
force_refresh: Force download of new data even if it exists
include_schema: Include schema information in the result
Returns:
SQL query results and metadata
Inputs: sql_query (required), blocks, blocks_from_latest, contract, +6 more.
query_datasetA
Download blockchain data and return the file paths where the data is stored.
IMPORTANT WORKFLOW NOTE: When running SQL queries, use this function first to download
data, then use the returned file paths with query_sql() to execute SQL on those files.
Example workflow for SQL:
1. First download data: result = query_dataset('transactions', blocks='1000:1010', output_format='parquet')
2. Get file paths: files = result.get('files', [])
3. Run SQL query: query_sql("SELECT * FROM read_parquet('/path/to/file.parquet')", files=files)
DATASET-SPECIFIC PARAMETERS:
For datasets that require specific address parameters (like 'balances', 'erc20_transfers', etc.),
ALWAYS use the 'contract' parameter to pass ANY Ethereum address. For example:
- For 'balances' dataset: Use contract parameter for the address you want balances for
query_dataset('balances', blocks='1000:1010', contract='0x123...')
- For 'logs' or 'erc20_transfers': Use contract parameter for contract address
query_dataset('logs', blocks='1000:1010', contract='0x123...')
To check what parameters a dataset requires, always use lookup_dataset() first:
lookup_dataset('balances') # Will show required parameters
Args:
dataset: The name of the dataset to query (e.g., 'logs', 'transactions', 'balances')
blocks: Block range specification as a string (e.g., '1000:1010')
start_block: Start block number as integer (alternative to blocks)
end_block: End block number as integer (alternative to blocks)
use_latest: If True, query the latest block
blocks_from_latest: Number of blocks before the latest to include (e.g., 10 = latest-10 to latest)
contract: Contract address to filter by - IMPORTANT: Use this parameter for ALL address-based filtering
regardless of the parameter name in the native cryo command (address, contract, etc.)
output_format: Output format (json, csv, parquet) - use 'parquet' for SQL queries
include_columns: Columns to include alongside the defaults
exclude_columns: Columns to exclude from the defaults
Returns:
Dictionary containing file paths where the downloaded data is stored
Inputs: dataset (required), blocks, blocks_from_latest, contract, +6 more.
query_sqlA
Run a SQL query against downloaded blockchain data files
IMPORTANT WORKFLOW: This function should be used after calling query_dataset
to download data. Use the file paths returned by query_dataset as input to this function.
Workflow steps:
1. Download data: result = query_dataset('transactions', blocks='1000:1010', output_format='parquet')
2. Get file paths: files = result.get('files', [])
3. Execute SQL using either:
- Direct table references: query_sql("SELECT * FROM transactions", files=files)
- Or read_parquet(): query_sql("SELECT * FROM read_parquet('/path/to/file.parquet')", files=files)
To see the schema of a file, use get_sql_table_schema(file_path) before writing your query.
DuckDB supports both approaches:
1. Direct table references (simpler): "SELECT * FROM blocks"
2. read_parquet function (explicit): "SELECT * FROM read_parquet('/path/to/file.parquet')"
Args:
query: SQL query to execute - can use simple table names or read_parquet()
files: List of parquet file paths to query (typically from query_dataset results)
include_schema: Whether to include schema information in the result
Returns:
Query results and metadata
Inputs: query (required), files, include_schema.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 10 tools
Most tools have distinct purposes, but there is some overlap between query_blockchain_sql and the combination of query_dataset + query_sql. The descriptions clarify that query_blockchain_sql is a convenience function combining the two, which helps reduce confusion, but agents might still need to decide between the separate or combined approach.
All tool names follow a consistent verb_noun pattern with snake_case, such as get_latest_ethereum_block, list_available_sql_tables, and query_dataset. This consistency makes the tool set predictable and easy to navigate for agents.
With 10 tools, the server is well-scoped for its purpose of blockchain data querying and SQL analysis. Each tool serves a clear role, from data retrieval (e.g., get_transaction_by_hash) to dataset exploration (e.g., lookup_dataset) and SQL execution (e.g., query_sql), without feeling bloated or sparse.
The tool set provides comprehensive coverage for blockchain data workflows, including data fetching (get_latest_ethereum_block, get_transaction_by_hash), dataset discovery (list_datasets, lookup_dataset), data download (query_dataset), SQL querying (query_sql, query_blockchain_sql), and schema inspection (get_sql_table_schema, list_available_sql_tables). There are no obvious gaps, and the tools support full CRUD-like operations for the domain.
Maintenance
Related MCP Connectors
MCP server for OpenAI API (chat completions, image generation, embeddings) via AceDataCloud
Read-only MCP server for The Quiet Protocol's engines, benchmarks, proof, and business data.
MCP server connecting AI agents to non-custodial staking data across 130+ networks.
Token-free MCP server for structured RevoGrid Core, Pro, and Enterprise knowledge retrieval.
Related MCP Servers
- AlicenseDqualityDmaintenanceA Model Context Protocol server that gives LLMs the ability to interact with Ethereum networks, manage wallets, query blockchain data, and execute smart contract operations through a standardized interface.5414MIT
- AlicenseBqualityDmaintenanceA Model Context Protocol server that enables AI agents to interact with 30+ Ethereum-compatible blockchain networks, providing services like token transfers, contract interactions, and ENS resolution through a unified interface.2896 npm380MIT
- AlicenseBqualityDmaintenanceAn MCP server that provides access to Etherscan blockchain data APIs, allowing users to query Ethereum blockchain information through natural language.618MIT
- AlicenseNot gradedqualityBmaintenanceAn MCP server that bridges AI models with Ethereum blockchains via all JSON-RPC calls, enabling natural language queries for block numbers, balances, transactions, and smart contract data.21MIT