blockscout-mcp-server
A read-only MCP server that queries multichain EVM on-chain data through Blockscout REST API, providing tools for address info, transactions, logs, and more.
README
blockscout-mcp-server
A read-only Model Context Protocol (MCP) server that queries multichain EVM on-chain data through the Blockscout REST API. It runs over stdio and is designed for LLM clients (Claude Desktop, Cursor, etc.).
- Free & open source — calls public per-instance Blockscout REST APIs directly (no paid gateway, no API key).
- Read-only — never signs or sends transactions.
- Multichain — a bundled chain registry plus your own custom chains via a JSON file.
- LLM-friendly — every tool returns a standardized envelope with opaque cursor pagination and large-field truncation.
Requirements
- Node.js >= 24
- pnpm (for development)
Install
The server runs over stdio: your MCP client launches it as a subprocess. Pick one of the
following ways to point the command/args at it. env is optional in every case — without
CHAINS_FILE only the bundled chains are available.
From npm (recommended)
npx downloads the published package and runs it — nothing to install manually. Works from any
project; point CHAINS_FILE at that project's chains file (a relative ./chains.json resolves
against the client's working directory).
{
"mcpServers": {
"blockscout": {
"command": "npx",
"args": ["-y", "blockscout-mcp-server"],
"env": {
"CHAINS_FILE": "./chains.json",
"ONLY_CHAINS_FILE": "true"
}
}
}
}
From source (local development)
git clone https://github.com/imelon2/blockscout-mcp-server.git
cd blockscout-mcp-server
pnpm install && pnpm build
{
"mcpServers": {
"blockscout": {
"command": "node",
"args": ["/absolute/path/to/blockscout-mcp-server/dist/index.js"],
"env": { "CHAINS_FILE": "/absolute/path/to/chains.json" }
}
}
}
The chain registry and env are read once at startup. After changing config or code, restart (reconnect) the server in your MCP client. A ready-to-edit
.mcp.example.jsonis included.
Custom chains
Point CHAINS_FILE at a JSON file describing extra chains (or overriding bundled ones).
Each entry needs a name, chainId, and Blockscout instance url:
[
{ "name": "my-l2", "chainId": 42, "url": "https://scan.my-l2.io" }
]
If CHAINS_FILE is set but the file is missing or malformed, the server exits immediately (fail-fast).
Set ONLY_CHAINS_FILE=true to register only the chains from CHAINS_FILE and exclude the
bundled snapshot entirely. It requires CHAINS_FILE to be set (otherwise no chains would exist and
the server fails fast). The default (false) merges bundled chains with CHAINS_FILE.
Tools
All tools take a chain argument (a name like "ethereum" or a numeric chain ID like "1").
Paginated tools accept a cursor and return pagination.next_cursor when more results exist.
| Tool | Purpose |
|---|---|
__unlock_blockchain_analysis__ |
Onboarding — usage rules. Call this first. |
get_chains_list |
List supported chains (bundled + custom). |
get_address_info |
Balance, type, and metadata for an address. |
get_tokens_by_address |
Token balances held by an address. |
get_token_transfers_by_address |
Token transfers involving an address. |
get_transactions_by_address |
Native transactions involving an address. |
get_transaction_info |
Full details for a transaction hash. |
get_token_transfers_by_transaction |
Token transfers within a transaction. |
get_block_info |
Details for a block by number or hash. |
get_block_number |
Latest block height for a chain. |
get_logs |
Event logs for an address (large data truncated). |
get_contract_abi |
ABI of a verified contract. |
inspect_contract_code |
Verified source code + compiler metadata. |
nft_tokens_by_address |
NFTs owned by an address. |
lookup_token_by_symbol |
Search tokens by symbol/name. |
direct_api_call |
Escape hatch for any Blockscout /api/v2 endpoint (size-capped). |
Configuration
All environment variables are optional:
| Variable | Default | Description |
|---|---|---|
CHAINS_FILE |
(unset) | Path to a JSON file of custom chains. |
ONLY_CHAINS_FILE |
false |
When true, register only CHAINS_FILE chains (exclude bundled). |
BLOCKSCOUT_TIMEOUT_MS |
30000 |
Timeout for heavy list requests. |
BLOCKSCOUT_LIGHT_TIMEOUT_MS |
15000 |
Timeout for point lookups. |
BLOCKSCOUT_MAX_RETRIES |
3 |
Transport-error retries for GET. |
BLOCKSCOUT_PAGE_SIZE |
10 |
Page size hint. |
BLOCKSCOUT_DIRECT_API_LIMIT |
100000 |
Char cap on direct_api_call responses. |
Development
pnpm install
pnpm build # tsc + copy assets to dist/
pnpm test # unit tests (network mocked)
pnpm dev # tsc --watch
Testing
-
Unit tests run by default and mock all network access.
-
Integration tests (real Blockscout calls) live under
tests/integration/and only run whenRUN_INTEGRATION=1is set:RUN_INTEGRATION=1 pnpm test
License
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。