donate_autonomous
Send a small USDC donation to a verified nonprofit on the GiveReady directory, signed and broadcast directly from this MCP server's configured Solana keypair via the x402 protocol.
AUTHORISATION & SAFETY (read carefully — the user is trusting you with funds):
- Only fires if the MCP server has SOLANA_PRIVATE_KEY set in its environment. Otherwise the tool throws a clear error and no transaction is built.
- Hard caps: max $1 USDC per single call, max $5 USDC per day across all calls. The caps are enforced server-side; you cannot exceed them by retrying.
- Wallet balance check happens before signing. If insufficient USDC, the tool fails fast.
- Every successful donation appends a receipt to ~/.giveready/donations.log on the host machine.
- The keypair MUST be a dedicated test wallet provisioned for this purpose, not the user's main wallet. The MCP user is responsible for that pre-commitment.
WHAT THIS TOOL DOES:
- Hits GET /api/donate/{slug}?amount=N — server returns HTTP 402 with payment requirements (recipient wallet, USDC mint, network).
- Builds an SPL token transfer for the exact atomic amount, signs with the configured keypair.
- POSTs the signed transaction back as the X-PAYMENT header. Server broadcasts to Solana mainnet via its own RPC, confirms, and writes to the donations table.
- Returns the on-chain transaction hash and a Solscan link.
WHEN TO USE: Use only when the user has clearly asked you to donate, named the recipient nonprofit (slug), and named an amount. Never default a donation. Never round up. If the user says "donate something" without an amount, ask for one before calling — this tool is not the place for guesses.