Skip to main content
Glama

Blockchain Lab MCP server + SDK

Blockchain Lab MCP

Give AI agents (Cursor, Claude Desktop/Code, Grok, any MCP client) real blockchain knowledge and live on-chain tools. 43 read-only tools over the Blockchain Lab Open Data API and public RPCs. No API keys.

Built by Blockchain Lab — blockchainlab.com

Tools

Tool

What it answers

Source

search_whitepapers

"Find papers on proof of stake from 2017" (600+ papers)

Blockchain Lab corpus

get_chain

Chain ID → RPCs, explorers, currency

chainid.network

top_defi_protocols / chains_tvl

TVL rankings, filter by category/chain

DefiLlama (nightly)

list_hackathons / list_events

Open hackathons, upcoming events

blockchainlab-feeds

list_grants

Grant programmes by ecosystem

curated, link-checked nightly

glossary

Plain-language definitions

blockchainlab.com

lookup_standard

EIP / ERC / BIP by number or title

ethereum/EIPs, ethereum/ERCs, bitcoin/bips

gas_prices

Live fees + USD cost (7 EVM chains, Bitcoin, Solana)

public RPCs, mempool.space, DefiLlama

decode_transaction

Decode any tx (call, args, logs, fees)

public RPCs + openchain

inspect_address

ENS, checksum, balance, contract/proxy/7702, ERC-20

public RPCs

decode_calldata / abi_utils

Decode calldata, selectors, encode calls

openchain / 4byte

stablecoins · defi_yields · bridges_tvl · dex_volumes · protocol_fees

Stablecoin pegs & supply, top yields, bridges by TVL, DEX volume, protocol fees

DefiLlama (nightly)

l2_metrics

L2 stage, stack, risks, TVS breakdown

L2BEAT (nightly)

security_incidents

Hacks/exploits by protocol, technique, date, size

DefiLlama hacks DB

sanctions_check

Screen addresses against OFAC SDN list

OFAC via 0xB10C

get_dataset

Any of the 20 Open Data API datasets, raw

blockchainlab-api

safe_info · safe_tx_hash · decode_safe_calldata

Safe owners/threshold/nonce; safeTxHash computed locally and checked against the Safe on-chain; decode execTransaction / MultiSend

public RPC

eip712_hash · verify_message

EIP-712 digest/domain/struct hash, recover signer, ERC-1271 check; EIP-191 recover

local + RPC

calldata_diff

Field-by-field diff of two calldata blobs

openchain / 4byte

contract_verification

Verified on Sourcify / Blockscout? compiler, licence, proxy

Sourcify, Blockscout

gas_history

Base fee / tips over ≤1,024 blocks with stats

eth_feeHistory

bridge_quotes

Live USDC/ETH bridge quotes compared

Across, LI.FI, Relay

token_approvals

Risky ERC-20 approvals + revoke calldata/link

Multicall3 + Revoke.cash link

ens_bulk

Resolve/reverse up to 50 ENS names with records

ENS

decode_solana_tx

Solana tx: instructions, programs, balance/token changes

Solana RPC

decode_psbt

Bitcoin PSBT / raw tx: inputs, outputs, fee rate, BIP-32

local (@scure/btc-signer)

address_labels

Who is this address? tags, ENS, token, OFAC

Blockscout, ENS, token lists

vanity_estimate

Vanity prefix difficulty/time; CREATE2 address

local

uniswap_price_impact

On-chain Uniswap v3 quote + price impact

QuoterV2 + slot0

mev_sandwich_check

Was this swap sandwiched?

eth_getBlockReceipts

rpc_health

Free public RPC latency / lag now + nightly

live probe + API

convert_units / storage_slot

wei↔ether etc., mapping/array/ERC-7201 slots (+ live read)

local + RPC

Related MCP server: chain-data

One-click install

Add to Cursor Install in VS Code Install in VS Code (Docker)

Docker (GHCR) — no Node needed:

{ "mcpServers": { "blockchainlab": { "command": "docker", "args": ["run", "-i", "--rm", "ghcr.io/blockchains/blockchainlab-mcp:latest"] } } }

Install (manual)

Requires Node ≥ 18. Not yet on the npm registry — install straight from GitHub:

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

{
  "mcpServers": {
    "blockchainlab": { "command": "npx", "args": ["-y", "github:Blockchains/blockchainlab-mcp"] }
  }
}

Claude Desktop — claude_desktop_config.json: same mcpServers block as above.

Claude Code

claude mcp add blockchainlab -- npx -y github:Blockchains/blockchainlab-mcp

Grok / any MCP client (stdio) — command npx, args -y github:Blockchains/blockchainlab-mcp.

From source

git clone https://github.com/Blockchains/blockchainlab-mcp && cd blockchainlab-mcp && npm ci
node bin/blockchainlab-mcp.js     # speaks MCP over stdio

Optional env: BLOCKCHAINLAB_API to point at a self-hosted copy of the data API.

Try asking your agent: "What are the top 5 lending protocols on Arbitrum by TVL?", "Decode tx 0x… on Base", "Which grant programmes fund Bitcoin developers?", "Summarise ERC-4337 and list related whitepapers."

SDK

import { BlockchainLab, onchain } from "blockchainlab-mcp";   // or from a GitHub install

const bl = new BlockchainLab();
await bl.searchWhitepapers({ query: "rollup", limit: 5 });
await bl.topProtocols({ category: "Lending", chain: "Arbitrum", limit: 5 });
await bl.findChain("8453");
await bl.standard("ercs", "4337");

await onchain.evmFees("base");
await onchain.decodeTx("ethereum", "0x…");
await onchain.resolveEns("vitalik.eth");

TypeScript

Type declarations ship in types/ (since v0.3.0) for every entry point: blockchainlab-mcp, /onchain, /onchain2 and /server. No @types package or declare module shim is needed. Requires TypeScript ≥ 5.7 (the re-exported @scure/btc-signer types use generic Uint8Array); with older TypeScript set skipLibCheck: true. Checked with 5.7, 5.9 and 7.0. Chain parameters are checked: Chain (EVM chains of the live tools), UniV3Chain, BlockscoutChain.

import { BlockchainLab, type DatasetDoc } from "blockchainlab-mcp";
import { rpc, type Chain } from "blockchainlab-mcp/onchain";
import { createServer } from "blockchainlab-mcp/server";   // McpServer with all 43 tools, for your own transport

const bl = new BlockchainLab();
const top = await bl.topProtocols({ category: "Lending", limit: 3 });   // { generated_at, source, results: Row[] }
const chain: Chain = "base";
const head: string = await rpc(chain, "eth_blockNumber");

types/onchain*.d.ts are generated from the JS sources (npm run types). types/sdk.d.ts and types/server.d.ts are hand-written. test/types.test.mjs fails if any of them drift from the runtime exports.

Tests (live, no mocks)

npm test   # type declarations (offline) + SDK against the live API + spawns the real MCP server over stdio and calls all 43 tools (fails if any listed tool is untested)

CI runs on Node 18/20/22 on every push and daily.

Tools site · Open Data API · Lens · Labs · Roadmap

MIT. Read-only: the server never signs or sends transactions. Not financial advice.

Use as a building block

For AI agents and builders: read AGENTS.md (setup, commands, structure, rules), llms.txt (doc map) and the machine-readable blocks.json (schema). How all Blockchains blocks fit together: Build with Blocks · org catalogue: https://blockchains.github.io/blocks.json.

What it exports

Export

Type

Install / access

blockchainlab

mcp-stdio

npx -y github:Blockchains/blockchainlab-mcp

ghcr.io/blockchains/blockchainlab-mcp

docker

docker run -i --rm ghcr.io/blockchains/blockchainlab-mcp:0.3.0

blockchainlab-mcp

npm

npm i github:Blockchains/blockchainlab-mcp#v0.3.0

blockchainlab-mcp/server

npm

npm i github:Blockchains/blockchainlab-mcp#v0.3.0

blockchainlab exports: search_whitepapers, get_chain, top_defi_protocols, chains_tvl, list_hackathons, list_events, list_grants, glossary, lookup_standard, gas_prices, decode_transaction, inspect_address, decode_calldata, abi_utils, convert_units, storage_slot, stablecoins, defi_yields, bridges_tvl, dex_volumes, protocol_fees, l2_metrics, security_incidents, sanctions_check, get_dataset, safe_info, safe_tx_hash, decode_safe_calldata, eip712_hash, verify_message, calldata_diff, contract_verification, gas_history, bridge_quotes, token_approvals, ens_bulk, decode_solana_tx, decode_psbt, address_labels, vanity_estimate, uniswap_price_impact, mev_sandwich_check, rpc_health

blockchainlab-mcp exports: BlockchainLab, onchain, onchain2, toolLinks, DEFAULT_API, TOOLS_SITE, SITE

blockchainlab-mcp/server exports: createServer, main, VERSION

Minimal example (Cursor ~/.cursor/mcp.json, Claude Desktop or any stdio MCP client; tools/list returned 43 tools on 2026-10-04)

{ "mcpServers": { "blockchainlab": { "command": "npx", "args": ["-y", "github:Blockchains/blockchainlab-mcp"] } } }

Inputs → outputs

  • In: tool call (MCP tools/call) JSON arguments per tool (see tools/list input schemas); BLOCKCHAINLAB_API (env) optional self-hosted API base

  • Out: tool result (MCP content (JSON text)) data with generated_at/source fields and deep links to blockchainlab-tools pages

Composes with

Versioning & stability: beta. 0.x: tool names are kept stable, but new tools are added and output fields may grow. Releases are git tags + GitHub releases (latest v0.3.0: TypeScript declarations); not on the npm registry yet, so install from GitHub pinned to a tag (#v0.3.0) or use the GHCR image (:0.3.0, :latest). server.json is prepared for the MCP Registry.

Contributing

Issues and pull requests are welcome. Please read the contributing guide, code of conduct and security policy first.


Built by Blockchain Lab — blockchainlab.com

Release & packaging

  • npm pack --dry-run is run in CI; the package is ready but deliberately not published to npm. To publish: npm publish (name blockchainlab-mcp).

  • server.json is prepared for the official MCP Registry (io.github.Blockchains/blockchainlab-mcp) — publish with mcp-publisher publish after the npm release.

  • Docker image ghcr.io/blockchains/blockchainlab-mcp (linux/amd64 + arm64) is built, smoke-tested over stdio (initialize + tools/list ≥ 43) and pushed on every push to main and on v* tags (:latest, :<version>, :sha-…).

  • Releases: git tags vX.Y.Z with GitHub releases (first: v0.3.0). Install a release from GitHub with npm i github:Blockchains/blockchainlab-mcp#v0.3.0, or pull ghcr.io/blockchains/blockchainlab-mcp:0.3.0.

Available Tools

43 tools
abi_utilsSelector / encodeC
Read-only

Compute a function selector & event topic for a signature, and optionally ABI-encode a call with args.

Inputs: signature (required), args.

address_labelsAddress labelsB
Read-only

Public labels for an EVM address: Blockscout name/tags/token, ENS primary name, token-list match, known spender name, OFAC SDN check.

Inputs: chain (required), address (required).

bridge_quotesBridge fee compareA
Read-only

Live bridge quotes for USDC or ETH between Ethereum, Base, Arbitrum, OP, Polygon from Across, LI.FI and Relay: amount received, cost, ETA.

Inputs: to (required), from (required), amount (required), asset.

bridges_tvlBridges by TVLB
Read-only

Cross-chain and canonical bridges ranked by TVL (DefiLlama bridge categories), optionally filtered by chain.

Inputs: chain, limit.

calldata_diffCalldata diffB
Read-only

Decode two calldata blobs and list every argument and 32-byte word that differs (review multisig/governance payloads).

Inputs: a (required), b (required), signature.

chains_tvlDeFi TVL by chainB
Read-only

DeFi TVL ranking by chain (DefiLlama nightly snapshot).

Inputs: limit.

contract_verificationContract verificationA
Read-only

Is a contract's source verified? Checks Sourcify (full/partial match) and Blockscout (name, compiler, licence, proxy + implementations).

Inputs: chain (required), address (required).

convert_unitsConvert unitsA
Read-only

Exact conversion between wei/gwei/ether, sat/btc, lamport/sol.

Inputs: unit (required), value (required).

decode_calldataDecode calldataA
Read-only

Decode EVM calldata; looks up the 4-byte selector in openchain/4byte unless a signature is given.

Inputs: data (required), signature.

decode_psbtDecode Bitcoin PSBT / txA
Read-only

Decode a Bitcoin PSBT (base64/hex) or raw tx hex offline: inputs, outputs, addresses, script types, fee, fee rate, signatures, BIP-32 paths.

Inputs: psbt (required).

decode_safe_calldataDecode Safe calldataB
Read-only

Decode Safe execTransaction (incl. signature types) or MultiSend batch calldata, decoding each inner call.

Inputs: data (required).

decode_solana_txDecode Solana txA
Read-only

Decode a Solana transaction signature: status, fee, compute units, parsed instructions + inner instructions with program names, SOL and token balance changes.

Inputs: signature (required).

decode_transactionDecode transactionA
Read-only

Fetch and decode a transaction by hash: status, fees, decoded function call + args, decoded event logs.

Inputs: hash (required), chain (required).

defi_yieldsDeFi yieldsA
Read-only

Top DeFi yield pools (TVL ≥ $10m) with APY, base/reward split and IL risk (DefiLlama nightly). Filter by chain, project, stablecoin-only; sort by tvl or apy.

Inputs: sort, chain, limit, project, +2 more.

dex_volumesDEX volumesB
Read-only

DEX trading volume by protocol (24h/7d/30d) plus market totals (DefiLlama nightly).

Inputs: chain, limit.

eip712_hashEIP-712 hash / verifyA
Read-only

Hash EIP-712 typed data (digest, domain separator, struct hash) and, if a signature is given, recover the signer; optionally check ERC-1271 isValidSignature on a smart account.

Inputs: typedData (required), erc1271, signature.

ens_bulkENS bulk resolveA
Read-only

Resolve up to 50 ENS names (address + avatar/url/twitter/github records, primary-name check) or reverse-resolve addresses.

Inputs: inputs (required).

gas_historyGas historyB
Read-only

Base fee / median tip / gas-used ratio over the last N (≤1024) blocks with min/median/p75/max stats. Returns stats plus a downsampled series.

Inputs: chain (required), blocks.

gas_pricesLive gas / feesA
Read-only

Live fees from public RPCs: EVM base fee + priority tips (eth_feeHistory) and cost in native token + USD for a given gas amount; or Bitcoin sat/vB; or Solana priority fees.

Inputs: chain (required), gasUnits.

get_chainFind EVM chainA
Read-only

Look up an EVM chain by chain ID, short name or name: native currency, public RPCs, explorers (chainid.network).

Inputs: query (required).

get_datasetRaw datasetA
Read-only

Fetch any Blockchain Lab Open Data API dataset by name (see the catalogue): returns rows (optionally limited) plus generation time and source.

Inputs: name (required), limit.

glossaryBlockchain glossaryA
Read-only

Plain-language definitions from blockchainlab.com. Omit term to list all terms.

Inputs: term.

inspect_addressInspect address / ENSB
Read-only

Resolve ENS, validate checksum, and inspect an address on a chain: balance, nonce, contract/EOA, proxy implementation, EIP-7702 delegation, ERC-20 metadata.

Inputs: address (required), chain.

l2_metricsL2 metrics (L2BEAT)A
Read-only

Ethereum L2/L3 projects: stage, category, stack, risk summary and Total Value Secured breakdown (L2BEAT nightly). Query by name/id/stack, filter by stage ('Stage 0', 'Stage 1', 'Stage 2').

Inputs: limit, query, stage.

list_eventsBlockchain eventsB
Read-only

Upcoming blockchain events from the Blockchain Lab feeds.

Inputs: no named parameters.

list_grantsGrant programmesB
Read-only

Directory of blockchain ecosystem grant programmes with official links (link status re-checked nightly).

Inputs: ecosystem.

list_hackathonsBlockchain hackathonsA
Read-only

Open and upcoming blockchain hackathons (Devpost, ETHGlobal) from the Blockchain Lab feeds.

Inputs: no named parameters.

lookup_standardEIP / ERC / BIP lookupA
Read-only

Find an Ethereum EIP/ERC or Bitcoin BIP by number (e.g. 'ERC-4337', '1559', 'BIP-341') or title words.

Inputs: query (required), kind.

mev_sandwich_checkMEV sandwich checkA
Read-only

Was this swap sandwiched? Looks for a same-pool same-direction front-run and reversing back-run from the same EOA/bot within 8 positions in the block (heuristic).

Inputs: hash (required), chain (required).

protocol_feesProtocol feesB
Read-only

Protocol fees by protocol (24h/7d/30d) plus totals (DefiLlama nightly).

Inputs: chain, limit.

rpc_healthPublic RPC healthA
Read-only

Probe free public RPC endpoints for a chain now (latency, block lag, chain-ID check) and include the nightly server-side snapshot.

Inputs: chain (required).

safe_infoSafe multisig infoB
Read-only

Read a Safe (Gnosis Safe) multisig: owners, threshold, nonce, version.

Inputs: safe (required), chain (required).

safe_tx_hashSafe tx hashA
Read-only

Compute the EIP-712 safeTxHash for a Safe transaction locally and cross-check it with the Safe's on-chain getTransactionHash(). Use to verify what a signer should see on their hardware wallet.

Inputs: to (required), safe (required), chain (required), data, +3 more.

sanctions_checkOFAC sanctions checkA
Read-only

Check addresses (any chain) against the OFAC SDN digital-currency address list (nightly, via 0xB10C). Screening aid only.

Inputs: addresses (required).

search_whitepapersSearch whitepapersA
Read-only

Search Blockchain Lab's research corpus (600+ blockchain whitepapers) by text, topic or year. Returns metadata + original source + blockchainlab.com link.

Inputs: year, limit, query, topic.

security_incidentsHacks & exploitsB
Read-only

Public record of crypto hacks/exploits (DefiLlama hacks DB): search by protocol/technique, filter by date (YYYY-MM-DD), min USD lost, chain. Returns matches and total lost.

Inputs: chain, limit, query, since, +1 more.

stablecoinsStablecoinsA
Read-only

Stablecoins by circulating supply with price vs peg, mechanism and 1d/7d/30d supply change (DefiLlama nightly). Filter by symbol or peg type (peggedUSD, peggedEUR…).

Inputs: peg, limit, symbol.

storage_slotStorage slotA
Read-only

Compute a Solidity storage slot (mapping, nested mapping, array element, ERC-7201 namespace) and optionally read it live.

Inputs: kind (required), keys, read, slot, +2 more.

token_approvalsToken approvalsA
Read-only

Which well-known spenders (Permit2, Uniswap routers, 1inch, 0x, CoW, Balancer, OpenSea, Aave…) can spend an address's top ERC-20s; flags unlimited approvals; returns revoke calldata + Revoke.cash link.

Inputs: chain (required), owner (required).

top_defi_protocolsTop DeFi protocols by TVLA
Read-only

Top DeFi protocols by TVL in USD from DefiLlama (nightly snapshot), optionally filtered by category (e.g. Lending, Dexs, Liquid Staking) or chain.

Inputs: chain, limit, category.

uniswap_price_impactUniswap v3 price impactB
Read-only

On-chain Uniswap v3 QuoterV2 quote for a single pool: amount out, mid vs execution price, price impact, price after, ticks crossed, gas estimate.

Inputs: chain (required), tokenIn (required), amountIn (required), tokenOut (required), +1 more.

vanity_estimateVanity address estimateA
Read-only

Difficulty and expected attempts for an Ethereum vanity prefix (case-insensitive or EIP-55), with time at a given keys/s rate. Also computes a CREATE2 address if deployer+salt+initCode are given.

Inputs: prefix, create2, caseSensitive, keysPerSecond.

verify_messageVerify personal_signB
Read-only

Recover the signer of an EIP-191 personal_sign message.

Inputs: message (required), signature (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.2/5.0

    Scored across 43 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes within their subdomains (e.g., Safe operations, decoding, DeFi metrics). A few clusters—such as the multiple decode_* tools and the numerous DeFi TVL/yield/fee metrics—could cause slight hesitation, but descriptions generally clarify boundaries well.

    Naming Consistency3/5

    All names use snake_case, which is readable, but the set mixes verb-first (decode_calldata, get_chain, list_grants) and noun-first (gas_prices, safe_tx_hash, protocol_fees) conventions inconsistently. This makes the naming pattern less predictable than a uniform verb_noun scheme.

    Tool Count2/5

    With 43 tools, the server is far above the typical 3–15 range and exceeds the 25+ threshold for 'too many' in the rubric. Although the domain is broad, the sheer volume likely burdens tool selection and maintenance.

    Completeness4/5

    The surface covers a wide range of blockchain data domains: EVM/Solana/Bitcoin decoding, address inspection, DeFi metrics, security checks, ENS, Safe, and research feeds. Some gaps remain (e.g., NFT data, comprehensive token balances, write operations), but for a read-only analytics server it is largely complete.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Description: EVM blockchain intelligence toolkit for AI agents. 20 tools for token prices, gas comparison, swap quotes, yield rates, honeypot detection, and transaction simulation across 5 EVM chains. Zero config, no API keys required.
      26
      69 npm
      3
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables AI agents to fetch live multi-chain portfolio, token info, gas prices, and token prices across Ethereum, Base, Polygon, Arbitrum, and Optimism with a single call. No API key required.
      4
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI assistants to query on-chain data across EVM chains like Base, Optimism, Avalanche, Celo, and Arbitrum, including balances, transactions, gas, and smart contract interactions.
      48 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to perform Web3 development operations such as toolchain diagnostics, chain registry queries and live probing, address validation, secret scanning, deployment logging, and standards searches across multiple blockchains.
      29 npm
      MIT