What it is
A command line tool and an MCP server that let an AI agent (Claude Code, Codex, Cursor or anything that speaks MCP) trade on Solana: pump.fun curves, PumpSwap pools, Jupiter routes, pump.fun launches. Transactions are built and signed on the agent's machine with the agent's own key.
The key alone can do nothing with money. Its owner opens an allowance vault on chain for that key: the SOL sits in the vault, and the program lets the agent trade only inside the owner's rules: a daily limit, a per-trade cap, the venues the owner allowed, a slippage guard. Whatever the agent buys stays in the vault. Only the owner withdraws, pauses or closes it.
Program 6Tn4mJj12csLYs9z1ntBw8BMkRJinjPi1Lkwt6egxLKF
Install
No npm account, no registry: the CLI is one file served from this site.
curl -fsSL {{ORIGIN}}/install.sh | sh
That puts prompt in ~/.prompt and links it into ~/.local/bin, /usr/local/bin or /opt/homebrew/bin, the first that is writable (set PROMPT_NO_LINK=1 to skip the link). Node 20 or newer. Or run any command straight from the tarball, nothing installed:
npx -y {{TGZ}} init
Quick start
prompt init # the agent key, kept in ~/.prompt
# open {{ORIGIN}}/vault?agent=<key> with your own wallet, deposit, set the limits
prompt vault # balance, rules, spent and left today
prompt buy <mint> 0.1 # 0.1 SOL of a coin, fee included
prompt sell <mint> 50% # half of it back into SOL, into the vault
MCP setup
Claude Code
claude mcp add prompt -- npx -y {{TGZ}} mcp
Codex
codex mcp add prompt -- npx -y {{TGZ}} mcp
or in ~/.codex/config.toml:
[mcp_servers.prompt]
command = "npx"
args = ["-y", "{{TGZ}}", "mcp"]
Cursor
npx -y {{TGZ}} setup cursor
That writes the server into ~/.cursor/mcp.json. By hand, for Cursor or any other client:
{
"mcpServers": {
"prompt": { "command": "npx", "args": ["-y", "{{TGZ}}", "mcp"] }
}
}
Tools
prompt_vault, prompt_whoami, prompt_token, prompt_quote, prompt_buy, prompt_sell, prompt_swap, prompt_launch, prompt_collect. Each answers the same JSON as the CLI; a refusal comes back as a tool error with its code, so the model can read it and change course. Run prompt init once before the first call.
Commands
Every command takes --json (one envelope on stdout), --vault <address> (only when several vaults name the same agent key) and --dry-run (simulate on chain, sign nothing).
| Command | What it does |
|---|---|
prompt init [--force] | Makes the agent key in ~/.prompt/agent.json (mode 600) and prints the link where the owner opens its vault. Run again, it prints the same key; it never overwrites one without --force |
prompt whoami | The agent's public key, its SOL for network fees, the site and the node |
prompt vault | The vault: SOL, coins with their SOL value, the rules, spent and left today, when the day resets, the fee that applies |
prompt balance | SOL and coins only |
prompt token <mint> | Name, symbol, venue, price in SOL, market cap in SOL and curve progress for pump.fun coins |
prompt quote <mint> <sol>prompt quote <mint> --sell <amount|all|50%> | What a buy or a sale returns now: the fee, the expected amount and the guarded minimum |
prompt buy <mint> <sol> | Buys with SOL from the vault, the fee included: the pump.fun curve, the PumpSwap pool once the coin graduated, or a Jupiter route for any other token. --slippage <percent> for Jupiter routes |
prompt sell <mint> [amount|all|50%] | Sells a coin the vault holds back into SOL, into the vault |
prompt swap SOL <mint> <sol>prompt swap <mint> SOL <amount> | A Jupiter route between SOL and one token, either way |
prompt launch --name --symbol --image [--buy] [--description] [--twitter] [--telegram] [--website] | Creates a pump.fun coin with the vault as its creator, its creator fees paid into the vault, and an optional first buy in the same transaction. The image is a file or a URL, uploaded to pump.fun; --uri takes a ready metadata URL instead |
prompt collect | Moves the creator fees of coins the vault launched from pump.fun into the vault |
prompt mcp | The MCP server over stdio |
prompt setup <claude|codex|cursor> | Adds the MCP server to that client |
JSON and errors
With --json a success prints one line on stdout and exits 0:
{"ok":true,"data":{"signature":"…","venue":"pump.fun","side":"buy","sol":"0.1996","tokensRaw":"3279081622","feeSol":"0.0004","leftTodaySol":"0.38","vaultBalanceSol":"1.42"}}
A failure prints one line on stderr and exits 1:
{"ok":false,"error":{"code":"OVER_DAILY_LIMIT","message":"refused on chain: over the daily limit the owner set","retryable":false}}
| Code | Meaning | Retry |
|---|---|---|
NO_KEY | No agent key yet: run prompt init | no |
NO_VAULT | No vault names this key yet; the message carries the link to open one | no |
MANY_VAULTS | Several vaults name this key: pass --vault | no |
OVER_DAILY_LIMIT | The buy would pass what is left of the day; details.leftSol says how much is left | after the reset |
OVER_TRADE_CAP | One trade worth more than the per-trade cap | smaller |
VENUE_NOT_ALLOWED | The owner switched that venue off | no |
VAULT_PAUSED | The owner paused the vault | no |
DESK_PAUSED | The whole desk is paused: agents cannot trade, owners keep every exit | no |
NOT_ENOUGH_SOL / NOT_ENOUGH_COINS | The vault holds less than asked | no |
SLIPPAGE | The price moved past the guard before the trade landed | yes |
NO_ROUTE | Jupiter has no route for that pair right now | yes |
NO_GAS | The agent key cannot pay the network fee: send it a little SOL | no |
TX_EXPIRED / RATE_LIMITED / RPC | The network or the node; try again | yes |
INVALID_INPUT | An address or an amount that does not parse | no |
SIMULATION_FAILED | Anything else the chain refused; details.logs carries the last lines | no |
The CLI checks the limits before it sends, so a refusal usually costs nothing; the program checks them again on chain, whatever the client says.
The vault program
A vault is a record ["vault", owner, agent]. Its money sits in its purse ["purse", vault], a plain system account only the program signs for, with the purse's own token accounts for whatever it holds.
What the agent key may do
trade: a buy or a sale on the coin's pump.fun curve or, once it graduated, its canonical PumpSwap pool. The program reads the reserves in the same instruction, sets the minimum out from that quote less the venue's own fees (2.5% allowed for) and the owner's guard, and checks what arrived.swap: one Jupiter route between SOL and a token. The program wraps and unwraps SOL itself, lets the route touch only the purse's two accounts of that swap, and checks it spent no more than it was given and got at least the minimum.launch: pump.funcreate_v2with the purse as the creator, plus an optional first buy. pump.fun pays that coin's creator fees to the purse from then on.
The rules, checked on every call by the agent
- Daily limit: the most SOL that may leave the vault in one rolling day: buys, launch costs, the program fee, the agent's gas refunds and any rent a trade opens all count. The day starts with the first spend after the previous one ended and lasts 24 hours. A sale counts nothing and pays the agent no refund, so the agent can always sell, even at the limit.
- Per-trade cap: the most one buy or one launch may spend, and the most one sale may be worth at the on-chain quote.
- Venues: pump.fun curves, PumpSwap pools, Jupiter buys, launches, Jupiter sales. Jupiter sales are off by default (see the risks).
- Alone in its transaction: an agent call is refused when the same transaction carries any instruction other than the compute budget's and this program's, so the agent key cannot wrap its own vault trade between trades of its own.
- Pause: a paused vault refuses every agent call. The owner can still do everything.
What only the owner may do
set_rules (rules and pause), withdraw (SOL, the purse keeps its rent), withdraw_coins (one coin or all of them, into the owner's own accounts), owner trades with no limit and no refund, close (every coin and every lamport home, the vault erased) and reclaim (creator fees that reached a closed vault's purse). Anyone may deposit.
The desk
One config account holds the fee recipient, the fee (at most 0.25%, set to 0.2%), the coin whose holders trade free and the totals. While the desk is paused nobody opens a vault and agents cannot trade; owners keep every exit and the admin may close vaults, but only back to their owners.
Fees and $PROMPT
- Each vault trade pays 0.2% of its SOL side to the Prompt Payment treasury. That is the only fee the program takes. Rents are yours and come back when you close.
- Owners whose own token account holds 1,000,000 $PROMPT or more pay nothing. The program reads that balance at every trade, so it applies the moment you hold it and stops the moment you sell.
- $PROMPT is a plain pump.fun coin. Its creator fees go to the dev. Nothing about $PROMPT touches the vaults.
What it does not protect
- Bad trades inside the limit. The vault bounds how much the agent can spend, not whether it spends well. A model told the wrong thing, or a prompt injection in something it reads, can still make poor trades up to the daily limit.
- A leaked agent key. It can spend up to the day's limit, never more, and never withdraw. Someone holding it could still buy a coin they control at a bad price, or sandwich the vault's trades from their own transactions in the same block, up to the cap per trade and the guard per fill. Keep the limit at what you are ready to lose in a day.
- Jupiter sales. No on-chain price exists for an arbitrary token, so a route back into SOL is checked only against the minimum the agent itself asks for. That is why they are off by default.
- Your wallet. Whoever controls the owner wallet controls the vault.
- The program. It is not audited. Its upgrade authority is the Prompt Payment dev wallet; an upgrade could change the rules for every vault. Start small.
- pump.fun, PumpSwap and Jupiter are other people's programs. The suite runs against clones of them from mainnet, and a change upstream can break a venue until the CLI follows it.
Your own node
By default the CLI talks to Solana through this site's node, with a fair share per address. For an agent that trades often, point it at your own:
export PROMPT_RPC=https://your-node.example
export PROMPT_PRIORITY=100000 # micro-lamports per compute unit, default 50000
export PROMPT_HOME=/path/to/keys # where the agent key lives, default ~/.prompt
Questions
Does the site ever see the agent key?
No. The key is made and used on the agent's machine. The site builds the owner's transactions; the owner's wallet signs them.
Can the agent move coins out of the vault?
No. There is no instruction that pays the agent anything except its fixed gas refund on a buy or a launch, counted in the limit.
What happens when the day's limit is reached?
Buys and launches are refused until the day ends; the agent can still sell, and the SOL stays in the vault.
Can I run several agents?
Yes: one vault per agent key, each with its own rules. My vaults shows them all.
Which coins can it trade?
Any plain pump.fun coin on its curve or in its PumpSwap pool, and through Jupiter any token with a route from SOL. Coins in mayhem mode, with cashback or quoted in something other than SOL are refused on the pump.fun venues.
Prompt