Web3 MCP Server
local-only server
The server can only run on the client’s local machine because it depends on local resources.
Web3 MCP
A Model-Context-Protocol server for interacting with multiple blockchains including Solana, Ethereum, THORChain, XRP Ledger, and UTXO chains. This server provides simple RPC endpoints for common blockchain operations, allowing secure interactions with various blockchains through environment variables.
<a href="https://glama.ai/mcp/servers/an8x6gmzdn"><img width="380" height="200" src="https://glama.ai/mcp/servers/an8x6gmzdn/badge" alt="Web3 Server MCP server" /></a>
Features
Solana Operations:
- Check SOL account balances
- Get detailed account information
- Transfer SOL between accounts
- View SPL token balances
- Get your wallet address from private key
- Swap tokens using Jupiter (Best price routing across all Solana DEXs)
Ethereum & EVM Chain Operations:
- Check native token balances across multiple networks
- Check ERC-20 token balances
- Send native tokens (using private key from .env)
- Send ERC-20 tokens (using private key from .env)
- Approve ERC-20 token spending (using private key from .env)
THORChain Operations:
- Check RUNE balances
- Get detailed pool information
- Get swap quotes between any supported assets
- Cross-chain swaps via THORChain protocol
UTXO Chain Operations:
- Bitcoin (BTC)
- Check address balances
- View transaction history
- Validate addresses
- Get network info and fees
- Litecoin (LTC)
- Check address balances
- View transaction history
- Validate addresses
- Get network info and fees
- Dogecoin (DOGE)
- Check address balances
- View transaction history
- Validate addresses
- Get network info and fees
- Bitcoin Cash (BCH)
- Check address balances
- View transaction history
- Validate addresses
- Get network info and fees
XRP Ledger Operations:
- Check XRP account balances
- View transaction history
- Validate XRP addresses
- Send XRP to another address
- Get current XRP Ledger information
- Check token balances
- Create trustlines for tokens
Supported EVM Networks:
- Ethereum
- Base
- Arbitrum
- Optimism
- BSC (Binance Smart Chain)
- Polygon
- Avalanche
- Berachain
Setup
- Clone and install dependencies:
- Create a .env file in the root directory:
- Configure your environment variables in .env:
Required Configuration
Optional Configuration
- Build the tool:
- Add the tool to your claude_desktop_config.json:
Tool Registration
The Web3 MCP server allows you to control which blockchain tools are registered through environment variables:
ENABLE_SOLANA_TOOLS
: Enable/disable Solana toolsENABLE_ETHEREUM_TOOLS
: Enable/disable Ethereum and EVM chain toolsENABLE_BITCOIN_TOOLS
: Enable/disable Bitcoin toolsENABLE_LITECOIN_TOOLS
: Enable/disable Litecoin toolsENABLE_DOGECOIN_TOOLS
: Enable/disable Dogecoin toolsENABLE_BITCOINCASH_TOOLS
: Enable/disable Bitcoin Cash toolsENABLE_THORCHAIN_TOOLS
: Enable/disable THORChain toolsENABLE_RIPPLE_TOOLS
: Enable/disable XRP Ledger tools
Set these variables to true
or false
in your .env
file to control which tools are available to the server. This allows you to:
- Reduce startup time by only loading required tools
- Minimize security surface area by disabling unused chains
- Customize the server for specific use cases
- Control resource usage by limiting active connections
Usage Examples
Ask Claude (or your MCP client of choice):
Solana Operations (when ENABLE_SOLANA_TOOLS=true)
- "What's my Solana address?" - Shows your address derived from private key in .env
- "What's the balance of 62QXuWZ3WT6ws1ZFxJobVDVXn6bEsiYpLo5yG612U6u3?"
- "Transfer 0.001 SOL to Cg6cVS4tjkxHthm3K9BHhmvqF7kSz8GnXqqYXnHBzGXd"
- "Show me my SPL token balances"
- "Swap 0.1 SOL to USDC" (Uses Jupiter for best price routing)
EVM Operations (when ENABLE_ETHEREUM_TOOLS=true)
- "What's the ETH balance of 0x556437c4d22ceaeeebf82006b85bdcc0ae67d933?"
- "Check the USDC balance for 0x556437c4d22ceaeeebf82006b85bdcc0ae67d933 on Ethereum"
- "Send 0.1 ETH to 0x556437c4d22ceaeeebf82006b85bdcc0ae67d933"
- "What's the current gas price on Arbitrum?"
- "Send 100 USDC to 0x556437c4d22ceaeeebf82006b85bdcc0ae67d933 on Polygon"
Bitcoin Operations (when ENABLE_BITCOIN_TOOLS=true)
- "What's the BTC balance of 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa?"
- "Show me the transaction history for bc1qxy2kgdygjrsqtzq2n0yrf2493p83kkfjhx0wlh"
- "Validate this Bitcoin address: 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa"
Litecoin Operations (when ENABLE_LITECOIN_TOOLS=true)
- "What's the LTC balance of LM2WMpR1Rp6j3Sa59cMXMs1SPzj9eXpGc1?"
- "Show me the transaction history for this Litecoin address"
- "What's the current Litecoin network fee?"
Dogecoin Operations (when ENABLE_DOGECOIN_TOOLS=true)
- "Check this DOGE address balance: D8vFz4p1L37jdg47HXKtSHA5uYLYxbGgPD"
- "Show me recent Dogecoin transactions"
- "What are the current DOGE network fees?"
Bitcoin Cash Operations (when ENABLE_BITCOINCASH_TOOLS=true)
- "What's the BCH balance of this address?"
- "Show me the BCH transaction history"
- "Validate this Bitcoin Cash address"
THORChain Operations (when ENABLE_THORCHAIN_TOOLS=true)
- "What's the RUNE balance of thor13zpdckczd0jvyhwxmrwnpap8gmy9m5kk2gzum3?"
- "Show me the pool information for BTC.BTC"
- "Get a swap quote for 0.1 BTC.BTC to ETH.ETH"
XRP Ledger Operations (when ENABLE_RIPPLE_TOOLS=true)
- "What's the XRP balance of rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe?"
- "Show me the transaction history for rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe"
- "Is rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe a valid XRP address?"
- "Send 10 XRP to rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe"
- "What's the current XRP Ledger information?"
- "Show me token balances for rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe"
- "Create a trustline for USD with issuer rPT1Sjq2YGrBMTttX4GZHjKu9dyfzbpAYe with a limit of 1000"
Security Notes
- Environment Variables: All private keys are stored in the .env file and never exposed in the conversation history
- Private Keys: Only use this with test wallets containing small amounts of funds
- RPC Endpoints: Custom RPC endpoints can be configured in the .env file for better reliability and rate limits
- .env Security: The .env file is automatically ignored by git to prevent accidental exposure of private keys
- Tool Registration: Use the tool registration controls to minimize security surface area by only enabling required chains
Advanced Configuration
Custom RPC Endpoints
You can configure custom RPC endpoints in your .env file for better reliability and higher rate limits. If not specified, the tool will fall back to public RPC endpoints.
Network Selection
For EVM operations, you can specify the network by name (ethereum, base, arbitrum, optimism, bsc, polygon, avalanche, berachain). The tool will automatically use the appropriate RPC endpoint and network configuration.
THORChain Configuration
The tool uses Nine Realms public endpoints by default, but you can configure a custom THORChain node URL in the .env file for better reliability and rate limits.
XRP Ledger Configuration
The tool can use either a private key or mnemonic phrase for XRP transactions. Configure these in your .env file:
XRP_PRIVATE_KEY
: Your XRP private key in hex formatXRP_MNEMONIC
: Alternative to private key - your 12-word recovery phraseXRP_ADDRESS
: Optional - Your XRP account address (used to verify the derived address)XRP_RPC_URL
: Optional - Custom XRP Ledger node URL (defaults to public endpoint)
UTXO Chain Data Providers
The tool uses several data providers for UTXO chains:
- BlockCypher
- SoChain
- Haskoin (for Bitcoin Cash)
You can configure API keys for these providers in the .env file for better rate limits.
Development
To modify or extend the tool:
- Source code is in the
src
directory - Chain-specific code in
src/chains
- Run
npm run build
after making changes - Use TypeScript for all new code
Contributing
Contributions are welcome! Please submit pull requests with any improvements or bug fixes.
License
ISC License
This server cannot be installed
A Model-Context-Protocol server enabling users to perform basic operations on Solana and Ethereum blockchains through simple RPC endpoints.
- Features
- Setup
- Tool Registration
- Usage Examples
- Solana Operations (when ENABLE_SOLANA_TOOLS=true)
- EVM Operations (when ENABLE_ETHEREUM_TOOLS=true)
- Bitcoin Operations (when ENABLE_BITCOIN_TOOLS=true)
- Litecoin Operations (when ENABLE_LITECOIN_TOOLS=true)
- Dogecoin Operations (when ENABLE_DOGECOIN_TOOLS=true)
- Bitcoin Cash Operations (when ENABLE_BITCOINCASH_TOOLS=true)
- THORChain Operations (when ENABLE_THORCHAIN_TOOLS=true)
- XRP Ledger Operations (when ENABLE_RIPPLE_TOOLS=true)
- Solana Operations (when ENABLE_SOLANA_TOOLS=true)
- Security Notes
- Advanced Configuration
- Development
- Contributing
- License