Blockchain and AI

Block Explorer MCP

Transform your SettleMint blockchain analysis with AI! Ask questions in natural language about transactions, addresses, tokens, and network activity using the Model Context Protocol integration.

AI-Powered Blockchain Analysis

Who benefits: Teams building or operating blockchain applications — developers, analysts, compliance, and operations — who need rapid, accurate on‑chain insights

Technical breakthrough: Query your permissioned SettleMint networks using natural language - no more complex API calls or block explorer clicking

Business impact: Faster, more reliable blockchain analysis, streamlined compliance reporting, and AI-assisted transaction pattern detection

Transform Raw Blockchain Data Into Insights

Traditional block explorers require manual clicking, complex API calls, and technical knowledge. The Block Explorer MCP bridges this gap by enabling natural language blockchain queries through any MCP-compatible client (e.g., Cursor, Claude Desktop, Claude Code, Gemini clients with MCP, and others).

Natural Language Queries

Ask 'What tokens does address 0x... hold?' instead of navigating complex API documentation.

Permissioned & Public Networks

Works seamlessly with your permissioned SettleMint Besu networks and public blockchains like Ethereum, Polygon, etc.

Real-Time Analysis

Get instant answers about current blockchain state, not cached data from hours ago.

AI-Powered Insights

The AI can identify patterns, suggest investigations, and provide context you might miss.

What Can You Ask Your Blockchain?

🔍 Network Overview

  • "What's happening on my SettleMint network?"
  • "Show me the latest 5 blocks"
  • "What's the current transaction volume?"
  • "How many failed transactions occurred today?"

📊 Address Analysis

  • "Get details for address 0x..."
  • "What tokens does address 0x... hold?"
  • "Show me all transactions for address 0x... today"
  • "Is this address a smart contract or externally owned?"

💰 Transaction Investigation

  • "Analyze transaction 0x..."
  • "Show me large value transfers in the last 24 hours"
  • "Find failed transactions and explain why they failed"
  • "What smart contracts did this transaction interact with?"

🪙 Token & Contract Analysis

  • "What ERC-20 tokens exist on my network?"
  • "Show me NFT activity for the past week"
  • "Get metadata for contract 0x..."
  • "Find the most active smart contracts today"

Quick Start Guide

Install the Enhanced MCP Server

The SettleMint-enhanced version includes native support for permissioned networks with proper authentication.

# 1. Clone the SettleMint-enhanced MCP server
git clone https://github.com/settlemint/blockscout-mcp-server.git
cd blockscout-mcp-server

# 2. Install dependencies
pip install -e .

# 3. Verify installation
python3 -m blockscout_mcp_server --help

Automated Setup Available

The MCP server includes a setup.sh script that automates the installation, configuration, and testing process. Run ./setup.sh for guided setup.

Configure Your SettleMint Network

Create a .env file with your SettleMint network details:

# Create from template
cp .env.example .env

# Edit with your favorite editor
nano .env

Add your SettleMint configuration:

# .env file (NEVER commit this to version control)
BLOCKSCOUT_SETTLEMINT_CHAIN_ID=YOUR_CHAIN_ID
BLOCKSCOUT_SETTLEMINT_BLOCKSCOUT_URL=https://your-explorer-url.settlemint.com/
BLOCKSCOUT_SETTLEMINT_APPLICATION_ACCESS_TOKEN=sm_aat_xxxxx

📍 Where to find your values:

  • Chain ID: SettleMint Platform → Network Manager → Your Blockchain → Network Details
  • Blockscout URL: SettleMint Platform → Insights → Block Explorer → Connect (copy URL without token)
  • Access Token: SettleMint Platform → Access tokens → Create new token

Configure Your AI Platform

1. Create or edit ~/.cursor/mcp.json:

{
  "mcpServers": {
    "settlemint-blockscout": {
      "command": "python3",
      "args": [
        "-m", "blockscout_mcp_server",
        "--http"
      ],
      "cwd": "/path/to/your/mcp-server"
    }
  }
}

Important Cursor Configuration

  • The --http flag is required for Cursor integration
  • Update the "cwd" path to your mcp-server directory
  • DO NOT add environment variables here - they're loaded from .env

2. Restart Cursor completely (Cmd+Q on Mac, then reopen)

3. Check for green MCP status indicator in the bottom status bar

1. Create or edit claude_desktop_config.json:

  • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "settlemint-blockscout": {
      "command": "python3",
      "args": [
        "-m", "blockscout_mcp_server"
      ],
      "cwd": "/path/to/your/mcp-server"
    }
  }
}

2. Update the "cwd" path to your mcp-server directory

3. Restart Claude Desktop → Look for 🔌 connection indicator

1. Open VS Code → Settings → search "Claude MCP" → "Edit in settings.json"

2. Add to settings.json:

{
  "claude.mcpServers": {
    "settlemint-blockscout": {
      "command": "python3",
      "args": ["-m", "blockscout_mcp_server"],
      "cwd": "/path/to/your/mcp-server"
    }
  }
}

3. Update the "cwd" path to your mcp-server directory

4. Reload Window → Claude Code will auto-connect to the MCP server

Test Your Setup

1. Run the connection test script:

cd /path/to/your/mcp-server
python3 test_connection.py

You should see:

✅ Configuration Check
✅ Resolved URL
✅ Latest block: #[block_number]
✅ Connection Test Successful!

2. Ask your AI assistant:

"What's the latest block on chain 40319?"

(Replace 40319 with your actual chain ID)

You should see the MCP server automatically connect and return current blockchain data!


Advanced Use Cases


Architecture Overview

The Block Explorer MCP creates a seamless bridge between AI assistants and your SettleMint blockchain infrastructure:

Key Components:

  1. AI Assistant Layer: Natural language interface (Cursor IDE, Claude Desktop)
  2. MCP Protocol Bridge: Translates AI requests into blockchain API calls
  3. SettleMint Authentication: Token-based auth via query parameters (?token=)
  4. Security: Credentials stored in .env file, never in configuration files
  5. Multi-Chain Support: Works with both permissioned SettleMint and public networks

Troubleshooting

Common Issues & Solutions


What's Next?

Ready to supercharge your blockchain analysis? Here are some power-user tips:

🎯 Combine with Other SettleMint Tools

Need Help?

For assistance, please contact SettleMint Support or visit the Support Documentation.