Web3 Blockchain Interface MCP server

Unifies interactions with multiple blockchains like Solana and Ethereum, enabling cross-chain operations such as balance checks and token transfers.
Back to servers
Setup instructions
Provider
Strangelove Ventures
Release date
Feb 08, 2025
Language
TypeScript
Stats
83 stars

The Web3 MCP server provides a unified interface for interacting with multiple blockchains through simple RPC endpoints. It supports common operations across Solana, Ethereum (and other EVM chains), Cardano, Bitcoin and other UTXO chains, THORChain, XRP Ledger, and TON.

Installation and Setup

Prerequisites

  • Node.js
  • npm
  • Git

Installation Steps

  1. Clone the repository and install dependencies:
git clone https://github.com/strangelove-ventures/web3-mcp.git
cd web3-mcp
npm install
  1. Create a configuration file:
cp .env.example .env
  1. Configure your environment variables in the .env file:

Required Configuration Variables

# Tool Registration Controls
ENABLE_SOLANA_TOOLS=true      # Enable/disable Solana tools
ENABLE_ETHEREUM_TOOLS=true    # Enable/disable Ethereum and EVM chain tools
ENABLE_CARDANO_TOOLS=true     # Enable/disable Cardano tools

# UTXO Chain Tools
ENABLE_BITCOIN_TOOLS=true     # Enable/disable Bitcoin tools
ENABLE_LITECOIN_TOOLS=true    # Enable/disable Litecoin tools
ENABLE_DOGECOIN_TOOLS=true    # Enable/disable Dogecoin tools
ENABLE_BITCOINCASH_TOOLS=true # Enable/disable Bitcoin Cash tools
ENABLE_THORCHAIN_TOOLS=true   # Enable/disable THORChain tools
ENABLE_RIPPLE_TOOLS=true      # Enable/disable XRP Ledger tools
ENABLE_TON_TOOLS=true         # Enable/disable TON tools

# Private Keys (required for transactions)
ETH_PRIVATE_KEY=your-ethereum-private-key
SOLANA_PRIVATE_KEY=your-base58-encoded-solana-private-key

# XRP Ledger credentials (required for XRP transactions)
# Either private key or mnemonic is required
XRP_PRIVATE_KEY=your-xrp-private-key-in-hex
# OR
XRP_MNEMONIC=your-xrp-mnemonic-recovery-phrase
# Optional - used to verify the derived address
XRP_ADDRESS=your-xrp-account-address

# TON Configuration
TON_MNEMONIC=word1 word2 word3 ... word24  # 24-word recovery phrase for TON wallet
TON_ADDRESS=your-ton-wallet-address       # Your TON wallet address
TON_API_KEY=your-toncenter-api-key        # Get from @tonapibot on Telegram (optional but recommended)

# Cardano Configuration
BLOCKFROST_API_KEY=your-blockfrost-api-key  # Get from https://blockfrost.io/
CARDANO_NETWORK=mainnet     # or 'testnet', 'preview', 'preprod'
CARDANO_MNEMONIC=your-cardano-mnemonic-phrase   # Required for transaction signing
CARDANO_ACCOUNT_INDEX=0     # Optional - defaults to 0

Optional Configuration Variables

# Network RPC URLs (optional - will use public endpoints if not specified)
SOLANA_RPC_URL=https://api.mainnet-beta.solana.com

# Ethereum & Layer 2s
ETH_RPC_URL=https://eth-mainnet.g.alchemy.com/v2/your-api-key
ARBITRUM_RPC_URL=https://arb1.arbitrum.io/rpc
BASE_RPC_URL=https://mainnet.base.org
OPTIMISM_RPC_URL=https://mainnet.optimism.io

# Other EVM Chains
BSC_RPC_URL=https://bsc-dataseed.binance.org
POLYGON_RPC_URL=https://polygon-rpc.com
AVALANCHE_RPC_URL=https://api.avax.network/ext/bc/C/rpc
BERACHAIN_RPC_URL=https://rpc.berachain.com

# XRP Ledger
XRP_RPC_URL=https://xrplcluster.com/

# TON Network
TON_RPC_URL=https://toncenter.com/api/v2/jsonRPC

# THORChain Configuration
THORCHAIN_NODE_URL=https://thornode.ninerealms.com
THORCHAIN_PRIVATE_KEY=your-thorchain-private-key
THORCHAIN_MNEMONIC=your-thorchain-mnemonic

# UTXO Chain API Keys (optional)
BLOCKCYPHER_API_KEY=your-blockcypher-api-key
SOCHAIN_API_KEY=your-sochain-api-key
  1. Build the tool:
npm run build
  1. Add the tool to your MCP client configuration (example for Claude Desktop):
{
  "mcpServers": {
    "web3-rpc": {
      "command": "node",
      "args": [
        "/PATH/TO/web3-mcp/build/index.js"
      ]
    }
  }
}

Using the Web3 MCP Server

The server responds to natural language queries through an MCP client like Claude. Here are some examples of operations you can perform for each supported blockchain:

Solana Operations

  • Check balances: "What's the balance of 62QXuWZ3WT6ws1ZFxJobVDVXn6bEsiYpLo5yG612U6u3?"
  • Get wallet address: "What's my Solana address?"
  • Transfer SOL: "Transfer 0.001 SOL to Cg6cVS4tjkxHthm3K9BHhmvqF7kSz8GnXqqYXnHBzGXd"
  • View token balances: "Show me my SPL token balances"
  • Swap tokens: "Swap 0.1 SOL to USDC"

Ethereum & EVM Chain Operations

  • Check ETH balance: "What's the ETH balance of 0x556437c4d22ceaeeebf82006b85bdcc0ae67d933?"
  • Check token balances: "Check the USDC balance for 0x556437c4d22ceaeeebf82006b85bdcc0ae67d933 on Ethereum"
  • Send native tokens: "Send 0.1 ETH to 0x556437c4d22ceaeeebf82006b85bdcc0ae67d933"
  • Send ERC-20 tokens: "Send 100 USDC to 0x556437c4d22ceaeeebf82006b85bdcc0ae67d933 on Polygon"
  • Check gas prices: "What's the current gas price on Arbitrum?"

Cardano Operations

  • Check balances: "What's the ADA balance of addr1qywk..."
  • View wallet info: "Show my Cardano wallet information"
  • Send ADA: "Send 10 ADA to addr1qywk..."
  • Send native tokens: "Send 5 SpaceBudz to addr1qywk..."

Bitcoin & UTXO Chain Operations

  • Check balances:
    • "What's the BTC balance of 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa?"
    • "What's the LTC balance of LM2WMpR1Rp6j3Sa59cMXMs1SPzj9eXpGc1?"
    • "Check this DOGE address balance: D8vFz4p1L37jdg47HXKtSHA5uYLYxbGgPD"
  • View transaction history: "Show me the transaction history for bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
  • Validate addresses: "Validate this Bitcoin address: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
  • Check network fees: "What's the current Litecoin network fee?"

THORChain Operations

  • Check RUNE balance: "What's the RUNE balance of thor13zpdckczd0jvyhwxmrwnpap8gmy9m5kk2gzum3?"
  • Get pool information: "Show me the pool information for BTC.BTC"
  • Get swap quotes: "Get a swap quote for 0.1 BTC.BTC to ETH.ETH"

XRP Ledger Operations

  • Check balances: "What's the XRP balance of rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe?"
  • View transaction history: "Show me the transaction history for rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe"
  • Validate addresses: "Is rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe a valid XRP address?"
  • Send XRP: "Send 10 XRP to rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe"
  • Check token balances: "Show me token balances for rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe"
  • Create trustlines: "Create a trustline for USD with issuer rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe with a limit of 1000"

TON Operations

  • Check balances: "What's the TON balance of EQAAFhjXzKuQ5N0c96nsdZQWATcJm909LYSaCAvWFQF8tvUZ?"
  • View transaction history: "Show me the transaction history for EQAAFhjXzKuQ5N0c96nsdZQWATcJm909LYSaCAvWFQF8tvUZ"
  • Validate addresses: "Is UQD0BRQt-QdIEbsjuRsMqzDlBkUAEfQixShDECoKEOXRc4eR a valid TON address?"
  • Send TON: "Send 0.1 TON to EQAAFhjXzKuQ5N0c96nsdZQWATcJm909LYSaCAvWFQF8tvUZ"
  • Send with comment: "Send 0.01 TON to UQD0BRQt-QdIEbsjuRsMqzDlBkUAEfQixShDECoKEOXRc4eR with comment 'test payment'"

Security Considerations

  • Private Keys: Store your private keys only in the .env file and never expose them in conversation history
  • Test Wallets: Only use this with test wallets containing small amounts of funds
  • Tool Registration: Disable any blockchain tools you don't need using the environment variables
  • Custom RPC Endpoints: Consider using your own RPC endpoints for better security and reliability
  • API Keys: Use your own API keys for services like Blockfrost and TON Center for better rate limits

Advanced Configuration

Network Selection for EVM Chains

For EVM operations, you can specify the network by name:

  • ethereum
  • base
  • arbitrum
  • optimism
  • bsc (Binance Smart Chain)
  • polygon
  • avalanche
  • berachain

Cardano Configuration

The tool uses Blockfrost API for Cardano operations:

  • Register at https://blockfrost.io/ to get an API key
  • Configure the network (mainnet, testnet, preview, preprod)
  • Provide a mnemonic phrase for signing transactions

TON Configuration

For TON operations:

  • Get an API key from @tonapibot on Telegram for higher rate limits
  • Provide a 24-word mnemonic phrase for your TON wallet
  • Specify your TON wallet address for verification

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "web3-rpc" '{"command":"node","args":["/PATH/TO/web3-mcp/build/index.js"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "web3-rpc": {
            "command": "node",
            "args": [
                "/PATH/TO/web3-mcp/build/index.js"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "web3-rpc": {
            "command": "node",
            "args": [
                "/PATH/TO/web3-mcp/build/index.js"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later