DEV Community

Cover image for Claude Desktop + Account Abstraction: MCP Tools for Gasless AI Agent Transactions
Wallet Guy
Wallet Guy

Posted on

Claude Desktop + Account Abstraction: MCP Tools for Gasless AI Agent Transactions

One JSON Block in claude_desktop_config.json. Your Claude Agent Now Has a Wallet.

MCP tools for onchain actions are the fastest way to give Claude Desktop real financial superpowers — and WAIaaS is an MCP server that drops 45 tools into your Claude config with a single block of JSON. If you've been building with Claude's Model Context Protocol and wondering how to extend your agent into DeFi, token transfers, or gasless transactions via Account Abstraction, this is the practical guide you've been looking for.

Why This Actually Matters

Most AI agent wallet setups require you to write glue code: an HTTP client, auth handling, transaction polling, error recovery. Then you have to figure out how to surface all of that to your LLM in a way it can actually reason about.

MCP sidesteps all of that. Claude already knows how to call tools. WAIaaS already speaks MCP. The gap between "Claude understands what I want" and "Claude executes it onchain" shrinks to a config file and a running daemon.

The stakes here are real: AI agents that can only read the world are limited. Agents that can act — swap tokens, pay for API calls automatically, manage DeFi positions — are a different category of tool entirely. Account Abstraction (ERC-4337) pushes this further by enabling gasless transactions, so your agent doesn't need to juggle native token balances just to pay for gas.

What WAIaaS Actually Is

WAIaaS is an open-source, self-hosted Wallet-as-a-Service for AI agents. It runs as a local daemon (on port 127.0.0.1:3100 by default), exposes a REST API with 39 route modules, and ships a first-class MCP package that Claude Desktop can talk to directly.

The numbers that matter for MCP developers:

  • 45 MCP tools covering wallet, transaction, DeFi, NFT, and x402 operations
  • 15 DeFi protocol integrations: Aave v3, Jupiter Swap, Hyperliquid, Lido, Jito, LI.FI, Across, Pendle, Polymarket, and more
  • 18 networks across EVM and Solana
  • 21 policy types with 4 security tiers (INSTANT / NOTIFY / DELAY / APPROVAL) and default-deny enforcement
  • ERC-4337 Account Abstraction with gasless transactions and a UserOp build/sign API

It's a 15-package monorepo. The MCP package is @waiaas/mcp on npm. You don't need to build anything.

The Config Block That Gives Claude a Wallet

Here's what the MCP integration looks like on the Claude Desktop side:

{
  "mcpServers": {
    "waiaas": {
      "command": "npx",
      "args": ["-y", "@waiaas/mcp"],
      "env": {
        "WAIAAS_BASE_URL": "http://127.0.0.1:3100",
        "WAIAAS_SESSION_TOKEN": "wai_sess_<your-token>",
        "WAIAAS_DATA_DIR": "~/.waiaas"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Drop this into ~/Library/Application Support/Claude/claude_desktop_config.json (macOS), restart Claude Desktop, and the @waiaas/mcp package is pulled via npx automatically — no global install required.

Three environment variables do all the work:

  • WAIAAS_BASE_URL — points to your local daemon
  • WAIAAS_SESSION_TOKEN — scopes Claude to a specific wallet with its own policy set
  • WAIAAS_DATA_DIR — where session tokens are cached locally

Once connected, Claude can call any of the 45 MCP tools. It doesn't need to know the REST API. It doesn't need to manage auth headers. It just calls tools.

Getting the Daemon Running First

Before Claude can talk to WAIaaS, the daemon needs to be up. The fastest path:

npm install -g @waiaas/cli
waiaas init                    # Creates config directory and config.toml
waiaas start                   # Starts daemon, sets master password on first run
waiaas quickset --mode mainnet # Creates wallets + MCP sessions in one step
Enter fullscreen mode Exit fullscreen mode

quickset is the key command here. It creates wallets across networks and generates session tokens, then prints the exact MCP config JSON you need to paste into Claude Desktop. Or, if you want to skip the copy-paste:

waiaas mcp setup --all    # Auto-registers all wallets with Claude Desktop
Enter fullscreen mode Exit fullscreen mode

If you'd rather run it in Docker (which is a reasonable production approach):

docker run -d \
  --name waiaas \
  -p 127.0.0.1:3100:3100 \
  -v waiaas-data:/data \
  -e WAIAAS_AUTO_PROVISION=true \
  ghcr.io/waiaas/waiaas:latest

docker exec waiaas cat /data/recovery.key
Enter fullscreen mode Exit fullscreen mode

WAIAAS_AUTO_PROVISION=true generates a master password on first start and writes it to /data/recovery.key. No interactive prompt, no manual password entry — useful for headless setups.

What Claude Can Actually Do After Setup

Once the MCP server is connected, here's the real shape of what's possible:

Balance and wallet info:

"Check my wallet balance"
→ Claude calls get_balance → returns current balance

DeFi actions:

"Swap 0.1 SOL for USDC on Jupiter"
→ Claude calls action-provider with the jupiter-swap provider

"Show my DeFi positions across all protocols"
→ Claude calls get_defi_positions → returns lending, staking, and LP positions

Account Abstraction (gasless transactions):
The build-userop, sign-userop, and related tools expose the full ERC-4337 UserOperation flow directly as MCP tools. Claude can build a UserOp, sign it, and submit it — without the agent wallet needing to hold native tokens for gas. This is what makes AI agents genuinely practical for high-frequency or low-value operations where gas costs would otherwise eat into every action.

The full 45-tool list includes: action-provider, approve-token, build-userop, call-contract, connect-info, encode-calldata, erc8004-get-agent-info, erc8004-get-reputation, get-address, get-assets, get-balance, get-defi-positions, get-health-factor, get-incoming-summary, get-nft-metadata, get-nonce, get-policies, get-provider-status, get-rpc-proxy-url, get-tokens, get-transaction, get-wallet-info, hyperliquid, list-credentials, list-incoming-transactions, list-nfts, list-offchain-actions, list-sessions, list-transactions, polymarket, resolve-asset, send-batch, send-token, sign-message, sign-transaction, sign-userop, simulate-transaction, transfer-nft, wc-connect, wc-disconnect, wc-status, x402-fetch, and more.

Multi-Wallet: One MCP Server Per Agent

If you're running multiple agents with different risk profiles — say, a conservative treasury wallet and an active trading wallet — you can configure separate MCP server entries pointing to the same daemon but different session tokens:

{
  "mcpServers": {
    "waiaas-trading": {
      "command": "npx",
      "args": ["-y", "@waiaas/mcp"],
      "env": {
        "WAIAAS_BASE_URL": "http://127.0.0.1:3100",
        "WAIAAS_AGENT_ID": "019c47d6-51ef-7f43-a76b-d50e875d95f4",
        "WAIAAS_AGENT_NAME": "trading-agent",
        "WAIAAS_DATA_DIR": "~/.waiaas"
      }
    },
    "waiaas-solana": {
      "command": "npx",
      "args": ["-y", "@waiaas/mcp"],
      "env": {
        "WAIAAS_BASE_URL": "http://127.0.0.1:3100",
        "WAIAAS_AGENT_ID": "019c4cd2-86e8-758f-a61e-9c560307c788",
        "WAIAAS_AGENT_NAME": "solana-wallet",
        "WAIAAS_DATA_DIR": "~/.waiaas"
      }
    }
  }
}
Enter fullscreen mode Exit fullscreen mode

Each entry gets its own wallet, its own session, and its own policy set. The trading agent can have aggressive spending limits; the Solana wallet can be locked down to a specific token whitelist. They're isolated by design.

Policies: The Safety Layer Claude Operates Within

This is worth being explicit about, because it's easy to gloss over. WAIaaS has a policy engine with 21 policy types and a 4-tier security model. Every transaction your Claude agent attempts passes through this before execution:

curl -X POST http://127.0.0.1:3100/v1/policies \
  -H "Content-Type: application/json" \
  -H "X-Master-Password: my-secret-password" \
  -d '{
    "walletId": "<wallet-uuid>",
    "type": "SPENDING_LIMIT",
    "rules": {
      "instant_max_usd": 100,
      "notify_max_usd": 500,
      "delay_max_usd": 2000,
      "delay_seconds": 900,
      "daily_limit_usd": 5000
    }
  }'
Enter fullscreen mode Exit fullscreen mode

Tier logic is straightforward:

  • ≤ $100: Execute immediately (INSTANT)
  • ≤ $500: Execute and notify you (NOTIFY)
  • ≤ $2,000: Queue for 15 minutes, cancellable (DELAY)
  • > $2,000: Requires your explicit approval via WalletConnect or Telegram (APPROVAL)

There's also ALLOWED_TOKENS (default-deny token whitelist), CONTRACT_WHITELIST (default-deny contract whitelist), PERP_MAX_LEVERAGE, LENDING_LTV_LIMIT, and 15 more. The default-deny posture means: if you haven't explicitly whitelisted a token or contract, the transaction is blocked. Claude can't accidentally drain your wallet into an unrecognized contract.

Before any real execution, agents can also dry-run:

curl -X POST http://127.0.0.1:3100/v1/transactions/send \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer wai_sess_<token>" \
  -d '{
    "type": "TRANSFER",
    "to": "recipient-address",
    "amount": "0.1",
    "dryRun": true
  }'
Enter fullscreen mode Exit fullscreen mode

The simulate-transaction MCP tool surfaces this directly, so Claude can sanity-check a transaction before committing to it.

Quick Start: Five Steps

  1. Install the CLI and initialize:
   npm install -g @waiaas/cli
   waiaas init
   waiaas start
Enter fullscreen mode Exit fullscreen mode
  1. Create wallets and sessions:
   waiaas quickset --mode mainnet
Enter fullscreen mode Exit fullscreen mode
  1. Auto-register with Claude Desktop:
   waiaas mcp setup --all
Enter fullscreen mode Exit fullscreen mode
  1. Restart Claude Desktop — the MCP server connects automatically via npx @waiaas/mcp

  2. Ask Claude to check your balance — it calls get_balance and returns your wallet's current state

That's the full path from zero to a Claude agent with onchain capabilities.

What's Next

The interactive API reference at http://127.0.0.1:3100/reference (auto-generated OpenAPI 3.0 spec with Scalar UI) gives you a full picture of every endpoint the daemon exposes — useful if you want to go deeper than the MCP tools or integrate the REST API directly into your own agent framework. The TypeScript SDK (@waiaas/sdk) and Python SDK (waiaas) are the programmatic path for agents that don't use MCP.

The source code, full documentation, and issue tracker are at github.com/waiaas/WAIaaS. The official site with setup guides is at waiaas.ai.

If you're already building with Claude Desktop and MCP, the marginal cost of adding WAIaaS is one config block and a running daemon. The payoff is 45 tools that let your agent move value, interact with DeFi protocols, and handle gasless transactions — without you writing a single line of wallet integration code.

Top comments (0)