Skip to content

How paying works

After you install and sign in, free calls pass through to Assay. A paid call needs a payment key on your computer and spending permission approved by your wallet. Payments use USDG on Robinhood Chain.

Security model: Assay’s servers never hold the private payment key; programs running as your OS user may be able to use it within its on-chain caps.

On the first paid attempt, assay-mcp creates the payment key locally, stores it in the OS keychain, and registers its public address with your agent’s connection after proving ownership. The tool result returns an enable-paid link that ends in #key=…. Open it, fund the escrow if needed, and approve the key in your wallet. Turn on paid calls walks through each screen. Then ask your client to repeat the paid call; the setup attempt does not complete it.

To reopen the approval page after the first paid attempt, run:

Terminal window
npx -y @goassay-ai/mcp enable-paid

This command opens the link for an existing key; it does not create the key.

Each browser sign-in has its own payment key. With ASSAY_API_KEY, several computers can share one API key. When a second computer sets up its own payment key, it does not take over: the key that is bound keeps paying, and the new one waits for approval. Its link opens Replace the payment key for the app, showing the new key under Payment key and the old one under Current payment key:. Once approved, only the new key pays. Stop the old key afterwards with Stop the old key: it keeps its on-chain permission until someone stops it. To refuse the new key, choose Discard beside it under Controls → Agents.

The client forwards the tool call. If Assay returns a payment request, assay-mcp checks it before signing. A failed or unreadable check means no payment signature.

Check What must be true
A real call is waiting The request answers a tool call just forwarded by this process and uses the supported payment format. The call has not been cancelled.
Correct destination and currency The network, escrow destination, USDG asset and decimal precision match the built-in deployment. The amount is a valid positive amount.
Quoted price A price quote exists for this tool in the same asset, and the requested amount is no higher than that quote.
Authorized payer and key The payer matches the recorded account, if one is recorded. The chain confirms an active, unexpired permission for this computer’s key. The server accepts that key’s signature and names the same key.
Agreed chain state The built-in RPC endpoints agree. The chain read is recent enough; an unavailable, stale or conflicting read blocks signing.
Spending caps The amount fits the key’s and account’s on-chain per-call caps, the local per-call cap, and the local total for the preceding 24 hours. The chain also enforces the on-chain spending-window caps when payment is redeemed.
Allowed provider and server The provider address is valid and passes any local provider restriction. Paid calls are allowed through this server URL; / is allowed by default after sign-in.
Valid request fields The sequence number, request hash, resource and timeout have valid formats and ranges. The resource names exactly the tool called, rather than another tool or an account debt operation.
Confirmation, when enabled If the amount is above the local confirmation threshold, you approve that exact payment in the client. Confirmation is off by default.

After the checks pass, the proxy records the amount against the local budget and signs an EIP-712 payment authorization. The signature covers the payer, provider, amount, tool resource, request hash, sequence and validity times, on the built-in chain and escrow contract. It sends the tool call again with that authorization attached.

It signs at most one payment per tool call. A second payment request for that call is returned unsigned.

The latest assay-mcp pays on a payment channel automatically; there is nothing to turn on. Instead of one payment and one on-chain transaction per call, the payment key signs one running total per channel, and Assay records many calls on chain in one transaction. The on-chain cost per call is much lower. The checks above, your limits and the refund rules stay the same: the local 24-hour total counts each call’s price, never the channel’s running total.

Topic What happens
When it is used When Assay offers a channel for the call and the offer matches the payment request exactly. Otherwise that call is paid per call, as before.
When it settles About 30 minutes after the first call not yet recorded on chain, sooner when that amount reaches $5. Until then the money stays in your escrow. Then a dispute hold of at least 1 hour, rounded up to the next full hour.
Where the record is kept In the profile’s state file, profiles/<profile>.state.json in the assay-mcp folder: ~/Library/Application Support/assay-mcp/ on macOS, ~/.config/assay-mcp/ on Linux, %USERPROFILE%\AppData\Roaming\assay-mcp\ on Windows.
Several clients Every client on the computer that uses the same profile shares that record under the profile lock, so they can run at the same time.
Sign-out logout deletes the state file, and with it the channel record. Sign out only when no paid call is owed.
Damaged record It is never reset. Paid calls stop until it is fixed, as for any damaged state file.

Releases before 1.2.0 pay every call per call. An entry written by the add helper names the exact version it installed: run your add command again with --force (for example npx -y @goassay-ai/mcp add / --client claude-code --force) to move it to the latest release, then restart the client.

If a channel payment for a call your agent received could not be collected in time, paid calls pause until it is. The proxy renews it by itself, signing the same total again on the same channel, never more, and your AI reads one of these:

The AI reads What to do
Assay is collecting an earlier payment your agent already signed. Paid calls usually resume within about 5 minutes. This call was not charged. Ask again in a few minutes.
Assay could not collect an earlier payment your agent signed yet. Call again in a minute or two. This call was not charged. Ask again in a minute or two.
Your agent no longer has the payment record for an earlier channel payment. Settle it in the Assay app at https://portal.goassay.ai/funding once it is offered there. The record is gone (state file deleted, another computer or profile). Settle it on Money → Funding once the app offers it, about 2 hours after the channel’s last signature expired.

Your client returns the paid tool result without another setup link. A call outside the local limits is refused before signing.

Reason Meaning Fix
Payment key mismatch The approval link does not name the key registered for this connection. Do not approve; reopen the complete link from your client.
Chain state cannot be confirmed The proxy cannot verify the key’s permission. Wait until the chain can be read and permission is confirmed before asking again.
Amount above a cap or quote The payment is outside an applicable bound. Choose a tool within the default limits and its quoted price.
Waiting for earlier payments to settle on chain; retry in about N minutes. Nothing was charged. Earlier payments are still being recorded on chain and this call would pass what is available until they are. Not a lack of funds. Ask again after the time shown.
Assay could not take this payment on its payment channel. Ask again to pay. Nothing was charged. The channel could not take this payment. Ask again. The next call uses a new channel, or pays per call.
This key cannot pay. Create a key with paid calls on. The ASSAY_API_KEY key has no Pay permission. Create a key with the Agent choice. See CLI reference.