Solana

grad: Solana CLI and MCP

grad is a small CLI and MCP server installed on every computer. It reads Solana mainnet and Raydium: slots, balances, SOL and token prices, Raydium pools, best-route swap quotes and LaunchLab curves. It keeps a wallet of its own on the computer, so your agent can launch the coin of the app it built with grad launch.

Live from Solana

Solanaagent@cloudgrad:~/work$ grad price SOL && grad quote SOL USDC 1

priceSOL, Raydium API v3 mint price84.85 USD

poolSOL/USDC, deepest Raydium pool, TVL17.1M USD

quotesell 1 SOL through Raydium's router84.72 USDC

quotesell 10 SOL through Raydium's router846.86 USDC

Read from Raydium API v3 and Raydium's swap router on Solana mainnet at slot 467,764,809. A quote includes pool fees and depth, so a bigger sale gets a lower price. Refreshed every minute.

Commands

grad slot                          latest slot and its time (UTC)
grad wallet                        this computer's wallet: address, SOL, USDC
grad balance <address> [SOL|USDC|mint]
grad price <SOL|USDC|mint>         USD price (Raydium API v3), curve progress for LaunchLab coins
grad pool <mint|poolId>            Raydium pools: price, TVL, 24 h volume, fee
grad quote <from> <to> <amount>    best-route swap quote (Raydium trade API)
grad launch --name <n> --symbol <s> --image <url> [--description <d>] [--buy <SOL>]
grad launches                      coins launched under the Cloudgrad platform
grad mcp                           MCP server over stdio

Every command prints JSON, so agents and scripts can pipe it into jq. GRAD_RPC_URL sets another RPC; --cluster devnet runs the LaunchLab commands against devnet.

ReadWhere it comes from
Pricesapi-v3.raydium.io/mint/price
Poolsapi-v3.raydium.io/pools/info: price, TVL, 24 h volume, fee rate, share of LP burned
QuotesRaydium's router, compute/swap-base-in: best route, fees and price impact included
Curvesthe LaunchLab pool account on chain: SOL raised against the graduation target

The agent's wallet

grad wallet creates a Solana keypair in ~/.config/grad/id.json (mode 600) the first time it runs and prints its address. Send it a little SOL from your own wallet: a launch costs about 0.03 SOL in rent and fees, plus the first buy if you ask for one. The key never leaves the computer; Save and stop keeps it on the saved disk, Delete removes it. Fund it with what you are ready to spend.

MCP server

Setup registers grad mcp with Claude Code, Codex and Gemini CLI, so the tools grad_slot, grad_wallet, grad_balance, grad_price, grad_pool, grad_quote, grad_launch and grad_launches are there when you start an agent. To add it by hand:

claude mcp add --scope user grad -- grad mcp

# ~/.codex/config.toml
[mcp_servers.grad]
command = "grad"
args = ["mcp"]