Labsco
blockscout logo

Blockscout

β˜… 40

from blockscout

Access blockchain data like balances, tokens, and NFTs from Blockscout APIs. Supports multi-chain and progress notifications.

πŸ”₯πŸ”₯πŸ”₯πŸ”₯βœ“ VerifiedPaid serviceAdvanced setup

Blockscout MCP Server

smithery badge

<a href="https://glama.ai/mcp/servers/@blockscout/mcp-server"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@blockscout/mcp-server/badge" alt="Blockscout Server MCP server" /> </a>

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.

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:

{
  "mcpServers": {
    "blockscout": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "ghcr.io/blockscout/mcp-server:latest"
      ]
    }
  }
}

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

  1. __unlock_blockchain_analysis__() - Provides custom instructions for the MCP host to use the server. This is a mandatory first step before using other tools.
  2. get_chains_list(query=None) - Returns a list of supported chains, with optional filtering by name, chain ID, native currency, or ecosystem.
  3. get_address_by_ens_name(name) - Converts an ENS domain name to its corresponding Ethereum address.
  4. lookup_token_by_symbol(chain_id, symbol) - Searches for token addresses by symbol or name, returning multiple potential matches.
  5. get_contract_abi(chain_id, address) - Retrieves the ABI (Application Binary Interface) for a smart contract.
  6. inspect_contract_code(chain_id, address, file_name=None) - Allows getting the source files of verified contracts.
  7. get_address_info(chain_id, address) - Gets comprehensive information about an address including balance, ENS association, contract status, token details, and public tags.
  8. get_tokens_by_address(chain_id, address, cursor=None) - Returns detailed ERC20 token holdings for an address with enriched metadata and market data.
  9. get_block_number(chain_id, [datetime]) - Retrieves the block number and timestamp for a specific date/time or the latest block.
  10. 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.
  11. 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.
  12. nft_tokens_by_address(chain_id, address, cursor=None) - Retrieves NFT tokens owned by an address, grouped by collection.
  13. 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.
  14. get_transaction_info(chain_id, hash, include_raw_input=False) - Gets comprehensive transaction information with decoded input parameters and detailed token transfers.
  15. read_contract(chain_id, address, abi, function_name, args='[]', block='latest') - Executes a read-only smart contract function and returns its result. The abi argument is a JSON object describing the specific function's signature.
  16. 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

Is any approval set for OP token on Optimism chain by `zeaver.eth`?
Calculate the total gas fees paid on Ethereum by address `0xcafe...cafe` in May 2025.
Which 10 most recent logs were emitted by `0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7`
before `Nov 08 2024 04:21:35 AM (-06:00Β UTC)`?
Tell me more about the transaction `0xf8a55721f7e2dcf85690aaf81519f7bc820bc58a878fa5f81b12aef5ccda0efb`
on Redstone rollup.
Is there any blacklisting functionality of USDT token on Arbitrum One?
What is the latest block on Gnosis Chain and who is the block minter?
Were any funds moved from this minter recently?
When the most recent reward distribution of Kinto token was made to the wallet
`0x7D467D99028199D99B1c91850C4dea0c82aDDF52` in Kinto chain?
Which methods of `0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6` on the Ethereum 
mainnet could emit `SequencerBatchDelivered`?
What is the most recent executed cross-chain message sent from the Arbitrum Sepolia
rollup to the base layer?

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 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:

export BLOCKSCOUT_DISABLE_COMMUNITY_TELEMETRY=true