
Blockscout Mcp Server
ai.smithery由 smithery.ai 發布官方發布者v1.13.1更新於 Oct 27, 2026
Provide AI agents and automation tools with contextual access to blockchain data including balance…
發布方自己的服務:222wcnm Bilistalkermcp
概覽
Blockscout MCP 伺服器讓助理取得多鏈區塊鏈資料:餘額、代幣、NFT、合約、區塊與交易。
- 可以做什麼
- 初始化工作階段並列出支援的鏈,解析 ENS 名稱、依符號查詢代幣
- 查詢地址資訊:餘額、ENS 關聯、合約狀態、ERC-20 持倉與 NFT
- 讀取區塊與交易,包含解碼後的輸入、代幣轉帳與 gas 資料
- 檢視已驗證合約的原始碼與 ABI,並呼叫唯讀合約函式
- 呼叫原始 Blockscout API 端點取得進階或特定鏈的資料
- 適用情境
- 適合需要跨多條鏈回答鏈上問題的情境,例如代幣授權、gas 費用、交易細節、合約方法或 NFT 持倉,不必離開聊天或 IDE。
- 執行需求
- 需要遠端端點(託管伺服器)或自行部署的 Python/Docker 服務。多數資料工具需要 Blockscout PRO API 金鑰,透過 Blockscout-MCP-Pro-Api-Key 標頭提供(也接受 x-api-key 作為別名),自架時可用 BLOCKSCOUT_PRO_API_KEY 環境變數。需要連線至 Blockscout API 的網路。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Blockscout Mcp Server,將其新增到工作區。
- 連接 所需的 憑證。它們會被私密儲存,絕不會在公開頁面上展示。
- 為需要使用其工具的對話啟用該服務。
Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。
交給代理程式安裝
把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。
閱讀 https://sourceweft.com/mcp/ai.smithery%2Fblockscout-mcp-server/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。其他 MCP 客戶端
把它新增到你客戶端的 mcpServers 設定中。 客戶端會在首次連接時完成 OAuth 登入。
{
"mcpServers": {
"blockscout": {
"type": "http",
"url": "https://server.smithery.ai/@blockscout/mcp-server/mcp"
}
}
}README
Blockscout MCP Server
[Blockscout Server MCP server]The Model Context Protocol (MCP) is an open protocol designed to allow AI agents, IDEs, and automation tools to consume, query, and analyze structured data through context-aware APIs.
This server wraps Blockscout APIs and exposes blockchain data—balances, tokens, NFTs, contract metadata—via MCP so that AI agents and tools (like Claude, Cursor, or IDEs) can access and analyze it contextually.
Key Features:
- Contextual blockchain data access for AI tools
- Multi-chain support via Blockscout PRO API configuration with Chainscout metadata enrichment
- Versioned REST API: Provides a standard, web-friendly interface to all MCP tools. See API.md for full documentation.
- Custom instructions for MCP host to use the server
- Intelligent context optimization to conserve LLM tokens while preserving data accessibility
- Smart response slicing with configurable page sizes to prevent context overflow
- Opaque cursor pagination using Base64URL-encoded strings instead of complex parameters
- Automatic truncation of large data fields with clear indicators and access guidance
- Standardized ToolResponse model with structured JSON responses and follow-up instructions
- Enhanced observability with MCP progress notifications and periodic updates for long-running operations
Enhanced Analysis with Agent Skills
For more powerful and efficient blockchain analysis, install the Blockscout Analysis skill from the agent-skills repository. This skill provides AI agents with structured guidance for execution strategies, response handling, security best practices, and workflow orchestration.
Learn more: See the agent-skills README for full capabilities and installation instructions.
Configuring MCP Clients
Blockscout PRO API Key
Configuring the Blockscout MCP server with an AI agent requires a Blockscout PRO API key. Most of the data tools route their requests through the authenticated Blockscout PRO API gateway, so without a valid key those tools fail fast before making any upstream request.
To obtain a key, register on the Blockscout Developer Portal (the free tier does not require a credit card) and generate an API key; keys are prefixed proapi_. Then supply it when configuring your client, as shown in the sections below.
Claude Setup (Web, Desktop, Cowork) - Recommended
The easiest way to use the Blockscout MCP server with Claude is the official hosted server: a native, managed installation experience with automatic updates and nothing to run yourself. Add it as a Custom Connector with your own PRO API key. Claude sends the key on every request in an x-api-key header, which the server accepts as an alias for its Blockscout-MCP-Pro-Api-Key header.
- Open Claude and go to Customize > Connectors. On Team and Enterprise plans an organization Owner does this under Organization settings > Connectors.
- Click Add custom connector. Set the name to
Blockscoutand the URL tohttps://mcp.blockscout.com/mcp, then continue. - Leave Authentication as
None(Claude detects it). A warning that the connector has no credentials is expected: the key is supplied in the next step. - Open Request headers, select
x-api-keyfrom the list, and paste your PRO API key as the value. Pick exactly this name; the server does not read the other similar-looking names in the list. - Click Add.
Note: The Request headers section is in beta and is not yet available to every organization. If your dialog does not show it, use the Connectors Directory below.
Note: On Team and Enterprise plans the key is entered once by the Owner and shared by the whole organization. Authentication settings cannot be edited after a connector is added: to change the key, remove the connector and add it again.
Using Claude Connectors Directory
If the Custom Connector dialog has no Request headers section, install the Blockscout connector from the official Anthropic Connectors Directory. It connects to the same hosted server but uses a shared access key.
Installation
Option 1: Direct Link
Visit claude.com/connectors/blockscout and click links in "Used in" section to install the Blockscout connector.
Option 2: Via Settings
- Open Claude (Web or Desktop app)
- Go to Settings > Connectors > Browse connectors
- Search for "Blockscout"
- Click "Connect" to install
Limitations: Due to the use of a shared access key, there may be restrictions on connector access and capabilities.
Claude Code Setup
Pass your PRO API key via the Blockscout-MCP-Pro-Api-Key header when adding the server:
After running this command, Blockscout will be available as an MCP server in Claude Code, allowing you to access and analyze blockchain data directly from your coding environment.
ChatGPT Apps Setup
Install the Blockscout app from the ChatGPT Apps marketplace:
- Open the Blockscout app page (or search for "Blockscout" in the ChatGPT Apps directory).
- Click "Connect" to enable the app for your ChatGPT account.
Codex App Setup
- Open Codex and go to Settings > MCP Servers > Add server.
- Set Name to
Blockscout, select the Streamable HTTP tab, and set URL tohttps://mcp.blockscout.com/mcp. - Under Headers, add a header with key
Blockscout-MCP-Pro-Api-Keyand valueproapi_your_key_here. - Save and restart the Codex app.
Codex CLI Setup
Codex CLI cannot attach a custom header from the command line, so configure it in two steps:
-
Scaffold the server entry:
-
Edit
~/.codex/config.tomlto add the PRO API key header and enable the streamable-HTTP MCP client (required for remote MCP servers to connect). The resulting configuration should look like this:
Cursor Setup
Add the server to your Cursor MCP configuration — either the project-level .cursor/mcp.json or the global ~/.cursor/mcp.json — supplying your PRO API key via the Blockscout-MCP-Pro-Api-Key header:
Local Development Setup (For Developers)
If you want to run the server locally for development purposes:
Technical details
Refer to SPEC.md for the technical details.
Repository Structure
Refer to AGENTS.md for the repository structure.
Testing
Refer to TESTING.md for comprehensive instructions on running both unit and integration tests.
Tool Descriptions
__unlock_blockchain_analysis__()- Initializes a Blockscout MCP session: returns server reference data, theblockscout-analysisskill pointer, and the URI resolution rule. Call it once per session, before any other tool.get_chains_list(query=None)- Returns a list of supported chains, with optional filtering by name, chain ID, native currency, or ecosystem.get_address_by_ens_name(name)- Converts an ENS domain name to its corresponding Ethereum address.lookup_token_by_symbol(chain_id, symbol)- Searches for token addresses by symbol or name, returning multiple potential matches.get_contract_abi(chain_id, address)- Retrieves the ABI (Application Binary Interface) for a smart contract.inspect_contract_code(chain_id, address, file_name=None)- Allows getting the source files of verified contracts.get_address_info(chain_id, address)- Gets comprehensive information about an address including balance, ENS association, contract status, token details, and public tags.get_tokens_by_address(chain_id, address, cursor=None)- Returns detailed ERC20 token holdings for an address with enriched metadata and market data.get_block_number(chain_id, [datetime])- Retrieves the block number and timestamp for a specific date/time or the latest block.get_transactions_by_address(chain_id, address, age_from, age_to, methods, cursor=None)- Gets transactions for an address within a specific time range with optional method filtering.get_token_transfers_by_address(chain_id, address, age_from, age_to, token, cursor=None)- Returns ERC-20 token transfers for an address within a specific time range.nft_tokens_by_address(chain_id, address, cursor=None)- Retrieves NFT tokens owned by an address, grouped by collection.get_block_info(chain_id, number_or_hash, include_transactions=False)- Returns block information including timestamp, gas used, burnt fees, and transaction count. Can optionally include a list of transaction hashes.get_transaction_info(chain_id, hash, include_raw_input=False)- Gets comprehensive transaction information with decoded input parameters and detailed token transfers.read_contract(chain_id, address, abi, function_name, args='[]', block='latest')- Executes a read-only smart contract function and returns its result. Theabiargument is a JSON object describing the specific function's signature.direct_api_call(chain_id, endpoint_path, query_params=None, cursor=None, method='GET', json_body=None)- Calls a raw Blockscout API endpoint for advanced or chain-specific data. Supports GET (default) and POST requests with JSON body.
Example Prompts for AI Agents
Development & Deployment
Local Installation
Clone the repository and install dependencies:
To customize the leading part of the User-Agent header used for RPC requests,
set the BLOCKSCOUT_MCP_USER_AGENT environment variable (defaults to
"Blockscout MCP"). The server version is appended automatically.
Providing the PRO API Key to the Server
When you run the server yourself, provide the Blockscout PRO API key through the BLOCKSCOUT_PRO_API_KEY environment variable — exported in your shell or placed in a gitignored .env file in the project root. This enables all data access, public-tag enrichment, and contract reads. Never commit the key or embed it in a client-shipped binary; when running via Docker, pass it at runtime (e.g. -e BLOCKSCOUT_PRO_API_KEY=...) rather than baking it into the image.
Client-supplied keys (HTTP transports). When the server runs in HTTP mode, a client can supply its own PRO API key in a request header — by default Blockscout-MCP-Pro-Api-Key, configurable via BLOCKSCOUT_PRO_API_KEY_HEADER (set it to an empty string to disable client-supplied keys entirely). The server also reads the key from an x-api-key header, for clients whose header names are restricted to a fixed list (for example Claude Custom Connectors). The configured header wins when both are present; x-api-key is consulted only when the configured header is missing or blank, and disabling client-supplied keys disables it too. This works the same way for both HTTP transports — MCP-over-HTTP tool calls and the REST API. A client-supplied key takes precedence over BLOCKSCOUT_PRO_API_KEY for that request; if the client sends no key, the server falls back to its own configured key; if neither is present, the request fails with the not-configured error. A client key that is present but malformed fails any request that needs the PRO API with no fallback (the server never silently uses its own key in place of a bad client key); tools that don't use the PRO API are unaffected. This makes it possible to run a shared HTTP server where each client authenticates with its own key.
Low-credit warning. Access to the PRO API is metered in credits. When the remaining balance reported by the API drops below a configurable threshold, every data tool appends an advisory note to its response, prompting operators to top up so PRO API access stays ready for continued high-volume usage. The threshold is set via BLOCKSCOUT_PRO_API_LOW_CREDITS_THRESHOLD (default 5000 credits; set to 0 to disable the note). The note fires for any balance below the threshold, including zero and negative balances.
PRO API key requirement notice. BLOCKSCOUT_PRO_API_KEY_REQUIRED_NOTICE holds an operator-configured notice that the server appends as the last entry of the notes field of tool responses whose requests did not carry the client's own (well-formed) PRO API key. It exists to announce the official public server's migration to mandatory client-supplied keys, so only the official deployment is expected to set it. When the variable is unset or empty (the default), the feature is completely off. Community and self-hosted operators should leave it empty — in particular in stdio mode, where you configure BLOCKSCOUT_PRO_API_KEY yourself and no request header can carry a client key, the notice would only repeat a migration message that does not apply to your deployment.
Running the Server
The server runs in stdio mode by default:
HTTP Mode (MCP only):
To run the server in HTTP Streamable mode (stateless, SSE responses by default):
You can also specify the host and port for the HTTP server:
Development Mode (Plain JSON Responses):
For development and testing with simple HTTP clients (curl, Insomnia), you can enable plain JSON responses instead of SSE streams:
Note: This disables Server-Sent Events (SSE) and progress notifications. Only use this for local testing and debugging.
Tunneling with Ngrok (Development Mode):
The Python MCP SDK enforces DNS rebinding protection, which blocks requests from ngrok tunnels by default. To enable tunneling for development and testing:
-
Start an ngrok tunnel to your local server:
-
Configure the allowed host and origin using your ngrok URL:
Note: These settings are primarily for development use. When these variables are not set, DNS rebinding protection
is automatically determined by the server's bind host: enabled for localhost, disabled for non-localhost (e.g.,
0.0.0.0). If your Host header includes a non-standard port, use the :* wildcard suffix (e.g.,
"example.com:*") or specify the exact host:port value.
For more details on ngrok tunneling with MCP servers, see the OpenAI Apps SDK Examples documentation.
HTTP Mode with REST API:
To enable the versioned REST API alongside the MCP endpoint, use the --rest flag (which requires --http).
With custom host and port:
CLI Options:
--http: Enables HTTP Streamable mode.--http-host TEXT: Host to bind the HTTP server to (default:127.0.0.1).--http-port INTEGER: Port for the HTTP server (default:8000).--rest: Enables the REST API (requires--http).
Building Docker Image Locally
Initialize the bundled skill submodule, bake its commit metadata into the Docker build context, then build the image:
Pulling from GitHub Container Registry
Pull the pre-built image:
Running with Docker
HTTP Mode (MCP only):
To run the Docker container in HTTP mode with port mapping:
With custom port:
HTTP Mode with REST API:
To run with the REST API enabled:
Note: When running in HTTP mode with Docker, use --http-host 0.0.0.0 to bind to all interfaces so the server is accessible from outside the container.
With a Blockscout PRO API Key:
Pass the key at runtime with -e rather than baking it into the image (see Providing the PRO API Key to the Server):
With session metering enabled (optional):
Session metering limits how many tool calls a caller without a client-supplied PRO API key may make per session identifier issued by __unlock_blockchain_analysis__. It is off by default. Enabling it means setting a signing secret (at least 32 bytes — generate it, don't invent it), and it requires HTTP mode and a server-side PRO API key (metered calls are served upstream on it), plus a persistent volume for the session database. Generate the secret once and store it durably (a secret manager, or persistent environment configuration); every restart and redeploy must pass the same stored value:
Most deployments do not need any of this: leave BLOCKSCOUT_SESSION_SECRET unset (the default) and no volume is required. Losing the volume or rotating the secret invalidates live session identifiers by design; the exposure is bounded by the configured TTL. Re-generating the secret inline on every docker run is the accidental form of that rotation — it wipes all live identifiers on each restart even though the database volume survived, so never embed the generation command in the start command. Restoring an older copy of the database revives the budgets it recorded — after a historical restore, rotate the secret unless that is intended. Optional knobs: BLOCKSCOUT_SESSION_MCP_MAX_CALLS and BLOCKSCOUT_SESSION_REST_MAX_CALLS (per-surface call ceilings over one shared per-identifier counter; both default 5; 0 closes metered access on that surface while leaving identifier issuance and get_chains_list navigation open), BLOCKSCOUT_SESSION_TTL_SECONDS (default 900), and BLOCKSCOUT_SESSION_SWEEP_INTERVAL_SECONDS (how often expired session rows are cleaned up; default: once per TTL).
Stdio Mode: The default stdio mode is designed for use with MCP hosts/clients (like Claude Desktop, Cursor) and doesn't make sense to run directly with Docker without an MCP client managing the communication.
Testing with Claude Desktop
Use MCP bundle to test the server with Claude Desktop.
- Build the bundle as per instructions in mcpb/README.md.
- Open Claude Desktop.
- Double-click to open the
blockscout-mcp-dev.mcpbfile to automatically install the bundle. - Configure the Blockscout MCP Server URL when prompted (default:
http://127.0.0.1:8000/mcp)
Privacy and Anonymous Telemetry
To help us improve the Blockscout MCP Server, community-run instances of the server collect anonymous usage data by default. This helps us understand which tools are most popular and guides our development efforts.
What we collect:
- The name of the tool being called (e.g.,
get_block_number). - The parameters provided to the tool (the
session_idparameter is masked to a placeholder before transmission). - The version of the Blockscout MCP Server being used.
- A one-way, non-reversible hash (SHA-256) of the PRO API key available to authorize the request, when one is present. This is a derived fingerprint only — the key itself is never transmitted and cannot be recovered from the hash.
What we DO NOT collect:
- We do not collect any personal data, IP addresses (the central server uses the sender's IP for geolocation via Mixpanel and then discards it), or secrets and private keys themselves. The PRO API key in particular is never transmitted — only its one-way, non-reversible fingerprint described above, from which the key cannot be recovered.
How to Opt-Out
You can disable this feature at any time by setting the following environment variable:
License
[License: Blockscout Software Licence]
This project is licensed under the Blockscout Software Licence. See the LICENSE file for full terms.
來源:README.md,提交 095ef2c
工具
0版本歷史
1- v1.13.1最新Sep 16, 2026
評分
已滿足適用檢查項的 75%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通必需25 分
- 已宣告認證方式必需10 分
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。
其他 Smithery 整合

222wcnm Bilistalkermcp
ai.smithery官方發布者
Bilibili 創作者分析伺服器,讓助理查詢指定使用者的個人資料、影片、動態、專欄、字幕、追蹤清單與留言。

Zwldarren Akshare One Mcp
ai.smithery官方發布者
遠端 MCP 伺服器,讓助理以唯讀方式取得中國股市資料:歷史與即時行情、新聞和財務報表。

Zhaoganghao Hellomcp
ai.smithery官方發布者
一個小型遠端 MCP 伺服器,讓助理依名字向人問候,並介紹「Hello, World」的由來。

Zeta Chain Cli
ai.smithery官方發布者
一個遠端 MCP 伺服器,讓助理為任意姓名或受眾產生友善、可自訂的問候語。

Yuna0x0 Hackmd Mcp
ai.smithery官方發布者
一個連接 HackMD API 的 MCP 伺服器,讓助理讀取、建立、更新和刪除 HackMD 筆記並管理團隊。