blockscout-mcp-server
blockscout-mcp-server
一个只读的 stdio MCP 服务器,通过 Blockscout REST API 为 AI 代理提供多链 EVM 链上数据——地址、交易、区块、日志、代币、NFT 和合约源码。
[!IMPORTANT] 这不是 官方 Blockscout MCP 服务器。它是一个由个人开发者维护的自定义、独立构建的服务器,与 Blockscout 团队无关联,也未获得其认可。
快速开始
npx 会下载已发布的包并运行它——无需手动安装。适用于任何项目;将 CHAINS_FILE 指向该项目的 chains 文件(相对路径 ./chains.json 会相对于客户端的当前工作目录进行解析)。
{
"mcpServers": {
"blockscout": {
"command": "npx",
"args": ["-y", "blockscout-mcp-server"],
"env": {
"CHAINS_FILE": "./chains.json",
"ONLY_CHAINS_FILE": "true"
}
}
}
}链注册表和环境变量在启动时只读取一次。更改配置或代码后,请在 MCP 客户端中重启(重新连接)服务器。附带一个可直接编辑的 .mcp.example.json。
Related MCP server: Onesource MCP
支持的链
这些链开箱即用,来自捆绑的快照(src/chains/bundled.json)——无需任何配置。任何工具的 chain 参数都接受链名称(ethereum)或数字链 ID(1)。
链名称 | 链 ID | Blockscout 实例 |
| 1 | |
| 10 | |
| 100 | |
| 8453 | |
| 42161 | |
| 534352 | |
| 11155111 |
调用 get_chains_list 工具可查看运行中服务器上实际注册的链。
自定义链
将 CHAINS_FILE 指向一个描述额外链(或覆盖捆绑链)的 JSON 文件。每个条目需要 name、chainId 和 Blockscout 实例 url:
[
{ "name": "my-l2", "chainId": 42, "url": "https://scan.my-l2.io" }
]如果设置了 CHAINS_FILE 但文件缺失或格式错误,服务器会立即退出(快速失败)。
设置 ONLY_CHAINS_FILE=true 可仅注册来自 CHAINS_FILE 的链,并完全排除捆绑的快照。它要求必须设置 CHAINS_FILE(否则将不存在任何链,服务器会快速失败)。默认值(false)会将捆绑的链与 CHAINS_FILE 合并。
本地开发
MCP Inspector 已作为开发依赖接入,因此你可以在不将服务器接入真实客户端的情况下,手动走一遍 MCP 握手流程并调用工具。
git clone https://github.com/imelon2/blockscout-mcp-server.git
cd blockscout-mcp-server
pnpm install
pnpm run inspectpnpm run inspect 会先构建,然后打开 Inspector UI——选择 stdio 传输方式,并将其指向 node dist/index.js。两个快捷方式:
许可证
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseBqualityDmaintenanceAn MCP server providing comprehensive access to Ethereum blockchain data across 72+ networks via Etherscan's V2 API. It enables users to check balances, track transactions, analyze smart contracts, and monitor gas prices through natural language.24261MIT
- AlicenseAqualityCmaintenanceMCP server with 43 tools for blockchain data — token lookups, wallet balances, live chain queries across 10+ networks, and full API documentation search.27553Apache 2.0
- FlicenseAqualityDmaintenancePay-per-call MCP server for on-chain blockchain data including wallet profiles, token metrics, protocol TVL, and gas prices.5
- AlicenseAqualityBmaintenanceRead-only MCP server for Sui blockchain analytics with 44 tools covering wallets, DeFi, NFTs, token prices, transactions, fund tracing, pools, staking, Move decompilation, and MVR name resolution.181,221MIT
Related MCP Connectors
MCP server for Blockscout
Blockscout MCP — multi-chain block-explorer aggregate
Etherscan MCP — multichain block-explorer API (Etherscan V2)
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/imelon2/blockscout-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server