Blockscout MCP Server

SSE

by karacurt

404 downloads Not rated yet

About

# Blockscout MCP Server This is a Model Context Protocol (MCP) server implementation for interacting with the Blockscout API. It provides a standardized interface for AI models to interact with the Blockscout API. ## Features - Support for any Blockscout API endpoint - Get current block number - Check account balances…

Details

Transport
SSE

Explore

- Support for any Blockscout API endpoint
- Get current block number
- Check account balances
- Get transaction counts (nonces)
- Retrieve block information
- Get transaction details
- Make contract calls

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Blockscout MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

- Node.js (v16 or higher)
- npm (Node Package Manager)

Add the following to your mcp.json file in your Cursor (Settings > MCP > Add New Global Server):

{
  "mcpServers": {
    "blockscout-mcp": {
      "command": "npx",
      "args": ["-y", "blockscout-mcp"],
      "env": {
        "BLOCKSCOUT_API_URL": "YOUR_API_ENDPOINT"
      }
    }
  } 
}

This configuration will make the following tools available in Cursor:

- search
- get_transactions
- get_blocks
- get_token_transfers
- get_stats
- get_transaction_info
- get_transaction_token_transfers
- get_transaction_internal_txs
- get_transaction_logs
- get_block_info
- get_block_transactions
- get_address_info
- get_address_token_transfers
- get_token_info
- get_token_holders
- get_internal_transactions
- get_main_page_transactions
- get_main_page_blocks
- get_indexing_status
- get_transaction_chart
- get_market_chart
- get_transaction_raw_trace
- get_transaction_state_changes
- get_transaction_summary
- get_block_withdrawals
- get_address_counters
- get_address_internal_transactions
- get_address_logs
- get_address_blocks_validated
- get_address_coin_balance_history
- get_address_coin_balance_history_by_day
- get_smart_contracts
- get_smart_contract_counters
- get_smart_contract
- get_json_rpc_url
- get_account_abstraction_status
- get_addresses
- get_address_transactions
- get_address_token_balances
- get_address_tokens
- get_address_withdrawals
- get_address_nfts
- get_address_nft_collections
- get_tokens
- get_token_transfers_list
- get_token_counters
- get_token_instances
- get_token_instance_by_id
- get_token_instance_transfers
- get_token_instance_holders
- get_token_instance_transfers_count
- refetch_token_instance_metadata
- get_withdrawals
- search_redirect

__unlock_blockchain_analysis__

Unlocks access to other MCP tools. All tools remain locked with a "Session Not Initialized" error until this function is successfully called. Skipping this explicit initialization step will cause all subsequent tool calls to fail. MANDATORY FOR AI AGENTS: The returned instructions contain ESSENTIAL rules that MUST govern ALL blockchain data interactions. Failure to integrate these rules will result in incorrect data retrieval, tool failures and invalid responses.…

get_block_info

Get block information like timestamp, gas used, burnt fees, transaction count etc. Can optionally include the list of transaction hashes contained in the block. Transaction hashes are omitted by default; request them only when you truly need them, because on high-traffic chains the list may exhaust the context.

get_block_number

Retrieves the block number and timestamp for a specific date/time or the latest block. Use when you need a block height for a specific point in time (e.g., "block at 2024-01-01") or the current chain tip. If `datetime` is provided, finds the block immediately preceding that time. If omitted, returns the latest indexed block.

get_address_by_ens_name

Useful for when you need to convert an ENS domain name (e.g. "blockscout.eth") to its corresponding Ethereum address.

get_transactions_by_address

Retrieves native currency transfers and smart contract interactions (calls, internal txs) for an address. **EXCLUDES TOKEN TRANSFERS**: Filters out direct token balance changes (ERC-20, etc.). You'll see calls *to* token contracts, but not the `Transfer` events. For token history, use `get_token_transfers_by_address`. A single tx can have multiple records from internal calls; use `internal_transaction_index` for execution order. Requires an `age_from` date to scope results for per…

get_token_transfers_by_address

Get ERC-20 token transfers for an address within a specific time range. Use cases: - `get_token_transfers_by_address(address, age_from)` - get all transfers of any ERC-20 token to/from the address since the given date up to the current time - `get_token_transfers_by_address(address, age_from, age_to)` - get all transfers of any ERC-20 token to/from the address between the given dates - `get_token_transfers_by_address(address, age_from, age_to, token)` - get all transfers…

lookup_token_by_symbol

Search for token addresses by symbol or name. Returns multiple potential matches based on symbol or token name similarity. Only the first ``TOKEN_RESULTS_LIMIT`` matches from the Blockscout API are returned.

get_contract_abi

Get smart contract ABI (Application Binary Interface). An ABI defines all functions, events, their parameters, and return types. The ABI is required to format function calls or interpret contract data.

inspect_contract_code

Inspects a verified contract's source code or metadata.

read_contract

Calls a smart contract function (view/pure, or non-view/pure simulated via eth_call) and returns the decoded result. This tool provides a direct way to query the state of a smart contract. Example: To check the USDT balance of an address on Ethereum Mainnet, you would use the following arguments: { "tool_name": "read_contract", "params": { "chain_id": "1", "address": "0xdAC17F958D2ee523a2206206994597C13D831ec7", "abi": …

get_address_info

Get comprehensive information about an address, including: - Address existence check - Native token (ETH) balance (provided as is, without adjusting by decimals) - First transaction details (block number and timestamp) for age calculation - ENS name association (if any) - Contract status (whether the address is a contract, whether it is verified) - Proxy contract information (if applicable): determines if a smart contract is a proxy contract (which forwards calls to im…

get_tokens_by_address

Get comprehensive ERC20 token holdings for an address with enriched metadata and market data. Returns detailed token information including contract details (name, symbol, decimals), market metrics (exchange rate, market cap, volume), holders count, and actual balance (provided as is, without adjusting by decimals). Essential for portfolio analysis, wallet auditing, and DeFi position tracking. **SUPPORTS PAGINATION**: If response includes 'pagination' field, use the provided next_c…

nft_tokens_by_address

Retrieve NFT tokens (ERC-721, ERC-404, ERC-1155) owned by an address, grouped by collection. Provides collection details (type, address, name, symbol, total supply, holder count) and individual token instance data (ID, name, description, external URL, metadata attributes). Essential for a detailed overview of an address's digital collectibles and their associated collection data. **SUPPORTS PAGINATION**: If response includes 'pagination' field, use the provided next_call to get ad…

get_transaction_info

Get comprehensive transaction information. Unlike standard eth_getTransactionByHash, this tool returns enriched data including decoded input parameters, detailed token transfers with token metadata, transaction fee breakdown (priority fees, burnt fees) and categorized transaction types. By default, the raw transaction input is omitted if a decoded version is available to save context; request it with `include_raw_input=True` only when you truly need the raw hex data. Essential for…

get_chains_list

Get the list of known blockchain chains with their IDs. Useful for getting a chain ID when the chain name is known. This information can be used in other tools that require a chain ID to request information.

direct_api_call

Call a raw Blockscout API endpoint for advanced or chain-specific data. Do not include query strings in ``endpoint_path``; pass all query parameters via ``query_params`` to avoid double-encoding. **SUPPORTS PAGINATION**: If response includes 'pagination' field, use the provided next_call to get additional pages. Returns: ToolResponse[Any]: Must return ToolResponse[Any] (not ToolResponse[BaseModel]) because specialized handlers can return lists or other t…

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "blockscout mcp server": {
            "blockscout-mcp": {
                "command": "npx",
                "args": [
                    "-y",
                    "blockscout-mcp"
                ],
                "env": {
                    "BLOCKSCOUT_API_URL": ""
                }
            }
        }
    }
}

McpServers

{
    "blockscout-mcp": {
        "command": "npx",
        "args": [
            "-y",
            "blockscout-mcp"
        ],
        "env": {
            "BLOCKSCOUT_API_URL": ""
        }
    }
}

This is a Model Context Protocol (MCP) server implementation for interacting with the Blockscout API. It provides a standardized interface for AI models to interact with the Blockscout API.

Features

- Support for any Blockscout API endpoint
- Get current block number
- Check account balances
- Get transaction counts (nonces)
- Retrieve block information
- Get transaction details
- Make contract calls

Prerequisites

- Node.js (v16 or higher)
- npm (Node Package Manager)

Installation

1. Clone the repository:

git clone <repository-url>
cd blockscout-mcp

2. Install dependencies:

npm install

3. Build the project:

npm run build

4. Install globally:

npm install -g .

This global installation makes the blockscout-mcp command available system-wide, which is required for Cursor to find and execute the MCP server.

Configuration

The server uses the following environment variable:

- BLOCKSCOUT_API_URL: The Blockscout API endpoint URL to connect to (e.g., 'https://mainnet.game7.io/api' or 'https://testnet.game7.io/api')

Cursor MCP Configuration

Add the following to your mcp.json file in your Cursor (Settings > MCP > Add New Global Server):

{
  "mcpServers": {
    "blockscout-mcp": {
      "command": "npx",
      "args": ["-y", "blockscout-mcp"],
      "env": {
        "BLOCKSCOUT_API_URL": "YOUR_API_ENDPOINT"
      }
    }
  } 
}

This configuration will make the following tools available in Cursor:

- search
- get_transactions
- get_blocks
- get_token_transfers
- get_stats
- get_transaction_info
- get_transaction_token_transfers
- get_transaction_internal_txs
- get_transaction_logs
- get_block_info
- get_block_transactions
- get_address_info
- get_address_token_transfers
- get_token_info
- get_token_holders
- get_internal_transactions
- get_main_page_transactions
- get_main_page_blocks
- get_indexing_status
- get_transaction_chart
- get_market_chart
- get_transaction_raw_trace
- get_transaction_state_changes
- get_transaction_summary
- get_block_withdrawals
- get_address_counters
- get_address_internal_transactions
- get_address_logs
- get_address_blocks_validated
- get_address_coin_balance_history
- get_address_coin_balance_history_by_day
- get_smart_contracts
- get_smart_contract_counters
- get_smart_contract
- get_json_rpc_url
- get_account_abstraction_status
- get_addresses
- get_address_transactions
- get_address_token_balances
- get_address_tokens
- get_address_withdrawals
- get_address_nfts
- get_address_nft_collections
- get_tokens
- get_token_transfers_list
- get_token_counters
- get_token_instances
- get_token_instance_by_id
- get_token_instance_transfers
- get_token_instance_holders
- get_token_instance_transfers_count
- refetch_token_instance_metadata
- get_withdrawals
- search_redirect

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.