Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Examples

Practical examples demonstrating MCP Wallet Server capabilities. These show how AI agents and applications can interact with Ethereum wallets programmatically.

Balance Inquiry

Check the ETH balance of any Ethereum address:

Request
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "mcpwallet_get_balance",
    "arguments": {
      "address": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
    }
  }
}

Transaction Execution

Send ETH to another address with automatic gas estimation:

Request
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "mcpwallet_send_transaction",
    "arguments": {
      "to": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045",
      "amount": "0.01"
    }
  }
}

HTTP 402 Payment Required

Access premium web content protected by HTTP 402 Payment Required responses with automatic payment processing:

Request
{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "tools/call",
  "params": {
    "name": "mcpwallet_browse_with_payment",
    "arguments": {
      "url": "https://premium-content.example.com/article"
    }
  }
}

Advanced Workflow

Combine operations for complex interactions:

Workflow Example
// 1. Check balance first
{
  "method": "tools/call",
  "params": {
    "name": "mcpwallet_get_balance",
    "arguments": { "address": "0x..." }
  }
}
 
// 2. Send payment if sufficient balance
{
  "method": "tools/call",
  "params": {
    "name": "mcpwallet_send_transaction",
    "arguments": { "to": "0x...", "amount": "0.1" }
  }
}
 
// 3. Access paid content
{
  "method": "tools/call",
  "params": {
    "name": "mcpwallet_browse_with_payment",
    "arguments": { "url": "https://paid.example.com" }
  }
}