### Start MCP Server (Local Installation) Source: https://github.com/blockscout/mcp-server/blob/main/TESTING.md Start the MCP server locally with HTTP and REST flags enabled. Ensure Python and blockscout-mcp-server are installed. ```bash python -m blockscout_mcp_server --http --rest --http-port 8000 ``` -------------------------------- ### REST API Tool Discovery and Examples Source: https://github.com/blockscout/mcp-server/blob/main/blockscout_mcp_server/llms.txt Demonstrates how to discover available tools and provides example GET requests for the Blockscout MCP Server's REST API. Use the `/v1/tools` endpoint for a full list and specific examples for querying chain data. ```http GET /v1/tools ``` ```http GET /v1/get_block_number?chain_id=1 ``` ```http GET /v1/get_address_info?chain_id=1&address=0x... ``` ```http GET /v1/get_transactions_by_address?chain_id=1&address=0x...&age_from=7d ``` -------------------------------- ### Local Installation Source: https://github.com/blockscout/mcp-server/blob/main/README.md Instructions for cloning the repository and installing the necessary dependencies for local development. ```APIDOC ## Local Installation Clone the repository and install dependencies: ```bash git clone https://github.com/blockscout/mcp-server.git cd mcp-server uv pip install -e . # or `pip install -e .` ``` 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. ``` -------------------------------- ### Local Installation of MCP Server Source: https://github.com/blockscout/mcp-server/blob/main/README.md Installs the MCP Server by cloning the repository and installing its dependencies using uv or pip. ```bash git clone https://github.com/blockscout/mcp-server.git cd mcp-server uv pip install -e . # or `pip install -e .` ``` -------------------------------- ### Interactive Docker Session for Manual Build Source: https://github.com/blockscout/mcp-server/blob/main/mcpb/README.md Start an interactive Docker session to perform manual build steps. This is required if you don't have Node.js installed locally. ```shell docker run --rm -it -v "$(pwd)"/mcpb:/workspace -w /workspace node:20-slim bash ``` -------------------------------- ### Install mcp-publisher CLI Source: https://github.com/blockscout/mcp-server/blob/main/MCP-REGISTRY-README.md Download and install the mcp-publisher CLI tool. This command automatically detects your OS and architecture. ```bash curl -L "https://github.com/modelcontextprotocol/registry/releases/latest/download/mcp-publisher_$(uname -s | tr '[:upper:]' '[:lower:]')_$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/').tar.gz" | tar xz mcp-publisher && sudo mv mcp-publisher /usr/local/bin/ ``` -------------------------------- ### Output File Examples Source: https://github.com/blockscout/mcp-server/blob/main/tests/evals/README.md Examples of the debug and output files generated after a test run, including their naming convention and typical location. ```plaintext results/eval-004-2026-01-20-17-50-59.json # Debug file with raw API trace results/eval-004-output-2026-01-20-17-50-59.json # Output file with final result and stats ``` -------------------------------- ### Run All Unit Tests Source: https://github.com/blockscout/mcp-server/blob/main/TESTING.md Execute all unit tests in the project. Ensure you have the project installed in development mode and test dependencies installed. ```bash pytest ``` -------------------------------- ### MCP JSON-RPC: Get Server Instructions Source: https://github.com/blockscout/mcp-server/blob/main/TESTING.md Call the 'tools/call' method with '__unlock_blockchain_analysis__' to get server instructions. This requires an empty arguments object. ```bash curl --request POST \ --url http://127.0.0.1:8000/mcp \ --header 'Content-Type: application/json' \ --header 'Accept: application/json, text/event-stream' \ --data '{\ "jsonrpc": "2.0",\ "id": 1,\ "method": "tools/call",\ "params": {\ "name": "__unlock_blockchain_analysis__",\ "arguments": {}\ } }' ``` -------------------------------- ### Install MCPB CLI Source: https://github.com/blockscout/mcp-server/blob/main/mcpb/README.md Install the MCPB CLI globally using npm. This tool is necessary for packaging and verifying the MCP bundle. ```shell npm install -g @anthropic-ai/mcpb ``` -------------------------------- ### Install OpenSSL in Docker Source: https://github.com/blockscout/mcp-server/blob/main/mcpb/README.md Install the OpenSSL package within the interactive Docker session. This is a prerequisite for certain build steps. ```shell apt-get update apt-get install -y openssl ``` -------------------------------- ### Example Prompts for AI Agents Source: https://github.com/blockscout/mcp-server/blob/main/README.md Illustrative prompts demonstrating how to interact with the MCP Server API for various blockchain data queries. ```APIDOC ## 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? ``` -------------------------------- ### GET /v1/tools Source: https://github.com/blockscout/mcp-server/blob/main/blockscout_mcp_server/llms.txt Retrieves a list of all available tools and their descriptions. ```APIDOC ## GET /v1/tools ### Description Retrieves a list of all available tools and their descriptions. ### Method GET ### Endpoint /v1/tools ### Response #### Success Response (200) - **tools** (array) - A list of available tools, each with a name, description, and parameters. ``` -------------------------------- ### Gemini CLI Setup for Blockscout MCP Server Source: https://github.com/blockscout/mcp-server/blob/main/blockscout_mcp_server/templates/index.html Configuration details for integrating the Blockscout MCP server with the Gemini CLI. ```APIDOC ## Gemini CLI Setup To configure the Blockscout MCP server with Gemini CLI, add the following to your `~/.gemini/settings.json` file: ```json { "mcpServers": { "blockscout": { "httpUrl": "https://mcp.blockscout.com/mcp", "timeout": 180000 } } } ``` For detailed Gemini CLI MCP server configuration instructions, see the [official documentation](https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md). **Note:** Consider adding system prompts from `GEMINI.md` for enhanced blockchain analysis capabilities. ``` -------------------------------- ### Example Pagination Object Source: https://github.com/blockscout/mcp-server/blob/main/API.md This object contains information required to retrieve the next page of results for paginated endpoints. ```json { "pagination": { "next_call": { "tool_name": "get_tokens_by_address", "params": { "chain_id": "1", "address": "0x...", "cursor": "eyJibG9ja19udW1iZXIiOjE4OTk5OTk5LCJpbmRleCI6NDJ9" } } } } ``` -------------------------------- ### Example Prompt for Token Blacklisting Functionality Check Source: https://github.com/blockscout/mcp-server/blob/main/README.md This prompt inquires about the existence of blacklisting functionality for a specific token on a given chain. ```plaintext Is there any blacklisting functionality of USDT token on Arbitrum One? ``` -------------------------------- ### Example Prompt for Transaction Information Source: https://github.com/blockscout/mcp-server/blob/main/README.md This prompt requests detailed information about a specific transaction identified by its hash on a particular rollup. ```plaintext Tell me more about the transaction `0xf8a55721f7e2dcf85690aaf81519f7bc820bc58a878fa5f81b12aef5ccda0efb` on Redstone rollup. ``` -------------------------------- ### Example Prompt for Contract Event Emission Source: https://github.com/blockscout/mcp-server/blob/main/README.md This prompt asks which methods of a contract on a specific network could emit a particular event. ```plaintext Which methods of `0x1c479675ad559DC151F6Ec7ed3FbF8ceE79582B6` on the Ethereum mainnet could emit `SequencerBatchDelivered`? ``` -------------------------------- ### Example Prompt for Recent Log Retrieval Source: https://github.com/blockscout/mcp-server/blob/main/README.md This prompt asks for the most recent logs emitted by a specific contract address before a given timestamp. ```plaintext Which 10 most recent logs were emitted by `0xFe89cc7aBB2C4183683ab71653C4cdc9B02D44b7` before `Nov 08 2024 04:21:35 AM (-06:00 UTC)`? ``` -------------------------------- ### Example .env file for local development Source: https://github.com/blockscout/mcp-server/blob/main/AGENTS.md This file provides a template for environment variables required for local development. Configure these variables to connect to Blockscout APIs and set timeouts. ```env BLOCKSCOUT_BS_API_KEY="" BLOCKSCOUT_BS_TIMEOUT=10 BLOCKSCOUT_BENS_URL="" BLOCKSCOUT_BENS_TIMEOUT=10 BLOCKSCOUT_METADATA_URL="" BLOCKSCOUT_METADATA_TIMEOUT=10 BLOCKSCOUT_CHAINSCOUT_URL="" BLOCKSCOUT_CHAINSCOUT_TIMEOUT=10 BLOCKSCOUT_CHAIN_CACHE_TTL_SECONDS=3600 BLOCKSCOUT_CHAINS_LIST_TTL_SECONDS=3600 BLOCKSCOUT_PROGRESS_INTERVAL_SECONDS=5 BLOCKSCOUT_NFT_PAGE_SIZE=10 BLOCKSCOUT_LOGS_PAGE_SIZE=10 BLOCKSCOUT_ADVANCED_FILTERS_PAGE_SIZE=10 ``` -------------------------------- ### REST API: Get Block Info (Error Case) Source: https://github.com/blockscout/mcp-server/blob/main/TESTING.md Example of an error case for 'get_block_info' where the required 'number_or_hash' parameter is missing. Expects a 400 Bad Request response. ```bash curl -i "http://127.0.0.1:8000/v1/get_block_info?chain_id=1" ``` -------------------------------- ### Get Transactions by Address Source: https://github.com/blockscout/mcp-server/blob/main/API.md Retrieves native currency transfers and contract interactions for a given address. Requires chain ID, address, and a start date. An end date, specific methods, or a cursor for pagination can also be provided. ```bash curl "http://127.0.0.1:8000/v1/get_transactions_by_address?chain_id=1&address=0x...&age_from=2024-01-01T00:00:00Z" ``` -------------------------------- ### Get Token Transfers by Address Source: https://github.com/blockscout/mcp-server/blob/main/API.md Fetches ERC-20 token transfers associated with an address. Requires chain ID, address, and a start date. Optional parameters include an end date, a specific token contract address, or a cursor for pagination. ```bash curl "http://127.0.0.1:8000/v1/get_token_transfers_by_address?chain_id=1&address=0x...&age_from=2024-01-01T00:00:00Z&token=0x..." ``` -------------------------------- ### GET /v1/get_transaction_info Source: https://github.com/blockscout/mcp-server/blob/main/blockscout_mcp_server/llms.txt Gets comprehensive information about a specific transaction. ```APIDOC ## GET /v1/get_transaction_info ### Description Gets comprehensive transaction information. ### Method GET ### Endpoint /v1/get_transaction_info ### Query Parameters - **chain_id** (integer) - Required - The ID of the blockchain network. - **tx_hash** (string) - Required - The hash of the transaction to query. ``` -------------------------------- ### GET /v1/get_address_info Source: https://github.com/blockscout/mcp-server/blob/main/blockscout_mcp_server/llms.txt Gets comprehensive information about a specific blockchain address. ```APIDOC ## GET /v1/get_address_info ### Description Gets comprehensive information about an address. ### Method GET ### Endpoint /v1/get_address_info ### Query Parameters - **chain_id** (integer) - Required - The ID of the blockchain network. - **address** (string) - Required - The blockchain address to query. ``` -------------------------------- ### Example Comprehensive ToolResponse Structure Source: https://github.com/blockscout/mcp-server/blob/main/SPEC.md Demonstrates the full ToolResponse format used by server tools to communicate with AI agents, including data payload, descriptions, notes, and pagination. ```json { "data": [ { "block_number": 19000000, "transaction_hash": "0x1a2b3c4d5e6f...", "token_symbol": "USDC", "amount": "1000000000", "from_address": "0xa1b2c3d4e5f6...", "to_address": "0xf6e5d4c3b2a1...", "raw_data": "0x1234...", "raw_data_truncated": true, "decoded_data": { "method": "transfer", "parameters": [ {"name": "to", "value": "0xf6e5d4c3b2a1...", "type": "address"}, {"name": "amount", "value": "1000000000", "type": "uint256"} ] } } ], "data_description": [ "Response Structure:", "- `block_number`: Block height where the transaction was included", "- `token_symbol`: Token ticker (e.g., USDC, ETH, WBTC)", "- `amount`: Transfer amount in smallest token units (wei for ETH)", ``` -------------------------------- ### GET /v1/get_transactions_by_address Source: https://github.com/blockscout/mcp-server/blob/main/blockscout_mcp_server/llms.txt Gets transactions associated with a specific address, with optional time range filtering. ```APIDOC ## GET /v1/get_transactions_by_address ### Description Gets transactions for an address with time range filtering. ### Method GET ### Endpoint /v1/get_transactions_by_address ### Query Parameters - **chain_id** (integer) - Required - The ID of the blockchain network. - **address** (string) - Required - The blockchain address to query. - **age_from** (string) - Optional - Filter transactions from this date/time (e.g., '7d' for 7 days ago, '2023-01-01'). ``` -------------------------------- ### Start MCP Server (Docker) Source: https://github.com/blockscout/mcp-server/blob/main/TESTING.md Run the MCP server using Docker, exposing port 8000 and enabling HTTP and REST interfaces. This is a convenient way to deploy the server. ```bash docker run --rm -p 8000:8000 ghcr.io/blockscout/mcp-server:latest --http --rest --http-host 0.0.0.0 --http-port 8000 ``` -------------------------------- ### Package MCP Bundle Source: https://github.com/blockscout/mcp-server/blob/main/mcpb/README.md Create the MCP bundle by packaging the manifest and assets. This command installs mcp-remote, copies necessary files, and then packs them into a .mcpb file. ```shell mkdir _build cp manifest.json blockscout.png _build/ cd _build npm install mcp-remote@0.1.37 mcpb pack . blockscout-mcp-dev.mcpb ``` -------------------------------- ### Get Transaction Info API Source: https://github.com/blockscout/mcp-server/blob/main/API.md Gets comprehensive information for a single transaction, including ERC-4337 User Operations when present. ```APIDOC ## GET /v1/get_transaction_info ### Description Gets comprehensive information for a single transaction, including a summary of ERC-4337 User Operations when present. ### Method GET ### Endpoint /v1/get_transaction_info ### Parameters #### Query Parameters - **chain_id** (string) - Required - The ID of the blockchain. - **transaction_hash** (string) - Required - The hash of the transaction. - **include_raw_input** (boolean) - Optional - If true, includes the raw transaction input data. ### Request Example ```bash curl "http://127.0.0.1:8000/v1/get_transaction_info?chain_id=1&transaction_hash=0x...&include_raw_input=true" ``` ### Response #### Success Response (200) - **hash** (string) - The transaction hash. - **block_number** (integer) - The block number in which the transaction was included. - **timestamp** (integer) - The Unix timestamp of the block. - **from** (string) - The sender address. - **to** (string) - The recipient address. - **value** (string) - The value transferred in the transaction (as a string, potentially in Wei). - **input** (string, optional) - The raw input data of the transaction, if `include_raw_input` was true. - **user_ops** (array, optional) - Information about ERC-4337 User Operations associated with the transaction. #### Response Example ```json { "hash": "0x...", "block_number": 19000000, "timestamp": 1678886400, "from": "0xSenderAddress", "to": "0xRecipientAddress", "value": "1000000000000000000", "input": "0x...", "user_ops": [ { "sender": "0xUserOpSender", "callData": "0x..." } ] } ``` ``` -------------------------------- ### Initialize Blockchain Analysis (REST API) Source: https://context7.com/blockscout/mcp-server/llms.txt Mandatory initialization tool that provides operational guidance and custom instructions. Must be called before using other blockchain analysis tools. ```bash curl "https://mcp.blockscout.com/v1/unlock_blockchain_analysis" ``` ```json { "data": { "instructions": "Detailed operational rules and chain selection guidance...", "available_endpoints": [] }, "notes": null, "instructions": null, "pagination": null } ``` -------------------------------- ### Troubleshooting Authentication Source: https://github.com/blockscout/mcp-server/blob/main/tests/evals/README.md Steps to resolve authentication issues, including setting the GEMINI_API_KEY or using Google login for interactive sessions. ```bash # In .env file for testing GEMINI_USER_PROFILE=/home/user/.gemini-eval # Your regular coding environment will use the default ~/.gemini ``` -------------------------------- ### GET /v1/lookup_token_by_symbol Source: https://github.com/blockscout/mcp-server/blob/main/blockscout_mcp_server/llms.txt Searches for tokens by their symbol or name. ```APIDOC ## GET /v1/lookup_token_by_symbol ### Description Searches for tokens by symbol or name. ### Method GET ### Endpoint /v1/lookup_token_by_symbol ### Query Parameters - **chain_id** (integer) - Required - The ID of the blockchain network. - **query** (string) - Required - The token symbol or name to search for. ``` -------------------------------- ### Example: First Transaction Retrieval Source: https://github.com/blockscout/mcp-server/blob/main/gpt/instructions.md Demonstrates using get_transactions_by_address with date ranges to efficiently find the first transaction for an address. This method avoids hundreds of pagination calls by specifying precise 'age_from' and 'age_to' parameters. ```text 1. get_transactions_by_address(age_from: "2015-07-30", age_to: "2015-12-31") → ✓ 2. get_transactions_by_address(age_from: "2015-07-30", age_to: "2015-09-12") → ✗ 3. get_transactions_by_address(age_from: "2015-09-12", age_to: "2015-10-03") → ✓ 4. get_transactions_by_address(age_from: "2015-09-27", age_to: "2015-09-30") → ✓ Found: 2015-09-28T08:24:43Z 5. get_transactions_by_address(age_from: "2015-07-30", age_to: "2015-09-28T08:24:42") → ✗ Confirmed: This is the first transaction. ``` -------------------------------- ### Inspect Contract Code - Metadata and File List Source: https://context7.com/blockscout/mcp-server/llms.txt Fetches metadata and a list of source files for a verified smart contract. This is the first step in inspecting contract code. ```bash # Get contract metadata and file list curl "https://mcp.blockscout.com/v1/inspect_contract_code?chain_id=1&address=0xdAC17F958D2ee523a2206206994597C13D831ec7" ``` ```json { "data": { "name": "TetherToken", "compiler_version": "v0.4.18+commit.9cf6e910", "optimization_enabled": true, "source_files": [ {"name": "TetherToken.sol", "size": 12345} ] } } ``` -------------------------------- ### GET /v1/get_block_info Source: https://github.com/blockscout/mcp-server/blob/main/blockscout_mcp_server/llms.txt Returns detailed information about a specific block. ```APIDOC ## GET /v1/get_block_info ### Description Returns detailed block information. ### Method GET ### Endpoint /v1/get_block_info ### Query Parameters - **chain_id** (integer) - Required - The ID of the blockchain network. - **block_number** (integer) - Required - The number of the block to query. ``` -------------------------------- ### List All Tools Request Source: https://github.com/blockscout/mcp-server/blob/main/API.md Use this curl command to retrieve a list of all available tools and their MCP schemas. ```bash curl "http://127.0.0.1:8000/v1/tools" ``` -------------------------------- ### GET /v1/nft_tokens_by_address Source: https://github.com/blockscout/mcp-server/blob/main/blockscout_mcp_server/llms.txt Retrieves NFT tokens owned by a specific address. ```APIDOC ## GET /v1/nft_tokens_by_address ### Description Retrieves NFT tokens owned by an address. ### Method GET ### Endpoint /v1/nft_tokens_by_address ### Query Parameters - **chain_id** (integer) - Required - The ID of the blockchain network. - **address** (string) - Required - The blockchain address to query. ``` -------------------------------- ### Example Prompt for Gas Fees Calculation Source: https://github.com/blockscout/mcp-server/blob/main/README.md This prompt requests the calculation of total gas fees paid by an address within a specified month and year on the Ethereum mainnet. ```plaintext Calculate the total gas fees paid on Ethereum by address `0xcafe...cafe` in May 2025. ``` -------------------------------- ### GET /v1/inspect_contract_code Source: https://github.com/blockscout/mcp-server/blob/main/blockscout_mcp_server/llms.txt Inspects the source code of a verified smart contract. ```APIDOC ## GET /v1/inspect_contract_code ### Description Inspects a verified contract's source code. ### Method GET ### Endpoint /v1/inspect_contract_code ### Query Parameters - **chain_id** (integer) - Required - The ID of the blockchain network. - **address** (string) - Required - The address of the smart contract. ``` -------------------------------- ### Report Tool Usage Example Source: https://github.com/blockscout/mcp-server/blob/main/API.md Send an anonymous tool usage report to a community-run server. Requires specific headers like `User-Agent` and `Content-Type`, along with a JSON payload detailing the tool and client information. ```bash curl -X POST "http://127.0.0.1:8000/v1/report_tool_usage" \ -H "User-Agent: BlockscoutMCP/0.11.0" \ -H "Content-Type: application/json" \ -d '{"tool_name": "get_block_number", "tool_args": {"chain_id": "1"}, "client_name": "test-client", "client_version": "1.2.3", "protocol_version": "2024-11-05"}' ``` -------------------------------- ### GET /v1/get_address_by_ens_name Source: https://github.com/blockscout/mcp-server/blob/main/blockscout_mcp_server/llms.txt Converts an ENS name to its corresponding Ethereum address. ```APIDOC ## GET /v1/get_address_by_ens_name ### Description Converts an ENS name to its Ethereum address. ### Method GET ### Endpoint /v1/get_address_by_ens_name ### Query Parameters - **chain_id** (integer) - Required - The ID of the blockchain network. - **ens_name** (string) - Required - The ENS name to resolve. ``` -------------------------------- ### Configure Blockscout MCP Server with Gemini CLI Source: https://github.com/blockscout/mcp-server/blob/main/blockscout_mcp_server/templates/index.html Add this configuration to your `~/.gemini/settings.json` file to connect to the Blockscout MCP server. Ensure the `httpUrl` and `timeout` values are set appropriately for your environment. ```json { "mcpServers": { "blockscout": { "httpUrl": "https://mcp.blockscout.com/mcp", "timeout": 180000 } } } ``` -------------------------------- ### Build Docker Image Locally Source: https://github.com/blockscout/mcp-server/blob/main/README.md Builds the Docker image for the Blockscout MCP Server using the official tag. ```bash docker build -t ghcr.io/blockscout/mcp-server:latest . ``` -------------------------------- ### GET /v1/get_chains_list Source: https://github.com/blockscout/mcp-server/blob/main/blockscout_mcp_server/llms.txt Returns a list of all known chains supported by the server. ```APIDOC ## GET /v1/get_chains_list ### Description Returns a list of all known chains. ### Method GET ### Endpoint /v1/get_chains_list ### Response #### Success Response (200) - **chains** (array) - A list of chain objects, each containing chain ID and name. ``` -------------------------------- ### GET /v1/get_token_transfers_by_address Source: https://github.com/blockscout/mcp-server/blob/main/blockscout_mcp_server/llms.txt Returns ERC-20 token transfers associated with a specific address. ```APIDOC ## GET /v1/get_token_transfers_by_address ### Description Returns ERC-20 token transfers for an address. ### Method GET ### Endpoint /v1/get_token_transfers_by_address ### Query Parameters - **chain_id** (integer) - Required - The ID of the blockchain network. - **address** (string) - Required - The blockchain address to query. ``` -------------------------------- ### MCP JSON-RPC: List Available Tools Source: https://github.com/blockscout/mcp-server/blob/main/TESTING.md Use curl to send a POST request to the MCP endpoint to list all available tools. This helps in discovering functionalities. ```bash curl --request POST \ --url http://127.0.0.1:8000/mcp \ --header 'Content-Type: application/json' \ --header 'Accept: application/json, text/event-stream' \ --data '{\ "jsonrpc": "2.0",\ "id": 0,\ "method": "tools/list"\ }' ``` -------------------------------- ### GET /v1/get_tokens_by_address Source: https://github.com/blockscout/mcp-server/blob/main/blockscout_mcp_server/llms.txt Returns a list of ERC20 token holdings for a given address. ```APIDOC ## GET /v1/get_tokens_by_address ### Description Returns ERC20 token holdings for an address. ### Method GET ### Endpoint /v1/get_tokens_by_address ### Query Parameters - **chain_id** (integer) - Required - The ID of the blockchain network. - **address** (string) - Required - The blockchain address to query. ``` -------------------------------- ### List Available MCP Tools Source: https://context7.com/blockscout/mcp-server/llms.txt Retrieves a list of all available MCP tools and their schemas. Use this to discover available functionalities. ```bash # Get all available tools curl "https://mcp.blockscout.com/v1/tools" ``` ```json # Response { "data": [ { "name": "__unlock_blockchain_analysis__", "description": "Provides custom instructions for the MCP host. Mandatory first step." }, { "name": "get_chains_list", "description": "Returns a list of all known blockchain chains." } ] } ``` -------------------------------- ### GET /v1/get_block_number Source: https://github.com/blockscout/mcp-server/blob/main/blockscout_mcp_server/llms.txt Retrieves the block number and timestamp for a specific date/time or the latest block. ```APIDOC ## GET /v1/get_block_number ### Description Retrieves the block number and timestamp for a specific date/time or the latest block. ### Method GET ### Endpoint /v1/get_block_number ### Query Parameters - **chain_id** (integer) - Required - The ID of the blockchain network. - **date** (string) - Optional - The date in 'YYYY-MM-DD' format or a relative time like '7d' for 7 days ago. ``` -------------------------------- ### Get Chains List API Source: https://github.com/blockscout/mcp-server/blob/main/API.md Retrieves a list of all known blockchain chains supported by the server. ```APIDOC ## GET /v1/get_chains_list ### Description Returns a list of all known blockchain chains, including whether each is a testnet, its native currency, ecosystem, and the settlement layer chain ID when applicable. ### Method GET ### Endpoint /v1/get_chains_list ### Parameters #### Query Parameters *None* ### Request Example ```bash curl "http://127.0.0.1:8000/v1/get_chains_list" ``` ### Response #### Success Response (200) - **chains** (array) - A list of blockchain chain objects. - **chain_id** (string) - The unique identifier for the chain. - **name** (string) - The human-readable name of the chain. - **is_testnet** (boolean) - Indicates if the chain is a test network. - **native_currency** (string) - The symbol of the native currency of the chain. - **ecosystem** (string) - The ecosystem the chain belongs to (e.g., "Ethereum", "Solana"). - **settlement_chain_id** (string or null) - The chain ID of the settlement layer, if applicable. #### Response Example ```json { "chains": [ { "chain_id": "1", "name": "Ethereum Mainnet", "is_testnet": false, "native_currency": "ETH", "ecosystem": "Ethereum", "settlement_chain_id": null }, { "chain_id": "5", "name": "Ethereum Goerli", "is_testnet": true, "native_currency": "ETH", "ecosystem": "Ethereum", "settlement_chain_id": "1" } ] } ``` ``` -------------------------------- ### Login to MCP Registry with DNS Ownership Proof Source: https://github.com/blockscout/mcp-server/blob/main/MCP-REGISTRY-README.md Authenticate your domain ownership with the MCP Registry using a private key file. The private key content is extracted using openssl. ```bash mcp-publisher login dns --domain blockscout.com --private-key "$(openssl pkey -in key.pem -noout -text | grep -A3 "priv:" | tail -n +2 | tr -d ' :\n')" ``` -------------------------------- ### GET /api/v2/validators/zilliqa/{validator_public_key} Source: https://github.com/blockscout/mcp-server/blob/main/gpt/direct_call_endpoint_list.md Retrieves information for a specific Zilliqa validator using their public key. ```APIDOC ## GET /api/v2/validators/zilliqa/{validator_public_key} ### Description Get information for a specific Zilliqa validator. ### Method GET ### Endpoint /api/v2/validators/zilliqa/{validator_public_key} #### Path Parameters - **validator_public_key** (string) - Required - The public key of the Zilliqa validator. ``` -------------------------------- ### List All Available Tests Source: https://github.com/blockscout/mcp-server/blob/main/tests/evals/README.md Display a list of all evaluation tests available in the test suite. ```bash ./run.sh list ``` -------------------------------- ### GET /api/v1/contracts/{address}/code Source: https://github.com/blockscout/mcp-server/blob/main/gpt/action_tool_descriptions.md Inspects the source code or metadata of a verified smart contract. ```APIDOC ## GET /api/v1/contracts/{address}/code ### Description Inspects a verified contract's source code or metadata. ### Method GET ### Endpoint /api/v1/contracts/{address}/code ### Path Parameters - **address** (string) - Required - The contract address. ### Response #### Success Response (200) - **source_code** (string) - The source code of the contract. - **metadata** (object) - Metadata related to the contract. #### Response Example ```json { "source_code": "// SPDX-License-Identifier: MIT\npragma solidity ^0.8.0;\n\ncontract MyContract {\n // ... contract code ...\n}", "metadata": { "compiler": { "version": "0.8.0" }, "language": "Solidity" } } ``` ``` -------------------------------- ### GET /v1/get_contract_abi Source: https://github.com/blockscout/mcp-server/blob/main/blockscout_mcp_server/llms.txt Retrieves the ABI (Application Binary Interface) for a given smart contract address. ```APIDOC ## GET /v1/get_contract_abi ### Description Retrieves the ABI for a smart contract. ### Method GET ### Endpoint /v1/get_contract_abi ### Query Parameters - **chain_id** (integer) - Required - The ID of the blockchain network. - **address** (string) - Required - The address of the smart contract. ```