Tender
v0.1.12Let AI agents pay x402 APIs with any token on Robinhood Chain.
An MCP server that lets any AI agent pay x402 APIs on Robinhood Chain with whatever token it holds. Tender swaps the token to USDG on Uniswap inside the payment, so the API always receives the exact price, in one transaction. Works with Claude Desktop, Claude Code, Cursor, and any other MCP client. pay only spends when an API asks for payment, and never above your limits.
Summary extracted from the README.
@paywithtender/mcp
An MCP server that lets any AI agent pay x402 APIs on Robinhood Chain with whatever token it holds. Tender swaps the token to USDG on Uniswap inside the payment, so the API always receives the exact price, in one transaction.
Works with Claude Desktop, Claude Code, Cursor, and any other MCP client.
Tools
| Tool | What it does |
|---|---|
check_coin |
Whether a token is spendable on Tender, and what paying $1.00 costs in it |
quote |
The cost and fees of paying a given dollar amount in a given token |
wallet |
The agent's address, balances, and the spending limits left today |
pay |
Calls an API. If it answers 402 Payment Required, pays with the agent's token and returns the response |
pay only spends when an API asks for payment, and never above your limits.
Cheap micropayments. Swapping on every call means paying swap gas on every call, which can cost more than a $0.01 API. So by default the agent converts its token to USDG in batches (TENDER_BATCH_USD, $1) and pays from that: one swap per batch instead of one per call. APIs that only accept Tender swaps are still paid per call.
Works with any USDG x402 API. The merchant doesn't need to integrate Tender. Any x402 API on Robinhood Chain that accepts plain USDG (the standard exact scheme) can be paid with any token: the agent converts a batch through Tender and pays the API in USDG from that float. With TENDER_BATCH_USD=0, such APIs can only be paid from USDG the agent already holds.
Safe retries. Pass idempotency_key to pay (one key per purchase). If the agent retries after a timeout or error with the same key, Tender resends the exact same signed payment instead of signing a new one. Its Permit2 nonce is single-use on-chain, so the purchase settles at most once, however many times it's retried; a retry after success returns the original response without paying again. A new key is a new purchase and goes through the limits again.
Setup
Add this to your MCP client's config (for Claude Desktop, claude_desktop_config.json):
{
"mcpServers": {
"tender": {
"command": "npx",
"args": ["-y", "@paywithtender/mcp"],
"env": {
"TENDER_PRIVATE_KEY": "0xYOUR_AGENT_WALLET_KEY",
"TENDER_PAY_WITH": "0xTOKEN_THE_AGENT_HOLDS",
"TENDER_MAX_PER_CALL_USD": "0.50",
"TENDER_DAILY_LIMIT_USD": "5"
}
}
}
}
Use a dedicated agent wallet holding only what you're happy for the agent to spend. The key stays on your machine: payments are signed locally and only the signature is sent.
Leave out TENDER_PRIVATE_KEY to run read-only (check_coin and quote only).
Try it
Tender runs its own paid API you can test against: https://facilitator.paywithtender.com/api lists the endpoints. Once the server is set up, ask your AI:
Pay https://facilitator.paywithtender.com/api/token?address=0xda4a075417d613ec018c8959fea6ab5ac5d5b78c with my bag
It costs $0.01 plus gas, in whatever token you set as TENDER_PAY_WITH.
Settings
| Variable | Default | |
|---|---|---|
TENDER_PRIVATE_KEY |
none | Agent wallet key. Without it the server is read-only. |
TENDER_PAY_WITH |
USDG | Token to pay with. Any token with a Uniswap route to USDG works. |
TENDER_MAX_PER_CALL_USD |
1 |
Refuse any API priced above this. |
TENDER_MAX_FEE_USD |
0.10 |
Refuse if Tender's fee plus gas is above this. |
TENDER_DAILY_LIMIT_USD |
10 |
Total the agent may spend per UTC day. The running total is saved to disk, so restarting the server or the AI app doesn't reset it. |
TENDER_BATCH_USD |
1 |
When paying with a token other than USDG, convert this much of it to USDG at a time (through Tender, into the agent's own wallet), then pay APIs that accept plain USDG from that float, with no swap or fee per call. A $0.01 call then costs about $0.0102 instead of $0.01 plus a swap's gas. 0 swaps on every call. |
TENDER_VAULT |
none | Address of a TenderVault holding this agent's funds. When the wallet runs short, it pulls what it needs from the vault, only up to the daily limits the vault's owner set on-chain. The pull is relayed by Tender, so the agent needs no ETH. The owner can stop the vault or withdraw at any time. |
TENDER_APPROVAL_DAYS |
7 |
The agent approves only enough of its token for this many days at the daily limit, and renews the approval when it runs low. It never grants an unlimited allowance unless you set this to unlimited. A wallet without ETH gets its first approval sponsored; renewals need a little ETH for gas. |
TENDER_STATE_FILE |
~/.tender/spend.json |
Where today's spending is kept, per wallet. Set to none to keep it in memory only (resets on restart). |
TENDER_RPC_URL |
Robinhood Chain public RPC | |
TENDER_FACILITATOR |
https://facilitator.paywithtender.com |
Fees
- Paying in USDG: network gas only
- Paying in any other token: 0.5% + gas
- Paying in $TENDER: gas only
The first payment with a new token approves Permit2 for a capped amount: enough for TENDER_APPROVAL_DAYS days at your daily limit, never unlimited. If the agent wallet has no ETH, Tender covers the gas for that first approval. When the approval runs low the agent renews it, which needs a little ETH.
Links
- Website: https://paywithtender.com
- Is your coin spendable? https://paywithtender.com/check
- Source: https://github.com/paywithtender/tender
- SDK for APIs and agents:
@paywithtender/sdk