Listed from the MCP registry; nobody on Odel publishes it.
Buy BSV with USDC on Base through a local non-custodial MCP server.
Runs on your machine from its package; the steps are below.
At most: moves money, runs code or commands, deletes data, or sends messages for you.
Odel charges nothing per call. The publisher may charge for its own service.
Runs locally over stdio
This server isn't hosted — your MCP client launches it from a package registry. Use one of the commands below, or drop the config into your client (e.g. Claude Desktop).
Run
npx -y petasats-mcp
MCP client config
{
"mcpServers": {
"petasats": {
"command": "npx",
"args": [
"-y",
"petasats-mcp"
]
}
}
}Buy BSV with USDC on Base from your AI app through a local, non-custodial MCP server.
PetaSats supports USDC on Base to BSV only. Keys are made and kept on your machine.
Swaps are about $5 to $100. Each buyer may make three swaps and $200 per day; a shared daily total also applies. Standard speed is the default and waits for one BSV confirmation. An explicit speed: "fast" request can reduce that wait for at most $25 only when both sides agree.
Use Node.js 22 or newer. Every command here runs this release, petasats-mcp@0.2.24. Use one version in your client's entry and in terminal commands; to move to a later release, change it while no swap is running and restart the client.
One click. Your app opens and asks you to confirm:
One command. Claude Code:
claude mcp add petasats -- npx -y petasats-mcp@0.2.24
Codex (CLI, IDE extension, or app):
codex mcp add petasats -- npx -y petasats-mcp@0.2.24
Gemini CLI:
gemini mcp add -s user petasats npx -- -y petasats-mcp@0.2.24
Qwen Code:
qwen mcp add petasats npx -y petasats-mcp@0.2.24
Grok Build:
grok mcp add petasats -- npx -y petasats-mcp@0.2.24
Cline:
cline mcp add petasats --yes -- npx -y petasats-mcp@0.2.24
Kiro CLI:
kiro-cli mcp add --name petasats --command npx --args "-y,petasats-mcp@0.2.24" --scope global
A settings file. These apps take this entry in their MCP settings. If the file already has an mcpServers list, add the petasats entry inside it.
{"mcpServers":{"petasats":{"command":"npx","args":["-y","petasats-mcp@0.2.24"]}}}
| App | Where the entry goes |
|---|---|
| Cursor | ~/.cursor/mcp.json |
| Devin Desktop (formerly Windsurf) | ~/.config/devin/mcp_config.json; on Windows %APPDATA%\devin\mcp_config.json |
| Kiro | ~/.kiro/settings/mcp.json |
| Warp | ~/.warp/.mcp.json, or Settings → MCP servers |
| JetBrains AI Assistant | Settings → Tools → AI Assistant → Model Context Protocol (MCP) |
| Junie | ~/.junie/mcp/mcp.json |
| LM Studio | Program tab → Install → Edit mcp.json |
| Cline | MCP Servers → Configure → Configure MCP Servers |
VS Code (.vscode/mcp.json):
{"servers":{"petasats":{"type":"stdio","command":"npx","args":["-y","petasats-mcp@0.2.24"]}}}
Zed (~/.config/zed/settings.json):
{"context_servers":{"petasats":{"command":"npx","args":["-y","petasats-mcp@0.2.24"],"env":{}}}}
OpenCode (~/.config/opencode/opencode.json):
{"mcp":{"petasats":{"type":"local","command":["npx","-y","petasats-mcp@0.2.24"]}}}
Kilo Code (~/.config/kilo/kilo.jsonc):
{"mcp":{"petasats":{"type":"local","command":["npx","-y","petasats-mcp@0.2.24"],"enabled":true}}}
Cherry Studio: Settings → MCP Servers → Add Server. Choose type STDIO, command npx, arguments -y petasats-mcp@0.2.24.
Any model. Cline, Kilo Code, OpenCode, Goose, Cherry Studio, Zed, Warp, Qwen Code and Grok Build let you choose the model, including models from OpenRouter, DeepSeek and Qwen. The kit has been tested with Claude Code and Codex. Through OpenRouter, DeepSeek V4.1 Flash, DeepSeek V4 Pro, Qwen 4 Max, Qwen 3.8 27B, Kimi K3.1 Pro, GLM 5.3 and MiniMax M3.1 Flash each passed a check on an empty kit: set it up, get a $10 quote, accept a no, and close the kit. With any model, read the USDC amount in a quote before you say yes.
Browser apps cannot run it. claude.ai, chatgpt.com, grok.com, Perplexity and the Gemini app run in a browser and cannot start a program on your computer. The kit has to run on your computer, because that is where its keys stay.
Any client that starts local stdio servers can use command npx and args -y petasats-mcp@0.2.24. First start creates keys in ~/.petasats; PETASATS_HOME changes that location. Back up keys.json: it is the only copy. Run only one copy of a kit home, because two copies of the same keys can each sign Base payments the other cannot see.
wallet_info shows the Base address. Send it USDC on Base. ETH for gas is optional: send a little (0.0002 ETH covers many swaps), or let the kit buy its own. With your yes, buy_gas sells 0.50 USDC of the kit's balance for ETH through one CoW Protocol order, paid to the kit's own address. A CoW Protocol solver settles the order and pays its network fee, so this works with no ETH in the kit. If no solver fills the order within about 20 minutes, it expires and nothing is sold. buy_gas refuses when the kit already has 0.00002 ETH or more.
Ask in plain words, for example:
| Tool | Moves funds |
|---|---|
| get_quote | No |
| swap_asset_to_bsv | Yes |
| wait_for_swap | No |
| swap_status | No |
| wallet_info | No |
| stop_spending | No |
| withdraw_bsv | Yes |
| withdraw_base | Yes |
| fund_wallet | No — it only plans a USDC-to-BSV swap and returns a quote |
| list_liquidity | No |
| close_kit | Yes — it empties the kit into your wallets, then stops it |
| buy_gas | Yes — it sells 0.50 USDC of the kit's balance for ETH for gas |
| pay_402 | Yes — pays one BSV HTTP-402 invoice from this kit's BSV |
Use pay_402 with confirm: false to inspect an invoice, then use confirm: true only after the user approves that one payment. The kit signs from its own BSV; the API service, not PetaSats, broadcasts the transaction. The per-call cap applies to the invoice amount. The daily cap includes each invoice amount and its network fee. Payments use only the kit's confirmed BSV, or change from one of its own earlier payments once that service accepted it.
You can create ~/.petasats/limits.json to restrict where an AI may send funds and how much it may swap per UTC day:
{
"format": "petasats.limits/1",
"bsvDestinations": ["1BoatSLRHtKNngkdXEeobR76b53LETtpyT"],
"baseDestinations": ["0x1111111111111111111111111111111111111111"],
"maxSwapUsdPerDay": 50,
"allowFastSettlement": false,
"x402MaxSatsPerCall": 10000,
"x402MaxSatsPerDay": 100000
}
Keep this file private to your user account: chmod 600 ~/.petasats/limits.json. The kit refuses a limits file that other users can read or write. It rereads the file before every money operation. A refusal says that it was refused by your limits file and that nothing was sent. Use npx petasats-mcp@0.2.24 limits to inspect it.
stop_spending stops new swaps and withdrawals immediately. Only you can resume with npx petasats-mcp@0.2.24 resume; recovery for swaps already started keeps working.
allowFastSettlement: false forbids fast settlement for new swaps. If the field is missing, an explicitly requested fast swap is permitted to negotiate it; standard remains the default.
x402MaxSatsPerCall and x402MaxSatsPerDay are positive satoshi caps for pay_402; the daily cap includes network fees from every payment record created that UTC day.
These controls protect against an AI that can only use the kit's tools. An AI app that can run shell commands or edit files as you can also edit limits.json or STOP.
Ask: “Send everything to my wallets and close the kit. My Base address is 0x… and my BSV address is 1….”
close_kit empties the kit into your own wallets, then stops it. Each call does one step, and the AI calls again until the kit reports closed:
buy_gas) is finishing, it waits. While a swap is running, it refuses and says when to try again. While spending is stopped for another reason, it refuses.One close-down goes to one pair of addresses, and your limits file applies to them. In a terminal, quit your AI app first (only one copy of a kit runs at a time), then run npx petasats-mcp@0.2.24 close <base_address> <bsv_address>. It repeats the steps until the kit is closed. After a brief failure, such as a network error, or while a swap is still running, it tries again; if a step is refused for any other reason, it stops and gives the reason.
Closing never deletes keys.json. Keep it, because anything sent to the kit's addresses later can only be recovered with it. To use the kit again, run npx petasats-mcp@0.2.24 resume.
Each answer includes sent, every send made in this close-down so far. That list comes from the kit's own records; a block explorer shows your addresses' full history.
The server gives the AI an operating guide. With a person watching, it reports one line per stage and a final summary with transaction IDs. For a program it returns only the result. Reporting never holds up a swap, and nothing asks for confirmation after a swap starts.
The kit runs on your machine. Its keys are made and kept there, and PetaSats never holds your coins. Funds can go only to the swap contract on Base, the kit's own addresses, or an address you provide.
The counterparty quotes a price, can decline or delay a swap, and locks BSV for you. It cannot take your USDC without the swap secret, and the kit reveals that secret only by claiming your BSV. If the counterparty never locks BSV, your USDC refunds to you once the Base lock expires, about 10 hours (180,000 Base blocks) after you lock it. The counterparty's BSV lock can return to it after at most 12 BSV blocks (about 2 hours), so the kit claims well before then.
A swap has a competing transaction by design: the counterparty's BSV refund becomes valid at a fixed block height. So standard settlement waits until the counterparty's BSV lock is in a block and checked against a merkle proof and block headers before the kit reveals the secret, and after it claims, the kit watches its claim until that is in a block too. The standard Base gate is 60 confirmations (about 12 seconds). Fast mode reveals against an unconfirmed BSV lock, and if the counterparty double-spends that lock you can lose the swap amount. It runs only when you request speed: "fast", both sides agree, and the amount is within the quote's fast cap: at most $25, and the kit refuses any cap above $35.
You trust the npm package you run (see Verify what you run), the Base RPC and BSV data services the kit reads, and the BSV network's first-seen rule while a transaction is unconfirmed. Recovery resumes after a restart. Run one swap at a time, and keep the server running during a swap.
get_quote shows the rate and comparison with market mid. You pay Base gas in ETH, the BSV claim fee, and a small extra BSV fee with deliver_to. If the kit buys its own gas, buy_gas spends 0.50 USDC of the kit's balance on that ETH, CoW Protocol's fee included. See get_quote for protocol fees.
The npm package is built by GitHub Actions from a tagged commit and published with npm provenance. Run npm audit signatures; the npm page links the build to its commit and workflow run. dist/petasats-mcp.mjs is not minified. Source under src/ is exported from the development repository for each release with internal development comments removed and internal names replaced by neutral ones; apart from that it is identical.
The kit uses ~/.petasats. Run npx petasats-mcp@0.2.24 status for status and npx petasats-mcp@0.2.24 recover after interruption.
A Base withdrawal left pending (for example after a fee rise) is re-sent unchanged; new swaps and Base withdrawals wait until it confirms. Run npx petasats-mcp@0.2.24 withdrawals to list pending withdrawals. If a finalized nonce was consumed but its receipt cannot be found, check the transaction in a Base explorer, then explicitly record the outcome with npx petasats-mcp@0.2.24 withdrawal <hash> sent or npx petasats-mcp@0.2.24 withdrawal <hash> not-sent.
Repeating the same Base withdrawal (same asset, amount, and address) within an hour is refused as a likely retry. Do not run two AI apps using the kit on the same folder at the same time.
A swap started with version 0.2.0 or 0.2.1 whose USDC lock never landed can stay at "Waiting for BSV lock" and block new swaps and withdrawals. If no other copy of the kit used the same folder while that swap ran, set PETASATS_RESOLVE_OLD_STUCK_SWAPS=1 in the kit's environment (for example "env":{"PETASATS_RESOLVE_OLD_STUCK_SWAPS":"1"} in your client's server entry) and restart the kit. It then sends a zero-value transaction to its own Base address so the old lock can never land, and marks the swap failed once that transaction is final, usually within 30 minutes. Swaps started with 0.2.2 or later resolve without this setting.
busy, limit, rate_limited, unavailable, and declined mean nothing was locked. If keys-file permissions are wrong, restore owner-only access. For RPC trouble, check your network connection and retry.
0.2.24:
pay_402 tool. It pays a BSV pay-per-call web service that uses the HTTP 402 standard BRC-166, such as bsv.cx, from the kit's own BSV. A first call with confirm: false shows the price and pays nothing. The kit pays only when you call again with confirm: true and a max_sats you accept. The service itself broadcasts the payment; the kit never does. Two limits in limits.json cap the spending: x402MaxSatsPerCall (default 10,000 sats per payment) and x402MaxSatsPerDay (default 100,000 sats per UTC day, network fees included).withdraw_bsv and close_kit leave alone any BSV that a pending pay_402 payment still holds, and say until when. pay_402 refuses while a swap is running or delivering BSV.nothingLocked: true).0.2.23:
close_kit tool and npx petasats-mcp@0.2.23 close command. They empty the kit into your own wallets, sending USDC first, then BSV, then ETH, and stop the kit once it is empty. They wait for running swaps and pending Base withdrawals, and they never delete the keys.PETASATS_HOME folder that exists but is empty. Before, it did this only when the folder did not exist yet.buy_gas tool, so a kit funded with USDC alone can pay its own Base gas. With your yes, it sells exactly 0.50 USDC of the kit's balance for ETH through one CoW Protocol order, paid to the kit's own address. A CoW Protocol solver settles the order and pays its network fee, so the order itself needs no ETH. While an order could still fill, about 22 minutes after it was signed (longer if this computer's clock is off), USDC withdrawals and close_kit wait and new swaps are refused. buy_gas itself waits while a Base withdrawal or swap lock is still being confirmed.0.2.22:
PETASATS_QUOTE_ONLY=1 to get the same behaviour anywhere.resources/templates/list with an empty list, so MCP inspectors no longer log an error.0.2.21:
0.2.19:
0.2.18:
0.2.17:
See SECURITY.md. PetaSats is released under the MIT License; third-party notices are in THIRD_PARTY_NOTICES.md. This is experimental software: use small amounts and there is no warranty.