Claude Code Setup

This guide covers setting up WalletAgent specifically for Claude Code, Anthropic's official CLI for Claude.

Prerequisites

Installation

Add WalletAgent to Claude Code using bunx (or npx as fallback):

# Using bunx (recommended)
claude mcp add wallet-agent bunx wallet-agent@latest

# Using npx (fallback if bunx not available)
claude mcp add wallet-agent npx wallet-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

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

  1. Start with Mock Mode: Always begin with safe test wallets

  2. Test Thoroughly: Use contract simulation before real transactions

  3. Environment Isolation: Keep testnet and mainnet configurations separate

  4. Security First: Never share private keys in chat

Using Claude Code Effectively

  1. Be Specific: "Send 100 USDC to 0x123..." vs "send tokens"

  2. Ask for Explanations: "Explain what this transaction does"

  3. Request Validations: "Check if this is safe before executing"

  4. Use Context: Reference previous operations naturally

Error Recovery

  1. Read Error Messages: Claude Code explains Web3 errors clearly

  2. Ask for Help: "Why did this transaction fail?"

  3. Try Alternatives: "Is there another way to do this?"

  4. Check Status: "What's the current state of my wallet?"

Next Steps

Now that WalletAgent is configured with Claude Code:

  1. Try the Quick Start Guide - Learn basic operations

  2. Explore User Operations - Master wallet management

  3. Developer Features - Smart contract development

  4. Advanced Topics - Real wallets and custom chains

Getting Help

Resources


Ready to explore Web3 with Claude Code and WalletAgent? Let's begin.

Last updated