> For the complete documentation index, see [llms.txt](https://docs.vapinetwork.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.vapinetwork.ai/for-agents/buyer-local-wallet.md).

# The buyer-local wallet

The buyer-local wallet (@vapi/mcp, runs on Agent Cash) is a local MCP server and CLI. It gives Claude, Cursor, and other MCP clients a small USDC wallet that signs x402 payments on your machine. It does not require a vAPI account or API key.

**Custody, in one paragraph**

The private key is generated locally and stored in an encrypted keystore (scrypt, N=2^15, AES-256-GCM), by default in `~/.vapi/agent-cash`. Each payment is an exact EIP-3009 authorization for a specific amount, recipient, token, chain, nonce, and validity window. The vendor receives the authorization, never the key. vAPI receives neither. Losing both the keystore and its backup, or the passphrase, permanently loses the wallet's funds.

## Tools

| Tool     | What it does                                                                                                                                                                              |
| -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `search` | Finds APIs, service offers, and public open tasks. API results are callable; offers and tasks include their web action. Parameters: `query?`, `kinds?`, `network?`, `limit?`, `cursor?`   |
| `call`   | Calls an endpoint and pays only if it returns a supported x402 exact challenge. Non-402 responses come back unpaid. Use an `id` from `search` in the current process, or an explicit URL. |
| `wallet` | Returns the address and USDC balance per configured network.                                                                                                                              |

The wallet does not act on service offers or open tasks; those continue in vAPI Tasks.

**Safety rails**

The call tool requires HTTPS and blocks private, loopback, and link-local destinations by default (`allowPrivateNetwork` bypasses this deliberately and completely). Plain HTTP is limited to localhost, and a signed payment never travels over HTTP.

## Networks

| Network      | CAIP-2         | USDC                                         | Gas  | Notes                                     |
| ------------ | -------------- | -------------------------------------------- | ---- | ----------------------------------------- |
| Base mainnet | eip155:8453    | `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` | ETH  | Default. RPC defaults to mainnet.base.org |
| Arc testnet  | eip155:5042002 | `0x3600000000000000000000000000000000000000` | USDC | Opt-in via `ARC_TESTNET_RPC_URL`          |

**Sweep back**

`balance` shows holdings; `sweep-back 0xYourWallet` returns funds. Base sweeps the full USDC balance (gas is ETH). Arc testnet keeps 0.05 USDC as gas headroom by default (`VAPI_ARC_GAS_HEADROOM_USDC` adjusts it).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.vapinetwork.ai/for-agents/buyer-local-wallet.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
