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.
git clone https://github.com/strangelove-ventures/web3-mcp.git
cd web3-mcp
npm install
cp .env.example .env
.env
file:# 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
# 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
npm run build
{
"mcpServers": {
"web3-rpc": {
"command": "node",
"args": [
"/PATH/TO/web3-mcp/build/index.js"
]
}
}
}
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:
.env
file and never expose them in conversation historyFor EVM operations, you can specify the network by name:
The tool uses Blockfrost API for Cardano operations:
For TON operations:
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.
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.
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"
]
}
}
}
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.
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.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.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