Add WalletAgent to Claude Code using bunx (or npx as fallback):
# Using bunx (recommended)claudemcpaddwallet-agentbunxwallet-agent@latest# Using npx (fallback if bunx not available)claudemcpaddwallet-agentnpxwallet-agent@latest
This command:
Downloads the latest version of WalletAgent
Configures it as an MCP server
Makes it available in all Claude Code sessions
💡 Performance Tip:bunx provides faster startup times and better performance than npx.
Verification
Check MCP Status
Verify WalletAgent is installed and running:
You should see output like:
Test Basic Functionality
Try a simple command to ensure everything works:
Expected response:
Configuration Options
Private Key Security: For real wallet operations, use WalletAgent's encrypted keystore or import features.
Claude Code Features
Prompts
Claude Code excels at interpreting prompts. You can use conversational commands:
Context Awareness
Claude Code maintains context across commands:
Error Handling and Guidance
When things go wrong, Claude Code provides helpful explanations:
Workflow Integration
With Code Projects
Claude Code can help integrate WalletAgent into your development workflow:
With Documentation
Ask Claude Code to explain and document your Web3 operations:
Advanced Features
Custom Instructions
Create a ~/.claude/instructions.md file to customize WalletAgent behavior:
Project-Specific Configuration
Create .claude/instructions.md in your project:
Best Practices
Development Workflow
Start with Mock Mode: Always begin with safe test wallets
Test Thoroughly: Use contract simulation before real transactions
Environment Isolation: Keep testnet and mainnet configurations separate
Security First: Never share private keys in chat
Using Claude Code Effectively
Be Specific: "Send 100 USDC to 0x123..." vs "send tokens"
Ask for Explanations: "Explain what this transaction does"
Request Validations: "Check if this is safe before executing"
Use Context: Reference previous operations naturally
Error Recovery
Read Error Messages: Claude Code explains Web3 errors clearly
Ask for Help: "Why did this transaction fail?"
Try Alternatives: "Is there another way to do this?"
Check Status: "What's the current state of my wallet?"
Next Steps
Now that WalletAgent is configured with Claude Code:
🔧 Wallet Configuration
- Type: Mock (safe for testing)
- Available Accounts: 3
- Current Chain: Anvil (31337)
- Native Currency: ETH
💡 You're in mock mode - perfect for learning!
"I want to send 0.1 ETH to my friend's wallet at 0x742d35Cc..."
"Can you check if I have enough USDC for a 1000 token transfer?"
"Help me test my smart contract's mint function safely"
"Connect to my test wallet"
"What's my balance?"
"Send 1 ETH to the second test wallet"
"Switch to Polygon and check my POL balance"
User: "Send 1000000 ETH to 0x123"
Claude: I can see you're trying to send a very large amount (1,000,000 ETH).
This seems unusual - did you mean 1.0 ETH instead?
Also, I notice you're in mock mode with test wallets that have 10,000 ETH.
Would you like me to proceed with a smaller test amount first?
"Load the wagmi config from my project and analyze the contracts"
"Test all the functions in my ERC-20 contract"
"Help me deploy this contract to Sepolia testnet"
"Explain what this transaction does and add comments"
"Generate documentation for these contract functions"
"Create a test checklist for my DApp"
# My Wallet Instructions
## Security Preferences
- Always simulate transactions before executing
- Warn me about gas costs over $10
- Never approve unlimited token allowances
## Development Settings
- Prefer Anvil for testing
- Use conservative gas estimates
- Show detailed transaction breakdowns
# Project Instructions
This project uses:
- Wagmi for contract interactions
- Sepolia testnet for testing
- OpenZeppelin contracts
Please:
- Load wagmi config from ./src/generated.ts automatically
- Test all contracts on Sepolia before mainnet suggestions
- Use the project's standard gas settings