1.0.1 • Published 5 months ago
@0xagmaso/blockscout-mcp v1.0.1
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
- Get transaction counts (nonces)
- Retrieve block information
- Get transaction details
- Make contract calls
Prerequisites
- Node.js (v16 or higher)
- npm (Node Package Manager)
Installation
- Clone the repository:
git clone <repository-url>
cd blockscout-mcp- Install dependencies:
npm install- Build the project:
npm run build- 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:
searchget_transactionsget_blocksget_token_transfersget_statsget_transaction_infoget_transaction_token_transfersget_transaction_internal_txsget_transaction_logsget_block_infoget_block_transactionsget_address_infoget_address_token_transfersget_token_infoget_token_holdersget_internal_transactionsget_main_page_transactionsget_main_page_blocksget_indexing_statusget_transaction_chartget_market_chartget_transaction_raw_traceget_transaction_state_changesget_transaction_summaryget_block_withdrawalsget_address_countersget_address_internal_transactionsget_address_logsget_address_blocks_validatedget_address_coin_balance_historyget_address_coin_balance_history_by_dayget_smart_contractsget_smart_contract_countersget_smart_contractget_json_rpc_urlget_account_abstraction_statusget_addressesget_address_transactionsget_address_token_balancesget_address_tokensget_address_withdrawalsget_address_nftsget_address_nft_collectionsget_tokensget_token_transfers_listget_token_countersget_token_instancesget_token_instance_by_idget_token_instance_transfersget_token_instance_holdersget_token_instance_transfers_countrefetch_token_instance_metadataget_withdrawalssearch_redirect