Blockmetric

v0.6.3
io.blockmetric/mcp Checked 1 hour ago Published 5 days ago

Read-only crypto market data: Hyperliquid liquidation heatmaps, liquidations, whales, funding, flow.

An MCP server that gives ChatGPT, Claude, Cursor and other MCP clients read-only access to Blockmetric: liquidation heatmaps and levels built from real Hyperliquid positions, liquidations, whales, wallets, traders and smart money, order book and order flow, funding, long/short, candles, the screener, whale movements, exchange flows, security incidents and risk radar events. URL: https://api.blockmetric.io/mcp (also reachable as https://blockmetric.io/api/mcp).

Summary extracted from the README.

blockmetric-mcp: Blockmetric for AI agents

An MCP server that gives ChatGPT, Claude, Cursor and other MCP clients read-only access to Blockmetric: liquidation heatmaps and levels built from real Hyperliquid positions, liquidations, whales, wallets, traders and smart money, order book and order flow, funding, long/short, candles, the screener, whale movements, exchange flows, security incidents and risk radar events.

Two ways to use the same tools:

  • Remote server, nothing to install: add https://api.blockmetric.io/mcp as a remote MCP server in your client (see Remote server). The tools run on Blockmetric's servers.
  • Local server (this package): runs on your machine over stdio, with your key in its environment (see Local server).

Remote server

URL: https://api.blockmetric.io/mcp (also reachable as https://blockmetric.io/api/mcp). Streamable HTTP, stateless: one JSON-RPC 2.0 message per POST, answered with application/json (no SSE stream, no sessions; GET and DELETE answer 405, JSON-RPC batches are refused). Same tool list, same results as the local server.

  • Without a key the server uses public access with the same data and 24 h of history, but limits of its own for MCP clients: 60 tool calls per minute and 3,000 per day per IP address (and 12,000 per day per network, IPv4 /24 or IPv6 /48). A client that sends no key from a shared address shares that budget with every other user behind the same address. AI platforms that call from their own addresses (a hosted assistant, for example) share a budget per platform instead: 600 tool calls per minute and 40,000 per day. All keyless MCP callers together: 100,000 per day.
  • With a key: send Authorization: Bearer bm_live_… (or x-api-key) if your client lets you set request headers. The key's plan, history and limits then apply, and each tool call that reaches the API counts as a REST request of that key (see Plans and limits).
  • Messages that reach no API endpoint (initialize, tools/list, ping, a call with an unknown tool or invalid arguments) have their own limit of 120 per minute per client.

ChatGPT

Settings → Connectors (developer mode) → add a connector with the MCP server URL https://api.blockmetric.io/mcp, authentication none (public access).

Claude.ai

Settings → Connectors → Add custom connector, name Blockmetric, remote MCP server URL https://api.blockmetric.io/mcp.

Claude Code (remote)

claude mcp add --transport http blockmetric https://api.blockmetric.io/mcp

# with a key
claude mcp add --transport http blockmetric https://api.blockmetric.io/mcp \
  --header "Authorization: Bearer $BLOCKMETRIC_API_KEY"

Any client / curl

curl -s https://api.blockmetric.io/mcp \
  -H 'Content-Type: application/json' -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_liquidation_map","arguments":{"coin":"BTC"}}}'

Add -H "Authorization: Bearer $BLOCKMETRIC_API_KEY" to use your key. The rate-limit headers of the last API answer (X-RateLimit-*) are copied onto the response.

Local server

  • Zero dependencies, plain JavaScript. Runs with node server.mjs on Node 18+.
  • stdio transport, newline-delimited JSON-RPC 2.0. Protocol revisions: 2026-07-28 (stateless, per-request _meta version, server/discover) and the handshake-based 2025-11-25, 2025-06-18, 2025-03-26, 2024-11-05 (initialize), so current and older clients both work.
  • Every tool is read-only (readOnlyHint: true). Your key stays on your machine, in the server's environment, and is only sent to the Blockmetric API.
  • Works without a key: without BLOCKMETRIC_API_KEY the server uses the API's public access (header X-Blockmetric-Access: public): free-tier data with 24 h of history, non-commercial, 10 requests/minute and 300/day per IP address. A free personal key (https://blockmetric.io/account/api) raises the history to 30 days and gives the key's own limits. The SDKs blockmetric (npm, PyPI) work without a key in the same way since 0.6.0; keyless requests of this server carry (keyless) in the User-Agent.

On npm as blockmetric-mcp (no dependencies, Node 18+): npx -y blockmetric-mcp starts it. The key is optional (see above); the base URL defaults to https://api.blockmetric.io/v1.

Tools

Tool What it answers Inputs
get_liquidation_heatmap Where liquidations WOULD happen for one coin: the liquidation heatmap over time built from real tracked Hyperliquid positions. coin (required), hours, tf, end, top
get_liquidation_map Current liquidation levels of one coin from tracked Hyperliquid positions: USD of long and short positions per price bucket right now, with totals. coin (required), top
get_liquidations Liquidations that HAPPENED: totals of the last hours (long/short USD, per venue, top coins, largest single liquidation) plus the latest individual liquidations the data licence allows, optionally only large ones (min_usd) or one side. hours, coin, venue, side, min_usd, limit
get_whales Largest tracked Hyperliquid wallets with public labels (and the label source), open notional, all-time PnL, largest position and its distance to liquidation. sort, coin, labelled, limit
get_wallet One tracked Hyperliquid wallet: account value, open positions with leverage and liquidation prices, totals and the latest position changes. address (required)
get_funding Funding rates per coin across Hyperliquid and the exchanges the data licence allows (annualised, as fractions) and the spread between venues. coin, limit
get_long_short Long/short positioning per coin: Hyperliquid from tracked positions (USD ratio) and, where the data licence allows, the account ratios the exchanges publish. coin, limit
get_events Risk radar events, newest first: whale moves, whales near liquidation, big liquidations, cascades, funding extremes and flips, open interest spikes, records, exploits/hacks, stablecoin depegs, TVL drops, exchange outflows. kinds, min_severity, coin, limit
get_candles OHLC price candles of one coin (UTC-aligned) with volume: the price change, high and low over the window plus the newest candles. coin (required), tf, price, market, limit, from, to
get_screener Every coin in one table: price and open-interest change, funding now and predicted, long/short, liquidations in 24 h, nearest liquidation cluster, RSI and volatility. sort, dir, coin, min_oi_usd, limit
get_orderbook Order book liquidity of one coin: depth within bands around the mid (bids vs asks, imbalance) and the largest walls with their status (active, pulled before the price arrived, filled). coin (required), venue, walls
get_order_flow Taker flow of one coin over a window: buy vs sell volume, delta and cumulative volume delta in total, per venue, by print size and for tracked whales, plus the volume profile (point of control, value area). coin (required), hours, venue
get_large_trades The newest large taker prints (trades above the tape threshold) with side, price, size and whether a tracked whale was the taker. coin, venue, side, min_usd, minutes, limit
get_movements Large on-chain transfers and whale moves, newest first: exchange in/outflows, transfers between wallets, stablecoin mints and burns, bridges, DEX swaps and large Hyperliquid positions and trades, with labels where a source names the wallet. types, chain, asset, min_usd, labelled, limit
get_traders Hyperliquid trader leaderboard: PnL and ROI per window, account value, observed win rate, drawdown, Sharpe and style tags. sort, style, limit
get_smart_money What the most profitable tracked wallets do: convergence events (several top wallets opening the same side of a coin within a short window) and their current net positioning per coin. coin, limit
get_security_incidents Hacks, exploits, depegs and other security incidents, newest first: detector events and curated incidents with the reported loss and primary-source links. origin, chain, min_severity, limit
get_listed_wallets Wallets an official source lists (OFAC SDN list, FBI / IC3 announcements, official incident post-mortems), each as "Listed as by , " with a link. address, category, source, network, limit
get_exchange_flows On-chain flows into and out of exchange wallets over a window: inflow, outflow and net per exchange and asset (stablecoins, BTC, ETH). hours, exchange, asset
get_my_limits The plan behind this server's key (or keyless public access): requests per minute and per day and how many are left, the history window, heatmap intervals and whether commercial use is allowed. -
get_api_status Whether the Blockmetric API and its data feeds are healthy right now: overall status, API version, feeds that are delayed or down, and open incidents. -

Each result has a short text summary (content[0]) and the trimmed JSON in structuredContent (for the heatmap: the clusters, not the full grid). API errors come back as tool results with isError: true and the error code, message, doc_url and request_id; invalid arguments too (code: invalid_arguments, with the allowed values), so the model can correct the call. Only an unknown tool name is a JSON-RPC error (-32602). Market and on-chain data, collected and processed by Blockmetric Research. tools.json next to this file lists the tools for documentation pages.

Configuration (local server)

Variable
BLOCKMETRIC_API_KEY Your key (bm_live_…). Create it on your account page (/account/api). Optional: without it every call uses public access (free tier, 24 h of history, 10/min and 300/day per IP); a call over that limit explains how to set a key.
BLOCKMETRIC_BASE_URL Optional. Default in the npm package: https://api.blockmetric.io/v1.

Plans and limits

Access Requests History Licence Realtime
No key (X-Blockmetric-Access: public) 10 / min, 300 / day per IP address 24 h public (non-commercial) -
Free 60 / min, 1,000 / day 30 days personal use -
Pro 90 / min, 5,000 / day 1 year personal use -
Desk 120 / min, 10,000 / day 3 years personal use -
API Dev 120 / min, 50,000 / day 1 year internal use and small display webhooks
API Pro 300 / min, 400,000 / day 3 years display in your product live stream, webhooks

Limits apply per account across all its keys; every plan is real time. Every key gets the heatmap of every coin: free keys the last 24 hours, paid plans their plan history. Every response names its licence (meta.license) and the credit to show (meta.attribution). Current prices: /pricing on the site. Market and on-chain data, collected and processed by Blockmetric Research, without guarantee.

One tool call is one API request (get_liquidations makes two), for the local and the remote server.

Claude Desktop

claude_desktop_config.json (Settings → Developer → Edit Config):

{
  "mcpServers": {
    "blockmetric": {
      "command": "npx",
      "args": ["-y", "blockmetric-mcp"],
      "env": {
        "BLOCKMETRIC_API_KEY": "bm_live_…"
      }
    }
  }
}

Claude Code (local)

claude mcp add blockmetric --env BLOCKMETRIC_API_KEY=bm_live_… -- npx -y blockmetric-mcp

or, shared with a project, .mcp.json (keep the key out of version control; Claude Code expands ${BLOCKMETRIC_API_KEY} from your environment):

{
  "mcpServers": {
    "blockmetric": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "blockmetric-mcp"],
      "env": {
        "BLOCKMETRIC_API_KEY": "${BLOCKMETRIC_API_KEY}"
      }
    }
  }
}

Cursor

~/.cursor/mcp.json (or .cursor/mcp.json in a project):

{
  "mcpServers": {
    "blockmetric": {
      "command": "npx",
      "args": ["-y", "blockmetric-mcp"],
      "env": {
        "BLOCKMETRIC_API_KEY": "bm_live_…"
      }
    }
  }
}

The same snippets are in snippets.json (rendered on the developer hub).

Try it by hand (local server)

export BLOCKMETRIC_API_KEY=bm_live_…   # optional
printf '%s\n' \
  '{"jsonrpc":"2.0","id":1,"method":"server/discover","params":{"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}' \
  '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_liquidation_heatmap","arguments":{"coin":"BTC"},"_meta":{"io.modelcontextprotocol/protocolVersion":"2026-07-28"}}}' \
  | npx -y blockmetric-mcp

Security

  • Read-only: the tools only issue GET requests to the Blockmetric API; nothing is written, traded or sent elsewhere.
  • Local server: the key is read from the environment and only sent as Authorization: Bearer to BLOCKMETRIC_BASE_URL. It is never written to stdout; the startup line on stderr shows the first 12 characters only.
  • Remote server: the tools call the API inside Blockmetric's own process through a fixed table of endpoints (no tool can reach another URL). The key header is passed on to that call, never logged, and the endpoint sends no cookies (CORS without credentials). Never put a key into a prompt or a chat message; set it as a request header.
  • Revoke a key on /account/api at any time; the server then answers with unauthorized errors.

Versioning

SERVER_VERSION (in the generated config.mjs) is the version of package.json; API_VERSION names the API contract the tool tables were generated for. Only query parameters that contract knows are sent. Changes: sdk/CHANGELOG.md in the source tree and https://blockmetric.io/developers/changelog.

Licence

The MCP server is licensed under the Apache License 2.0 (see also NOTICE). The licence covers the code, not the name: "Blockmetric" and the logo are not licensed, so forks must be renamed; "works with Blockmetric" is fine (TRADEMARKS.md). Data you receive from the API is governed by the API terms (/terms#api-license on the site; meta.license in every response); market data of third-party exchanges stays subject to that exchange's terms (/terms#third-party-data). The examples in examples/ and the code snippets in the API docs are MIT-0 (copy them into your own code without attribution). No warranty for the data.

Development

config.mjs, tools.json and the tool and plan tables of this README are generated from the API's OpenAPI document (sdk/openapi.json) and the tool definitions in server.mjs: do not edit them by hand. server.json is the entry of the MCP registry (io.blockmetric/mcp). To try a change, run node server.mjs and speak JSON-RPC over stdio as shown under "Try it by hand".