MCP Ledger Server
Provides enhanced RPC performance for Ethereum and other networks via Alchemy API integration.
Enables Ethereum blockchain operations including ETH transfers, ERC20 token transfers, NFT operations, and smart contract interactions via Ledger hardware wallet.
Supports Optimism network for transactions, balance checks, and token management.
Supports Polygon network for transactions, balance checks, and token management.
Supports Solana blockchain operations including token transfers and NFT management via Ledger hardware wallet.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Ledger Servershow my ETH balance on Ethereum mainnet"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Ledger Server
A comprehensive Model Context Protocol (MCP) server for secure Ledger hardware wallet integration with Ethereum blockchain operations. Build AI agents that can safely interact with your crypto assets using hardware-level security.
π Features
π Hardware Wallet Security
β Ledger hardware wallet integration with latest @ledgerhq libraries
β Private keys never leave your device - all signing happens on hardware
β Transaction confirmation required on device screen
β Multi-account support with BIP32 derivation paths
βοΈ Multi-Network Support
β 6 Networks: Ethereum, Polygon, Arbitrum, Optimism, Base, Sepolia
β Enhanced RPC with Alchemy API integration
β Automatic fallback to public endpoints
β EIP-1559 transaction support with dynamic gas pricing
πͺ Complete Asset Management
β Real-time ETH balances across all networks
β ERC20 token discovery and balances via Dune Sim API
β ERC721/ERC1155 NFT tracking and transfers
β Token approval management (approve/revoke/modify)
β USD pricing and portfolio valuation
π€ AI Agent Ready
β 14 MCP tools for complete blockchain operations
β One-command convenience functions (send ETH, transfer tokens, etc.)
β Transaction crafting with automatic gas estimation
β Message signing for Sign-In with Ethereum (SIWE)
β Real-time gas analysis and optimization
Related MCP server: EVM MCP Server
π Available Tools
π Wallet & Balance Tools
Tool | Description | Example Use |
| Get Ethereum address from Ledger | Get your wallet address |
| Get ETH balance for any address | Check account balance |
| Get ERC20 token balances | View your token portfolio |
| Get NFT collection balances | See your NFT holdings |
β‘ Transaction Tools
Tool | Description | Example Use |
| Create unsigned transactions | Prepare complex contract calls |
| Sign with Ledger device | Sign prepared transactions |
| Sign messages (SIWE) | Authenticate with dApps |
| Send signed tx to network | Submit transactions |
π― Convenience Tools (One-Click Actions)
Tool | Description | Example Use |
| Send ETH (craftβsignβbroadcast) | Send ETH to friend |
| Send tokens (craftβsignβbroadcast) | Send USDC payment |
| Send NFTs (craftβsignβbroadcast) | Transfer NFT |
| Manage approvals (craftβsignβbroadcast) | Approve DEX spending |
π οΈ Developer Tools
Tool | Description | Example Use |
| Get verified contract ABIs | Interact with contracts |
| Gas price analysis & optimization | Optimize transaction costs |
π Quick Start
1. Install Dependencies
# Clone and install
git clone <repository-url>
cd mcp-ledger
npm install
npm run build2. Get API Keys
π Required: Dune Sim API
# Get your free API key at: https://sim.dune.com
# Required for token/NFT discovery across 60+ chains
DUNE_SIM_API_KEY=your_dune_sim_api_key_hereπ Optional: Performance APIs
# Alchemy (recommended) - Enhanced RPC performance
# Get key at: https://alchemy.com (2M+ requests/month free)
ALCHEMY_API_KEY=your_alchemy_api_key_here
# Etherscan (optional) - Contract verification
# Get key at: https://etherscan.io/apis (100k requests/day free)
ETHERSCAN_API_KEY=your_etherscan_api_key_here3. Configure Environment
# Copy template and add your keys
cp .env.example .env
# Edit .env with your API keys4. Connect Your Ledger
π Connect Ledger device via USB
π Unlock device with PIN
π± Open Ethereum app
βοΈ Enable "Blind signing" in Ethereum app settings
5. Test Connection
# Test basic connection
node test-ledger-connection.js
# Test MCP server
npm start
# In another terminal:
node test-server.cjsπ₯οΈ Integration with AI Tools
π Claude Code (Recommended)
The easiest way to use MCP Ledger with Claude Code:
# Add MCP Ledger server to your current project
claude mcp add ledger --env DUNE_SIM_API_KEY=your_key_here -- node /absolute/path/to/mcp-ledger/dist/index.js
# Or add with all environment variables
claude mcp add ledger \
--env DUNE_SIM_API_KEY=your_dune_key \
--env ALCHEMY_API_KEY=your_alchemy_key \
--env ETHERSCAN_API_KEY=your_etherscan_key \
-- node /absolute/path/to/mcp-ledger/dist/index.js
# Check server status
claude mcp list
/mcp
# Remove server if needed
claude mcp remove ledgerConfiguration Scopes:
--scope local- Private to current project (default)--scope project- Shared via.mcp.json(team access)--scope user- Available across all your projects
π₯οΈ Claude Desktop (macOS/Windows)
Open Claude Desktop settings
Add to
claude_desktop_config.json:
{
"mcpServers": {
"mcp-ledger": {
"command": "node",
"args": ["/absolute/path/to/mcp-ledger/dist/index.js"],
"env": {
"DUNE_SIM_API_KEY": "your_dune_key_here",
"ALCHEMY_API_KEY": "your_alchemy_key_here",
"ETHERSCAN_API_KEY": "your_etherscan_key_here"
}
}
}
}β Verify Integration
After setup, verify the server is working:
# In Claude Code
/mcp
# Should show:
β
ledger: Connected (22 tools available)
- 14 Ethereum tools + 8 Solana tools
- Networks: mainnet, polygon, arbitrum, optimism, base, sepolia, solana-mainnet, solana-devnet, solana-testnetAvailable Tools:
get_ledger_address,get_balance,get_token_balances,get_nft_balances,craft_transaction,get_contract_abi,sign_transaction,sign_message,broadcast_transaction,send_eth,send_erc20_token,send_erc721_token,manage_token_approval,analyze_gas
Cursor IDE
Open Cursor Settings β Extensions β MCP
Add server configuration:
{
"name": "mcp-ledger",
"command": "node",
"args": ["/path/to/mcp-ledger/dist/index.js"],
"env": {
"DUNE_SIM_API_KEY": "your_key_here"
}
}VS Code with MCP Extension
Install MCP extension
Add to MCP settings:
{
"mcp.servers": {
"ledger": {
"command": "node",
"args": ["/absolute/path/to/mcp-ledger/dist/index.js"],
"env": {
"DUNE_SIM_API_KEY": "your_key_here"
}
}
}
}Other MCP-Compatible Tools
Use this general configuration pattern:
Command:
nodeArgs:
["/path/to/mcp-ledger/dist/index.js"]Transport: stdio
Environment: Add your API keys
π‘ Usage Examples
Check Your Portfolio
Show me my ETH balance and top 5 token holdings on mainnetSend Payments
Send 0.1 ETH to 0x742d35Cc6631C0532925a3b8D0c7e89e5a3A5d34 on mainnetTransfer Tokens
Send 100 USDC to my friend at 0x... on polygon networkManage Approvals (Ethereum)
Revoke all token approvals for Uniswap router on mainnetGas Optimization
Analyze current gas prices on mainnet and recommend optimal settings for an ERC20 transferNFT Operations (Ethereum)
Transfer my CryptoPunk #1234 to 0x... and show me the transaction detailsπ§ Advanced Configuration
Custom Networks
Add custom RPC endpoints in .env:
# Custom RPC URLs (optional)
MAINNET_RPC_URL=https://your-custom-rpc.com
POLYGON_RPC_URL=https://polygon-custom.comDevelopment Mode
# Run in development with hot reload
npm run dev
# Run comprehensive tests
npm run test:all
# Test with real hardware (Ledger required)
npm run test:hardwarePerformance Tuning
# Adjust cache and timeout settings
REQUEST_TIMEOUT=60000 # 60 second timeout
CACHE_TTL=600 # 10 minute cacheπ« Without Required APIs
β οΈ Important: Without DUNE_SIM_API_KEY:
β Token discovery won't work
β NFT discovery won't work
β Only basic ETH operations available
β Ledger signing still works
β Custom transaction crafting works
π§ Troubleshooting
Common Issues
MCP Server Not Connecting:
# Check if server is properly built
npm run build
# Test server directly
node dist/index.js
# Verify in Claude Code
/mcp
claude mcp listLedger Device Issues:
π Ensure device is connected via USB
π Device is unlocked with PIN
π± Correct app is open (Ethereum or Solana)
βοΈ "Blind signing" enabled in Ethereum app
π‘ No other applications using the device
Environment Variables:
# Check your environment file
cat .env
# Verify paths are absolute
which node # Use this path in configurations
pwd # Current directory for absolute pathsNetwork Issues:
Use Alchemy API key for better reliability
Consider QuickNode for production
Check firewall settings for outbound connections
ποΈ Architecture
Core Technologies
TypeScript - Full type safety with strict configuration
Viem - Modern Ethereum library for blockchain interactions
Ledger SDK - Official hardware wallet integration
MCP SDK - Model Context Protocol compliance
Zod - Runtime schema validation
Service Architecture
π ServiceOrchestrator - Coordinates all multi-chain operations
π LedgerService - Hardware wallet communication (Ethereum + Solana)
βοΈ BlockchainService - Ethereum multi-network RPC management
π SolanaBlockchainService - Solana multi-network RPC management
ποΈ TransactionCrafter - Smart Ethereum transaction building
π SolanaTransactionCrafter - Smart Solana transaction building
π BlockscoutClient - Contract verification and ABIs (Ethereum)
Security Model
π Hardware Security:
β Private keys never leave Ledger device
β All transactions require physical confirmation on device screen
β BIP32 hierarchical deterministic key derivation
β Comprehensive input validation and sanitization
π‘οΈ Software Security:
β Zod schema validation for all inputs
β Multi-layer error handling
β Process isolation via stdio transport
β No authentication required for local use
π Network Status Verification
When you start the server, you'll see configuration status:
β Optimal Setup:
β
Dune Sim API configured for reliable token discovery
β
Enhanced RPC provider configured (Alchemy)
β
Contract verification API configured (Etherscan)
β
Ledger device connected successfullyβ οΈ Limited Setup:
β DUNE_SIM_API_KEY is required for token discovery functionality
β οΈ No enhanced RPC provider configured. Using public endpoints.
β οΈ Ledger device not connected (can be connected later)π€ Contributing
Built with modern TypeScript practices:
π§ͺ Comprehensive test suite (unit, integration, e2e, hardware)
π ESLint + TypeScript strict mode
π Automated CI/CD pipeline
π Full API documentation
π License
MIT License - see LICENSE file for details.
π Keep Your Crypto Safe: This tool enhances security by keeping your private keys on hardware while enabling powerful AI interactions with your crypto assets.
Built with β€οΈ by Dennison Bertram
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dennisonbertram/mcp-ledger'
If you have feedback or need assistance with the MCP directory API, please join our Discord server