The Blockscout MCP Server provides contextual blockchain data access for AI agents and tools via the Model Context Protocol (MCP). You can:
Access Multi-Chain Data: Retrieve blockchain data across multiple chains, including balances, tokens, NFTs, and contract metadata
Resolve ENS Names: Convert ENS domain names to Ethereum addresses
Analyze Smart Contracts: Fetch contract ABIs and detailed information
Examine Transactions: Get comprehensive transaction data with human-readable summaries and decoded logs
Track Token Activity: View ERC-20 transfers and NFT holdings for specific addresses
Query Block Information: Access detailed block data including timestamps, gas, and fees
Monitor Address Activity: Get transaction history, token holdings, and ENS names
Search Tokens: Find token addresses by symbol or name
Set Custom Instructions: Provide specific guidance for MCP hosts to use the server effectively
Blockscout 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 getting Blockscout instance URLs from Chainscout
- 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
Configuring MCP Clients
Using the Claude Desktop Extension (.dxt) - Recommended
The easiest way to use the Blockscout MCP server with Claude Desktop is through the official Desktop Extension. This provides a seamless, one-click installation experience.
Installation:
- Download the latest
blockscout-mcp.dxt
file from the releases page. - Open Claude Desktop.
- Double click to open the
.dxt
file to automatically install the extension. - Check Settings -> Extensions if you experience any issues. You can also drag and drop .DXT files into the extensions window to view and install.
Using the Official Blockscout MCP Server
The official cloud-hosted instance at https://mcp.blockscout.com/mcp
provides a reliable, always-updated service.
Claude Desktop Setup:
Note: Docker is required for this setup
- Open Claude Desktop and click on Settings
- Navigate to the "Developer" section
- Click "Edit Config"
- Open the file
claude_desktop_config.json
and configure the server: - Save the file and restart Claude Desktop
- When chatting with Claude, you can now enable the Blockscout MCP Server to allow Claude to access blockchain data
Cursor Setup:
Use this deeplink to install the Blockscout MCP server in Cursor.
Gemini CLI Setup:
- Add the following configuration to your
~/.gemini/settings.json
file: - For detailed Gemini CLI MCP server configuration instructions, see the official documentation.
Try Blockscout X-Ray GPT
Experience the power of the Blockscout MCP server through our showcase GPT: Blockscout X-Ray
This GPT demonstrates the full capabilities of the MCP server, providing intelligent blockchain analysis and insights. It's a great way to explore what's possible when AI agents have contextual access to blockchain data.
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__()
- Provides custom instructions for the MCP host to use the server. This is a mandatory first step before using other tools.get_chains_list()
- Returns a list of all known chains.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_latest_block(chain_id)
- Returns the latest indexed block number and timestamp.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.transaction_summary(chain_id, hash)
- Provides human-readable transaction summaries using Blockscout Transaction Interpreter.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.get_transaction_logs(chain_id, hash, cursor=None)
- Returns transaction logs with decoded event data.read_contract(chain_id, address, abi, function_name, args='[]', block='latest')
- Executes a read-only smart contract function and returns its result. Theabi
argument is a JSON object describing the specific function's signature.direct_api_call(chain_id, endpoint_path, query_params=None, cursor=None)
- Calls a curated raw Blockscout API endpoint for specialized or chain-specific data.
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.
Running the Server
The server runs in stdio
mode by default:
HTTP Mode (MCP only):
To run the server in HTTP Streamable mode (stateless, JSON responses):
You can also specify the host and port for the HTTP server:
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
Build the Docker image with the official tag:
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.
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.
License
This project is primarily distributed under the terms of the MIT license. See LICENSE for details.
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
A server that exposes blockchain data (balances, tokens, NFTs, contract metadata) via the Model Context Protocol, enabling AI agents and tools to access and analyze blockchain information contextually.
Related MCP Servers
- -securityFlicense-qualityA Model Context Protocol server providing tools for querying Bitcoin blockchain data via Blockchain Data and Query APIs, supporting various BTC information retrieval functions.Last updated -1
- AsecurityAlicenseAqualityA Model Context Protocol server that enables AI agents to interact with 30+ Ethereum-compatible blockchain networks, providing services like token transfers, contract interactions, and ENS resolution through a unified interface.Last updated -282,922307MIT License
- -securityFlicense-qualityA Model Context Protocol server that enables AI assistants to access Flow blockchain data and perform operations such as checking balances, resolving domains, executing scripts, and submitting transactions.Last updated -1
Satstream MCP Serverofficial
AsecurityAlicenseAqualityA Model Context Protocol server that enables querying Bitcoin blockchain data, including address information, transaction details, mempool statistics, and ordinals/runes data through the Satstream API.Last updated -37MIT License