BlockSleuth is a powerful Model Context Protocol (MCP) server that combines Dune Analytics and Blockscout APIs to provide comprehensive blockchain investigation and analysis capabilities for LLM agents and MCP clients.
This enhanced version adds Blockscout integration alongside the existing Dune API, enabling:
- Real-time blockchain data from Blockscout (transactions, contracts, logs)
- Aggregated analytics from Dune (holder distributions, price trends)
- Compound tools that intelligently combine both data sources
- Support for 9+ blockchain networks with more coming
EVM Tools:
get_evm_balances: Fetches EVM token balances for a walletget_evm_activity: Fetches EVM account activityget_evm_collectibles: Fetches EVM NFT collectiblesget_evm_transactions: Retrieves granular EVM transaction detailsget_evm_token_info: Fetches metadata and price for EVM tokensget_evm_token_holders: Discovers EVM token holder distributions
SVM Tools:
get_svm_balances: Fetches SVM token balancesget_svm_transactions: Fetches SVM transactions (Solana only)
Search & Discovery:
blockscout_search: Universal search across addresses, tokens, blocks, transactionsping_blockscout: Test connectivity to Blockscout instances
Address Analysis:
blockscout_address_info: Get address details, balance, type (EOA/contract)blockscout_address_transactions: Get all transactions for an addressblockscout_address_internal_txs: Get internal transactionsblockscout_address_logs: Get event logsblockscout_address_token_balances: Get all token balances
Transaction Analysis:
blockscout_transaction_details: Get full transaction detailsblockscout_transaction_logs: Get event logs from a transactionblockscout_transaction_internal_txs: Get internal transactionsblockscout_transaction_raw_trace: Get raw execution traceblockscout_transaction_state_changes: Get state changes
Block Explorer:
blockscout_block_details: Get block informationblockscout_block_transactions: Get all transactions in a blockblockscout_latest_blocks: Get recent blocks
Smart Contracts:
blockscout_contract_info: Get verified contract details, ABI, sourceblockscout_contract_methods: Get readable/writable methodsblockscout_read_contract: Call contract read methodsblockscout_verified_contracts: List recently verified contracts
Token & NFT Tools:
blockscout_token_info: Get token details, supply, decimalsblockscout_token_transfers: Get token transfer historyblockscout_token_holders: Get token holder listblockscout_nft_instances: Get NFT instances for a collectionblockscout_nft_metadata: Get specific NFT metadata
investigate_smart_contract: Deep contract analysis with source code and analyticsanalyze_transaction_impact: Full transaction forensics with traces and contexttoken_deep_analysis: Comprehensive token risk assessmentprofile_wallet_behavior: Behavioral profiling with historical patterns
dune://evm/supported-chains: Dune supported chainsweb3-stats://supported-networks: Unified network support across both APIs
/comprehensive_wallet_analysis: Deep wallet investigation/smart_contract_deep_dive: Thorough contract investigation/token_risk_assessment: Multi-source token risk analysis/transaction_post_mortem: Transaction impact analysis/compare_networks: Network capability comparison
Legacy prompts still supported:
/evm_wallet_overview: Basic wallet overview/analyze_erc20_token: Basic token analysis/svm_address_check: Solana address check
# Clone the repository
git clone https://github.com/crazyrabbitLTC/mcp-web3-stats.git
cd mcp-web3-stats
# Install dependencies
bun install
# Create .env file with your Dune API key
echo "DUNE_API_KEY=your_actual_dune_api_key_here" > .env
# Start the server
bun start
# In a separate terminal, run the MCP Inspector to test the tools
npx @modelcontextprotocol/inspector bun run index.ts# Install globally
npm install -g mcp-web3-stats-enhanced
# Set your Dune API key as an environment variable
export DUNE_API_KEY=your_actual_dune_api_key_here
# Run the server
mcp-web3-stats
# In a separate terminal, test with the MCP Inspector
npx @modelcontextprotocol/inspector mcp-web3-statsThe server supports multiple blockchain networks through Blockscout instances:
- Ethereum (Chain ID: 1)
- Optimism (Chain ID: 10)
- BNB Smart Chain (Chain ID: 56)
- Gnosis (Chain ID: 100)
- Polygon (Chain ID: 137)
- Fantom (Chain ID: 250)
- Base (Chain ID: 8453)
- Arbitrum (Chain ID: 42161)
- Avalanche (Chain ID: 43114)
More networks can be added by updating the BLOCKSCOUT_NETWORKS configuration.
Combine source code verification with usage analytics:
Assistant: I'll investigate this smart contract using both Blockscout and Dune data.
[Uses investigate_smart_contract]
This contract is:
- Verified on Blockscout with Solidity 0.8.19
- Has 45 read methods and 12 write methods
- Processes $2.5M daily volume (from Dune)
- Top 10 holders control 65% of supply
Analyze complex transactions with full context:
Assistant: Let me analyze this transaction's complete impact.
[Uses analyze_transaction_impact]
Transaction breakdown:
- Triggered 15 internal transactions
- Changed 8 storage slots
- Emitted 12 events
- Sender has 500+ previous transactions
- This was their largest transaction this month
Comprehensive token analysis across both platforms:
Assistant: I'll perform a deep risk assessment of this token.
[Uses token_deep_analysis]
Risk Assessment:
⚠️ High concentration: Top 10 holders own 78%
✅ Verified contract with clean code
⚠️ Low liquidity: $50k daily volume
✅ Active development: 50+ transfers in last hour
Profile wallets using combined historical and real-time data:
Assistant: Let me create a behavioral profile for this wallet.
[Uses profile_wallet_behavior]
Wallet Profile:
- Type: DeFi Power User
- 1,250 total transactions
- Interacts with 45 unique contracts
- Portfolio: 60% stablecoins, 30% DeFi tokens, 10% NFTs
- Activity level: High (50+ tx/month)
DUNE_API_KEY: Required API key from Dune Analytics
Edit the BLOCKSCOUT_NETWORKS object in index.ts:
const BLOCKSCOUT_NETWORKS = {
"1": { name: "Ethereum", url: "https://eth.blockscout.com", chainId: "1" },
// Add new networks here
};Add to your claude_desktop_config.json:
{
"mcpServers": {
"web3_stats_enhanced": {
"command": "node",
"args": [
"/path/to/mcp-web3-stats/dist/index.js"
],
"env": {
"DUNE_API_KEY": "your_actual_dune_api_key_here"
}
}
}
}# Build TypeScript to JavaScript
bun run build
# Run tests (when available)
bun test
# Run in development mode
bun run index.ts- Dune API: Rate limits depend on your plan
- Blockscout: Most public instances have generous rate limits (typically 100+ requests/second)
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details
- Dune Analytics for aggregated blockchain analytics
- Blockscout for real-time blockchain data
- Anthropic MCP for the protocol specification