Skip to main content

MCP Server for AI Agents

Blocklens provides an MCP server that lets AI agents query on-chain analytics directly during conversations. Instead of copy-pasting API responses, your agent discovers available tools and calls them autonomously.

What is MCP?​

Model Context Protocol (MCP) is an open standard created by Anthropic that defines how AI applications connect to external data sources and tools. Think of it as a universal adapter — any MCP-compatible agent (Claude, Cursor, Windsurf, etc.) can connect to any MCP server without custom integration code.

With MCP, the agent doesn't just read data — it can discover what tools are available, understand their parameters, and call them with the right arguments. This makes interactions far more natural than crafting API calls manually.

Remote Access (No Install Required)​

The fastest way to connect is via our hosted MCP endpoint — no packages to install, no local setup.

Claude.ai​

  1. Go to Settings → Connectors
  2. Click + to add a new connector
  3. Paste the URL: https://mcp.blocklens.co
  4. Leave Client ID and Client Secret empty → click Add
  5. Authorize with your API key when prompted

Claude Desktop​

Add this to your claude_desktop_config.json:

{
"mcpServers": {
"blocklens": {
"command": "npx",
"args": ["mcp-remote", "https://mcp.blocklens.co"]
}
}
}

ChatGPT​

  1. Enable Developer Mode: Settings → General → Developer Mode
  2. Go to Settings → Developer → MCP Servers
  3. Click Add Server, enter name "Blocklens" and URL: https://mcp.blocklens.co
  4. Authorize with your API key when prompted

Cursor / Windsurf​

  1. Open Settings → MCP Servers
  2. Add a remote server with URL: https://mcp.blocklens.co
  3. Authorize with your API key when prompted

For Cursor, you can also add to .cursor/mcp.json:

{
"mcpServers": {
"blocklens": {
"url": "https://mcp.blocklens.co"
}
}
}

Any MCP HTTP Client​

POST to https://mcp.blocklens.co using the Streamable HTTP transport. The server supports the full MCP protocol — tool discovery, invocation, and streaming responses.

No install needed

The remote endpoint provides all 24 tools listed in Available Tools. It works in the browser, requires no local dependencies, and supports demo mode out of the box.

Authentication​

The MCP server supports two access modes:

Free Access (No API Key)​

Connect without any credentials to use every tool marked Free in Tier Requirements: prices, holder supply and valuation, age cohorts, coin days, ETF and treasury aggregates, blockchain and cycle data, the cost basis snapshot, liquidation maps and charts of free metrics. Up to 60 days of history, unless a tool states its own limits.

Full Access (With API Key)​

Unlock all metrics including Pro and Enterprise tiers. When you first connect, a Blocklens authorization page will appear where you enter your API key. This uses a secure OAuth flow — no Client ID or Secret needed.

Get your API key at blocklens.co/api-mcp.

Why Blocklens + MCP?​

Blocklens provides native MCP support for on-chain analytics, letting AI agents query metrics directly without custom integration.

What this means in practice:

  • Real-time on-chain queries — Ask your AI agent "Is Bitcoin overvalued right now?" and it will call get_holder_valuation to check MVRV, realized cap, and more
  • No manual API work — The agent discovers tools automatically and formats responses for you
  • Research at conversation speed — Chain multiple queries together: check price, then supply, then profitability, all in one conversation
  • Automated reporting — Have your agent generate weekly on-chain health reports with live data

Local Install (Alternative)​

See Remote Access for the simplest setup — no packages or local config needed.

Liquidation map tools in a local run

The npm package (blocklens-mcp-server 0.5.4 and later) contains all 24 tools. In a local run, get_liquidation_map and get_liquidation_heatmap are registered only when the environment variable LIQMAP_MCP_ENABLED=1 is set; the remote endpoint has them enabled.

Install​

npm install -g blocklens-mcp-server

Claude Desktop​

Add this to your Claude Desktop configuration file (claude_desktop_config.json):

{
"mcpServers": {
"blocklens": {
"command": "npx",
"args": ["-y", "blocklens-mcp-server"],
"env": {
"BLOCKLENS_API_KEY": "your_api_key_here"
}
}
}
}

Config file location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

After saving, restart Claude Desktop. You should see "blocklens" listed under available MCP tools.

Cursor / Windsurf​

Add to your MCP settings (.cursor/mcp.json or equivalent):

{
"mcpServers": {
"blocklens": {
"command": "npx",
"args": ["-y", "blocklens-mcp-server"],
"env": {
"BLOCKLENS_API_KEY": "your_api_key_here"
}
}
}
}

Demo Mode (No API Key)​

You can try the MCP server without an API key. In demo mode:

  • Works: list_metrics, search_metrics, get_metric, get_categories, and data endpoints with up to 60 days of history for basic (grade 0) metrics
  • Requires API key: Profit metrics (SOPR, realized P/L), extended history, enterprise-tier metrics

To run in demo mode, simply omit the BLOCKLENS_API_KEY from your config:

{
"mcpServers": {
"blocklens": {
"command": "npx",
"args": ["-y", "blocklens-mcp-server"]
}
}
}

Available Tools​

The MCP server exposes 27 tools that cover the full Blocklens analytics suite: metric discovery, market data, holder supply, valuation, profitability, age cohorts, UTXO history, cost basis distribution, coin days, blockchain stats, cycle performance and boundaries, ETF analytics, Digital Asset Treasuries, liquidation maps, and chart rendering. Built on a unified TypeScript codebase.

Tier Requirements​

TierTools
Freelist_metrics, search_metrics, get_metric, get_categories, get_prices, get_holder_supply, get_cohort_metrics, get_etf_data, get_blockchain, get_cycle_performance, get_cycle_boundaries, get_dat_registry, search_dat_entities, get_cbd_snapshot
Free, some fields Proget_holder_valuation (LTH/STH unrealized P/L), get_coindays (dormancy, dormancy flow, transfer volume), get_dat_aggregate (private company BTC), get_latest_metrics (Pro fields of each category)
Free, full history Proget_liquidation_map, get_liquidation_heatmap — the current map and the last 30 days on Free, any date on Pro; get_gex_daily, get_gex_profile, get_gex_heatmap — the latest profile and the last 30 days (daily) on Free, any snapshot, strikes and 6h / 1h on Pro
Proget_holder_profit (without Pro only realized_pl and supply_in_profit_pct), get_dat_entity
Enterpriseget_utxo_history
Depends on metricrender_chart — free metrics render without a key; Pro/Enterprise metrics require the corresponding tier

Inside a tool, fields above your plan are omitted from the rows (for example, the Pro fields of get_holder_profit on a Free key), and history is limited to your plan's window. A tool whose data is above your plan returns a readable Access denied (403) message with the upgrade link instead of failing.


list_metrics​

Free

List all available on-chain metrics with descriptions, categories, and tier requirements.

Parameters: None

Use case: Start here to discover what data is available. Returns the full catalog with metric IDs you'll need for other tools.

Example response (abbreviated):

[
{
"id": "price",
"name": "BTC Price",
"category": "price",
"unit": "USD",
"endpoint": "prices",
"grade": 0
},
{
"id": "lth_supply",
"name": "LTH Supply",
"category": "supply",
"unit": "BTC",
"endpoint": "holder/supply",
"grade": 0
},
{
"id": "funding_binance",
"name": "Binance Funding Rate",
"category": "exchanges",
"endpoint": "funding/exchange",
"grade": 1,
"params": { "exchange": "binance" },
"params_schema": {
"exchange": {
"type": "string",
"required": true,
"description": "Exchange identifier",
"values_endpoint": "/v1/funding/exchanges"
}
}
}
]
Parameterized metrics

Some metrics require additional parameters (e.g., exchange, ticker, id). Check the params field for default values and params_schema for parameter descriptions and available values endpoints.


get_prices​

Free

Get daily OHLC prices (open/high/low/close in USD), market cap, and 24h trading volume.

ParameterTypeDefaultDescription
symbolstring"BTC"Cryptocurrency symbol
daysinteger30Number of daily data points (1–10,000)
start_datestring—Start date (YYYY-MM-DD). Overrides days.
end_datestring—End date (YYYY-MM-DD). Defaults to today.

Use case: Price context for any analysis. Pair with valuation metrics to assess whether current price is justified by on-chain fundamentals.


get_holder_supply​

Free

Get the LTH/STH supply breakdown: Long-Term Holder supply (held >155 days), Short-Term Holder supply (held <155 days), and total circulating supply. All values in BTC.

ParameterTypeDefaultDescription
daysinteger30Number of daily data points (1–10,000)
start_datestring—Start date (YYYY-MM-DD)
end_datestring—End date (YYYY-MM-DD)

Use case: Track accumulation and distribution. Rising LTH supply = conviction / accumulation. Rising STH supply = new money entering / potential distribution ahead.


get_holder_valuation​

Free

Get Bitcoin valuation metrics: Realized Cap, Realized Price, LTH/STH Realized Cap and Price, MVRV ratio, and Unrealized P/L. LTH/STH Unrealized P/L require Pro.

ParameterTypeDefaultDescription
daysinteger30Number of daily data points (1–10,000)
start_datestring—Start date (YYYY-MM-DD)
end_datestring—End date (YYYY-MM-DD)

Use case: Core valuation framework. MVRV > 3.5 historically signals overheating; MVRV < 1 signals undervaluation. Compare LTH vs STH realized prices to gauge market structure.


get_holder_profit​

Pro

Get Bitcoin profitability metrics: NUPL, Realized P/L (total and LTH/STH, USD), SOPR (Spent Output Profit Ratio, total and LTH/STH) and supply in profit. Requires Pro tier API key — without it only Realized P/L and supply in profit % are returned.

ParameterTypeDefaultDescription
daysinteger30Number of daily data points (1–10,000)
start_datestring—Start date (YYYY-MM-DD)
end_datestring—End date (YYYY-MM-DD)

Use case: Understand whether coins are moving at profit or loss. SOPR > 1 means holders are selling at profit; SOPR < 1 means selling at a loss (often signals capitulation or bottom formation).


get_cohort_metrics​

Free

Get age cohort metrics: supply (BTC), realized cap (USD), and realized price (USD) for a specific UTXO age bracket. Used for HODL Waves analysis.

ParameterTypeDefaultDescription
cohortenumrequiredAge bracket (see below)
daysinteger30Number of daily data points (1–10,000)
start_datestring—Start date (YYYY-MM-DD)
end_datestring—End date (YYYY-MM-DD)

Valid cohorts: 24h, 1d_1w, 1w_1m, 1m_3m, 3m_6m, 6m_12m, 1y_2y, 2y_3y, 3y_5y, 5y_7y, 7y_10y, 10y_plus

Use case: Deep-dive into specific age groups. For example, check if the 3m_6m cohort is growing (new accumulation maturing) or if 10y_plus coins are finally moving (long-dormant supply waking up).


get_utxo_history​

Enterprise

Get UTXO set breakdown by age cohort. Shows token amounts (BTC) and USD values for each cohort on a given date. Requires an Enterprise API key: the per-cohort values contain the full cost basis distribution. Other tiers get an access-denied message with an upgrade link.

ParameterTypeDefaultDescription
date_processedstring—Specific snapshot date (YYYY-MM-DD)
cohort_startstring—Start of cohort date range
cohort_endstring—End of cohort date range
daysinteger1000Number of records (1–50,000)

Use case: Analyze coin dormancy and accumulation patterns. When dormant supply moves, it often precedes significant price action. For age-band supply and realized price on any tier use get_cohort_metrics.


get_cbd_snapshot​

Free

Get the Cost Basis Distribution on one date: how the unspent Bitcoin supply is spread across price levels, where the level of a coin is its cost basis (the BTC price on the day it last moved on-chain). Computed exactly from the UTXO set for the date with the bins you choose. Returns the price of the date, total supply, supply in profit, in loss and at breakeven (BTC and %), the bin holding the price, the largest level below and above the price, and the top levels.

ParameterTypeDefaultDescription
datestringlatestDate (YYYY-MM-DD)
binsinteger50Number of price bins (10–200)
scalestringloglog (geometric bins) or linear
price_minnumber—Lower bound of the bin range, USD (0.0001–1e9; 0 allowed for linear)
price_maxnumber—Upper bound of the bin range, USD (0.0001–1e9). With one bound only, the other side is taken from the data
topinteger5Number of largest levels (1–20)
include_binsbooleanfalseAlso return the non-empty bins with % and cumulative %

The same data is available from the REST API: GET /v1/cbd/snapshot (see the Endpoint Reference), with up to 1,000 bins on Pro.

Limits on Free and demo access: top up to 10, at most 10 calls per minute and 30 different past dates per hour (200 per day); the latest date and dates already requested in the window are not counted. Pro and above have no date quota.

Use case: Find on-chain support and resistance levels and the exact share of supply in profit on any date, e.g. before and after a major market event. For the history over time use render_chart with heatmap_id: "cost-basis-distribution".


get_latest_metrics​

Free

Get the most recent snapshot across all metric categories (price, supply, valuation, profit) in a single call. Fields above your plan (for example, most profit fields on Free) are omitted.

Parameters: None

Use case: Quick market overview. One call gives you the current state of all key metrics — ideal for daily check-ins or starting a deeper analysis.


search_metrics​

Free

Search available metrics by keyword across names, descriptions, and IDs.

ParameterTypeDefaultDescription
querystringrequiredSearch term (e.g. "realized price", "MVRV", "supply")

Use case: Find the right metric when you know roughly what you're looking for but not the exact ID. Returns matching metrics with their endpoints and tier requirements.


get_metric​

Free

Get the full definition of a single metric by its ID, including name, description, category, endpoint, unit, and access tier.

ParameterTypeDefaultDescription
metric_idstringrequiredMetric identifier (e.g. "lth_supply", "price", "sth_sopr")

Use case: Look up exactly what a metric measures, how it's calculated, and what tier is required before fetching the data. The response includes params and params_schema when the metric requires additional parameters (e.g., exchange, ticker, id).


get_categories​

Free

List all metric categories with counts and the metric IDs in each category.

Parameters: None

Use case: Get a structured overview of available data organized by theme (price, supply, valuation, profit).


get_coindays​

Free

Get Coin Days metrics: Coin Days Destroyed (CDD), binary and supply-adjusted CDD, liveliness, vaultedness, dormancy, dormancy flow, transferred price, and transfer volume. These metrics measure how long coins have been held before being spent, revealing conviction and activity patterns. Dormancy, dormancy flow, and transfer volume require Pro.

ParameterTypeDefaultDescription
daysinteger30Number of daily data points (1–10,000)
start_datestring—Start date (YYYY-MM-DD)
end_datestring—End date (YYYY-MM-DD)

Use case: Detect when long-dormant coins start moving. High CDD spikes often precede major price moves. Rising liveliness = old coins being spent; rising vaultedness = coins being locked away for long-term holding.


get_etf_data​

Free

Get Bitcoin ETF aggregate data: total holdings (BTC), AUM (USD), daily net flows, cumulative flows, ETF dominance, and ETF realized price.

ParameterTypeDefaultDescription
daysinteger30Number of daily data points (1–10,000)
start_datestring—Start date (YYYY-MM-DD)
end_datestring—End date (YYYY-MM-DD)

Use case: Track institutional demand through ETF flows. Rising AUM and positive net flows signal institutional accumulation. Compare ETF realized price to spot price to gauge whether ETF holders are in profit.


get_blockchain​

Free

Get blockchain metrics: block height or blocks mined per day.

ParameterTypeDefaultDescription
metricenumrequired"block_height" or "blocks_mined"
daysinteger30Number of daily data points (1–10,000)
start_datestring—Start date (YYYY-MM-DD)
end_datestring—End date (YYYY-MM-DD)

Use case: Monitor network health and mining activity. Blocks mined per day deviating from ~144 can indicate hashrate changes or difficulty adjustments.


get_dat_aggregate​

Free

Get Digital Asset Treasuries aggregate data: total BTC held by institutions and governments, company count, net flows, public/private/government breakdown. BTC held by private companies requires Pro.

ParameterTypeDefaultDescription
daysinteger30Number of daily data points (1–10,000)
start_datestring—Start date (YYYY-MM-DD)
end_datestring—End date (YYYY-MM-DD)

Use case: Track institutional Bitcoin adoption. Rising total BTC across corporate and sovereign treasuries signals growing institutional conviction.

For realized price (cost basis per BTC) by entity type (government, public, private), use render_chart with metrics dat_rp_total, dat_rp_public, dat_rp_government, dat_rp_private, or template dat-realized-price-by-type.


get_dat_registry​

Free

List the largest Digital Asset Treasury entities (corporations, funds, governments) by holdings of one asset, with id, name, ticker, entity type, country, coin_id / asset, amount (in units of that asset), USD value and last update date. Holdings of different assets are never mixed in one list.

ParameterTypeDefaultDescription
limitinteger20Number of entities, sorted by holdings (1–100)
coinstringbitcoinTreasury asset: coin id or symbol (ethereum/ETH, solana/SOL, hyperliquid/HYPE, tron/TRX, …), or all for one row per entity and asset, sorted by USD value

Use case: Discover which entities hold Bitcoin — or Ether, Solana and other assets with coin. Use the returned id field (and coin_id) to query per-entity data with get_dat_entity.


search_dat_entities​

Free

Search Digital Asset Treasury entities by name, ticker, or keyword. Returns up to 10 rows — one per matching entity and treasury asset it holds — with IDs, coin_id / asset, amount and USD value.

ParameterTypeDefaultDescription
querystringrequiredSearch term (e.g. "strategy", "MSTR", "tesla", "government")

Use case: Find the ID of a specific entity for get_dat_entity or for render_chart with params: { entity: "…" }.


get_dat_entity​

Pro

Get per-entity Digital Asset Treasury data for one asset (BTC by default): holdings, AUM, net flow, cumulative flow, market share, realized price (average cost per unit, when known), and total cost basis. Amount-type fields are in units of the requested asset.

ParameterTypeDefaultDescription
idinteger—Entity/company ID (from get_dat_registry or search_dat_entities)
entitystring—Entity name or ticker (e.g. "strategy", "MSTR"), instead of id
coinstringbitcoinTreasury asset: coin id or symbol (e.g. "ethereum" / "ETH"). If the entity holds no BTC, the response message lists the assets it holds
daysinteger90Number of daily data points (1–10,000)
start_datestring—Start date (YYYY-MM-DD)
end_datestring—End date (YYYY-MM-DD)

Pass either id or entity. For long ranges, chart the entity with render_chart instead of fetching raw rows.

Use case: Analyze a specific entity's Bitcoin strategy — track holdings growth, compare realized price to market price for unrealized P/L, monitor accumulation patterns.

Example: get_dat_entity({ id: 1 }) or get_dat_entity({ entity: "MSTR" }) returns the holdings, flows, and realized price of Strategy (formerly MicroStrategy). get_dat_entity({ entity: "BMNR", coin: "ETH" }) returns the Ether treasury of BitMine Immersion.


get_cycle_performance​

Free

Get Bitcoin cycle performance: price progression indexed from cycle reference points (cycle lows, all-time highs, halvings). Without type returns the aggregate cycle comparison; with type returns the individual cycle tracks.

ParameterTypeDefaultDescription
typeenum—"low", "ath" or "halving". Omit for the aggregate comparison
daysinteger1500Number of daily data points (1–10,000)
start_datestring—Start date (YYYY-MM-DD)
end_datestring—End date (YYYY-MM-DD)

Use case: Compare the current cycle with previous ones as data. To draw the comparison, use render_chart with the cycle_ath_*, cycle_low_* or cycle_halving_* metrics and x_axis: "day_offset".


get_cycle_boundaries​

Free

Get Bitcoin market cycle summaries: start, peak, and bottom dates and prices, maximum drawdown %, days to bottom, days to recovery, and total duration. Cycles are defined by all-time highs, halvings, or cycle lows; the current cycle also has the current price and drawdown from its peak.

ParameterTypeDefaultDescription
typeenum—"ath", "halving" or "low". Omit to get all three types

Use case: Identify cycle phases for comparative analysis. Use with render_chart and x_axis: "day_offset" to overlay cycle performance charts where all cycles start at Day 0.

Example response (type: "halving", abbreviated):

{
"halving_cycles": [
{
"cycle": 2,
"label": "2016-2020",
"start_date": "2016-07-09",
"start_price": 650.96,
"end_date": "2020-05-10",
"peak_price": 19497.4,
"peak_date": "2017-12-16",
"bottom_price": 3236.76,
"bottom_date": "2018-12-15",
"max_drawdown_pct": -83.4,
"days_to_bottom": 889,
"total_days": 1401,
"is_current": false
}
]
}

get_liquidation_map​

Free

Get the liquidation map of a perpetual futures market: at which prices long and short positions would be liquidated. Sources: Hyperliquid (actual open positions) and Binance USDⓈ-M futures (modelled positions); coins BTC, ETH, SOL, and HYPE. Returns a compact summary of one daily snapshot over the full price range (every liquidation level, however far from the price): mark price, the largest liquidation clusters per side (price, USD, distance from mark, cumulative USD; far clusters separately), cumulative liquidations for moves from ±1% up to the farthest level, and totals (in range, whole map, far levels). Longs are liquidated if the price falls to a level, shorts if it rises.

ParameterTypeDefaultDescription
sourceenumrequired"hyperliquid" or "binance_model"
coinenum"BTC""BTC", "ETH", "SOL" or "HYPE"
variantenum"all""all" or "ex_top20" — without the 20 largest long and 20 largest short positions (Hyperliquid only)
datestringcurrentSnapshot day (YYYY-MM-DD, UTC)
range_pctnumberfull mapOptional window ± % of mark for clusters and in-range totals (1–100,000); the rest is reported as outside_range
top_ninteger5Clusters per side (1–10)
include_levelsbooleanfalseAlso return the level array (full map or range_pct window; far buckets flagged far)
max_levelsinteger60Maximum level rows with include_levels (5–200)

Access: the current map on every tier; dates within the last 30 days on Free, any date on Pro. See the Liquidation Map API for the data and the methodology.

Use case: Find the price levels where a move would trigger a liquidation cascade, and compare the long and short side.


get_liquidation_heatmap​

Free

Get the history of liquidation maps over a period (day × price), coarsened to fit the conversation. Daily maps are grouped into periods (day, week, or month) and averaged; price is grouped into bands by % distance from each day's mark or into absolute price bins. Each period has the mark price, average long and short totals, the average total of levels outside the window (outside_window — nothing is dropped), and the largest bands; gaps between days are listed.

ParameterTypeDefaultDescription
sourceenumrequired"hyperliquid" or "binance_model"
coinenum"BTC""BTC", "ETH", "SOL" or "HYPE"
variantenum"all""all" or "ex_top20" (Hyperliquid only)
from_datestringtoday − daysStart day (YYYY-MM-DD)
to_datestringlatestEnd day (YYYY-MM-DD)
daysinteger90Look-back when from_date is omitted (1–3,650)
periodenum"auto""auto", "day", "week" or "month"
max_rowsinteger30Maximum periods; the latest are kept (1–60)
band_modeenum"pct""pct" — bands by % distance from mark; "price" — absolute price bins
window_pctnumber100± % around the price split into bands (5–1,000); levels beyond go to outside_window
band_pctnumber5Band width in % of mark, pct mode (0.25–100; at most 60 bands)
n_binsinteger20Number of price bins, price mode (2–60)
top_bandsinteger3Largest bands per side per period (1–5)
include_matrixbooleanfalseAlso return the period × band matrix (up to 1,500 cells)

Access: the last 30 days on Free (earlier days are cut off), the full history on Pro (Hyperliquid since 2025-07-29, Binance since 2023).

Use case: See how liquidation clusters built up and cleared over weeks or months, for example around a major price move.


render_chart​

Depends on metric

Render a Bitcoin on-chain analytics chart as a PNG image or SVG vector graphic. Returns the image inline in the conversation. Supports single metrics, multiple metrics, templates, and full customization.

ParameterTypeDefaultDescription
metricstring—Single metric ID (e.g., "price", "lth_supply")
metricsarray—Multiple metrics as strings or config objects
templatestring—Chart template (e.g., "mvrv_ratio", "holder_supply")
daysinteger365Days of history (7–10,000)
start_datestring—Start date (YYYY-MM-DD)
end_datestring—End date (YYYY-MM-DD)
warmup_daysinteger—Extra days fetched before the displayed range so rolling-window formulas (sma, std, shift) have values from the first day (0–730)
overlay"price"—Add BTC price overlay
theme"light" / "dark""light"Color theme
widthinteger1200Image width in pixels (600–2,400)
heightinteger600Image height in pixels (300–1,200)
titlestringautoChart title
style"line" / "area" / "bar"autoDefault chart style
scale"linear" / "log""linear"Y-axis scale
y_axesarray—Custom Y-axes with vertical zones. Each object: { id, side, scale?, format?, range?, domain_min?, domain_max?, no_padding? }. See Snapshot API — Custom Y-Axes.
x_axis"date" / "day_offset""date"X-axis mode. Use "day_offset" for cycle performance overlays. Requires all metrics to be from the same cycle_ath_*, cycle_low_*, or cycle_halving_* family.
heatmap_id"cost-basis-distribution"—Render a heatmap instead of a line chart. Mutually exclusive with metric / metrics / template. See Heatmap Rendering.
heatmap_period"1w" / "1m" / "3m" / "6m" / "1y" / "3y" / "5y" / "10y" / "all""1y"Time window for heatmap binning.
heatmap_color_scale"soft" / "viridis" / "plasma""soft"Color palette for heatmap cells.
heatmap_y_scale"linear" / "log""log"Y-axis scale for heatmap price bins.
paramsobject—Per-call parameters for parameterized metrics (e.g. { exchange: "binance" }, { ticker: "IBIT" }). Required when the metric's params_schema declares a required field.
reference_linesarray—Horizontal lines: { y?, y_formula?, axis_id?, stroke?, dash?, label? }. See Reference Lines & Areas.
reference_areasarray—Shaded zones between two values: { y1?, y2?, y1_formula?, y2_formula?, axis_id?, fill?, fill_opacity?, label? }
formulasarray—Computed series from the metrics by position (m1, m2, …): { expression, label, color?, style?, y_axis_id?, … }. Supports + - * /, sma, std, shift, max, min. See Formulas.
format"png" / "svg" / "json""png"Output format. "png" returns a raster image, "svg" returns a scalable vector graphic (ideal for embedding in slide decks or print), "json" returns chart metadata only (no render).

Use case: Visualize any metric directly in the conversation. The agent returns a chart image that appears inline — no need to open a browser or dashboard.

Example calls:

render_chart({ metric: "price" })
render_chart({ template: "mvrv_ratio", days: 730 })
render_chart({ metrics: ["lth_supply", "sth_supply"], style: "area", days: 730 })
render_chart({ metric: "funding_binance" })
render_chart({ metrics: [{ id: "funding_binance", params: { exchange: "binance" } }] })
render_chart({ metrics: ["cycle_ath_1","cycle_ath_2","cycle_ath_3","cycle_ath_4","cycle_ath_5"], x_axis: "day_offset", scale: "log" })
render_chart({ heatmap_id: "cost-basis-distribution", heatmap_period: "1y", theme: "dark" })
render_chart({ template: "mvrv_ratio", format: "svg" }) // vector output

Some metrics require parameters (like exchange or ticker). When using the metrics array with config objects, include params from the metric definition.

See Snapshot API for full documentation on chart rendering options.


Options GEX tools​

Three tools cover the options GEX and the Dealer Hedge Flow of Deribit BTC options: how much dealers would buy or sell to stay delta-hedged if the price moved to each level, and whether that flow amplifies or dampens the move. They call the Dealer Hedge Flow API with your key and reduce its large responses (a profile has about a hundred price levels, a heatmap up to millions of cells) to a compact summary for the agent. The method: Dealer Hedge Flow Methodology.

TierWhat the tools return
Freethe latest profile (without strikes), the daily series and the daily heatmap of the last 30 days
Pro, Enterprisefull history since 2026-03-16, profiles of any snapshot, strikes, 6h / 1h heatmap

Every result has an access block and notes: when the tier cut the history off, the notes say so and link to the upgrade. Signs in all three tools: hedge_flow_usd > 0 — dealers buy, < 0 — dealers sell; effect "amplify" — the flow pushes the move further, "dampen" — it leans against the move.


get_gex_daily​

Free

Daily series of dealer positioning, one row per day (the 00:00 UTC snapshot), oldest first: BTC price, net GEX (Black-Scholes, USD per 1% move), the zero gamma level, hedge flow if the price moved ±5% / ±10%, the strikes with the largest positive / most negative dealer GEX, put/call ratios and max pain. These are the columns behind the catalog metrics options_net_gex, options_zero_gamma, options_hedge_flow_up5 / dn5 / up10 / dn10, options_gamma_support and options_gamma_resist.

ParameterTypeDefaultDescription
daysinteger30Number of most recent days (1–3,650)
from_datestring—Start day (YYYY-MM-DD, UTC)
to_datestring—End day, inclusive (YYYY-MM-DD, UTC)

Free: the last 30 days; Pro: full history since 2026-03-16.

Use case: Track the gamma regime over weeks: when net GEX turns negative, or the price approaches the zero gamma level, dealer hedging stops calming the market.


get_gex_profile​

Free

The Dealer Hedge Flow profile of one hourly snapshot (the latest by default). Returns the spot price, net GEX, the gamma regime, the zero gamma level and its distance, all sign changes of GEX, the exact flow at ±5% / ±10%, the flow for ±1…30% moves with amplify / dampen, the largest amplify and dampen levels, legacy values (Deribit gamma), the largest strikes by net GEX (Pro) and the access block.

ParameterTypeDefaultDescription
datestring—Day (YYYY-MM-DD, UTC): the 00:00 UTC snapshot of that day. Not with ts (Pro for past days)
tsstring—ISO time (UTC if no offset): the latest snapshot at or before it. Not with date (Pro for past snapshots)
range_pctnumber30± % of the price for moves and top levels (1–30)
top_ninteger5Number of largest amplify / dampen levels (1–10)
max_strikesinteger10Largest strikes by |net GEX| (1–30; Pro)
include_levelsbooleanfalseAlso return level rows within range_pct, sampled to at most max_levels
max_levelsinteger40Cap on level rows (5–120)

Level rows are sampled (every k-th level), never summed: the hedge flow is cumulative along the price path.

Use case: «If BTC drops 10% from here, do dealers buy into the fall or sell into it, and how much?» — one call answers it, with the levels where the effect is strongest.


get_gex_heatmap​

Free

History of the Dealer Hedge Flow profile over time (time × price), coarsened to fit the agent's context. Each period is represented by its last snapshot: spot price, zero gamma, impact if the price moved −10 / −5 / +5 / +10%, the strongest amplify and dampen levels. Optionally a period × %-offset matrix of impact.

ParameterTypeDefaultDescription
from_datestringtoday − daysStart day (YYYY-MM-DD)
to_datestringlatestEnd day, inclusive (YYYY-MM-DD)
daysinteger90Look-back in days when from_date is omitted (1–3,650)
resolution"1d" / "6h" / "1h""1d"API snapshot spacing: one snapshot per bucket (1d = 00:00 UTC). 6h and 1h require Pro
period"auto" / "snapshot" / "day" / "week" / "month""auto"Row aggregation; auto picks the finest that fits max_rows (weeks start on Monday)
max_rowsinteger30Max periods returned, the latest are kept (1–60)
include_matrixbooleanfalseAlso return the period × offset matrix of impact (at most 1,500 cells)
window_pctnumber20Matrix: ± % of the price (5–30)
band_pctnumber2.5Matrix: offset step in % (0.5–15)

1h covers at most 90 days per request — use 6h or 1d for longer ranges. Free: 1d for the last 30 days (earlier days are cut off, access.clipped = true); Pro: full history and 6h / 1h.

Use case: See how the dealer regime changed over a quarter — for example whether the zero gamma level moved towards the price before a sell-off.


Use Cases with Example Prompts​

Here are concrete prompts you can give your AI agent once the Blocklens MCP server is connected.

Market Valuation Analysis​

"Is Bitcoin currently overvalued? Check the MVRV ratio and compare LTH vs STH realized prices to the current spot price."

The agent will call get_holder_valuation and get_prices, then synthesize the data to assess whether current market value is above or below the aggregate cost basis.

HODL Waves Research​

"Show me how the supply distribution across age cohorts has changed over the last year. Are long-term holders accumulating or distributing?"

The agent will call get_cohort_metrics for multiple cohorts with days: 365, then analyze trends in each age bracket to identify accumulation vs distribution patterns.

Weekly On-Chain Report​

"Generate a weekly Bitcoin on-chain health report covering price action, supply dynamics, holder profitability, and MVRV."

The agent will call get_latest_metrics for a snapshot, then drill into get_prices, get_holder_supply, get_holder_valuation, and get_holder_profit for 7-day trends, producing a structured summary.

Cycle Phase Identification​

"What does the realized cap trend suggest about the current market phase? Compare realized cap growth rate to previous months."

The agent will call get_holder_valuation with a longer time window and analyze the realized cap trajectory to identify whether we're in accumulation, markup, distribution, or markdown.

Capitulation Detection​

"Check if STH SOPR has dropped below 1 in the last 30 days — this indicates short-term holders selling at a loss."

The agent will call get_holder_profit with days: 30 and examine the STH SOPR values to flag capitulation events.

Access Tiers​

TierMCP AccessHistoryMetricsDaily Requests
Demo (no key)Yes60 daysBasic (grade 0)Unlimited
Pro ($50/mo)YesUnlimitedAll (grade 0–1)10,000
Enterprise ($900/mo)YesUnlimitedAll (grade 0–2)100,000

The MCP server works with all tiers. API keys come with the Pro and Enterprise plans; without a key (including a Free account) the server works in demo mode. Demo mode is a great way to explore the tools before subscribing. Get an API key to unlock full access.

Get Your API Key​

Visit blocklens.co/api-mcp to create an API key and view your subscription tier and usage.

Resources​