# Give your assistant a wallet (/docs/wallet)

A paid dataset charges its price for each question, in USDC on Base. Your
assistant can pay it from a wallet of its own: Coinbase's wallet adds itself to your
assistant as a tool, holds your USDC, and pays for each question the assistant asks,
within the spending limits you set. You need no quarry account, and payments are
final: an answered question can't be refunded.

The wallet is Coinbase's service, under Coinbase's terms, and it sends each paid
question through Coinbase's servers. quarry never holds the wallet, its keys, or its
money.

The wallet runs on your computer, beside Claude Desktop, Claude Code, Codex, or Gemini
CLI. ChatGPT and Claude on the web can't run it: there, use free datasets or
a subscription.

## 1. Install the wallet [#install]

In a terminal, with Node.js 22 or later:

```bash
npx @coinbase/payments-mcp
```

The installer asks which assistant you use and adds the wallet to it. To skip the
question, name the assistant: `claude` for Claude Desktop, `claude-code`, `codex`, or
`gemini`.

```bash
npx @coinbase/payments-mcp --client claude-code --auto-config
```

Then restart your assistant, or start a new session, so it loads the wallet.

## 2. Sign in [#sign-in]

Ask your assistant to open your wallet. In the window that opens, sign in with your
email address and the 6-digit code Coinbase sends you. Your first sign-in creates the
wallet.

## 3. Add USDC [#add-usdc]

The wallet pays in USDC on Base and needs nothing else: the network fee of each
payment is paid for you. Add USDC from the wallet window, or send USDC on Base to
the wallet's address from an exchange or another wallet. Your assistant can tell you
the address and the balance.

## 4. Set your limits [#limits]

Set your spending limits in the wallet window. The wallet holds every payment to them,
and your assistant has no tool to change them. The wallet can also send and trade what
it holds when your assistant asks, so keep in it only what you're ready to spend.

## 5. Ask a paid dataset [#ask]

Connect quarry to the same assistant: see [Coding agents](/docs/connect/coding-agents),
or [Chat assistants](/docs/connect/assistants) for Claude Desktop. Then ask as usual.
When a dataset is paid per question, quarry gives your assistant its price and its
address, and your assistant can pay there with the wallet.

When your assistant is connected to your quarry account, or sends one of your API
keys, each question it pays this way is listed on your **Purchases** page: what
quarry prepares for the wallet carries a code that names your account, for that
question only. See [Your purchases](/docs/purchases).

You can also name the dataset yourself. Its address is on its public page, in the HTTP
tab under Connect:

```text
Use my wallet to ask https://quarry.market/alice/market-outlook this question:
Which segment grew fastest?
```

Your assistant then pays without asking quarry first, so the question carries no
account and isn't listed on your Purchases page.

Each question costs the dataset's price, and nothing when no passage answers it: see
[What you pay for](/docs/paying#what-you-pay-for).

## If something goes wrong [#troubleshooting]

* Your assistant has no wallet tools: restart it after installing, or run the
  installer again.
* The wallet says you're not signed in: ask your assistant to open the wallet, then
  sign in again.
* The payment is refused: check that the wallet holds enough USDC on Base and
  that the price is within your spending limits.
* quarry says no passage answers the question: nothing was charged. Rephrase it, or
  try another dataset.
