Quickstart and API reference
AgentFuel gives bots and AI agents a risk score for any Solana token and a live feed of new pump.fun launches. There is no sign-up: an agent can use the free MCP trial, and a bot pays per call with x402.
Base URL: https://agentfuel-api.onrender.com
Quickstart
- Read the manifest. It lists every endpoint, its price and how to pay.
curl https://agentfuel-api.onrender.com/v1
- Call an endpoint without paying. You get
402 Payment Requiredwith the payment options.curl -i https://agentfuel-api.onrender.com/v1/rugcheck/<mint>
- Pay with an x402 client from your bot's own wallet and repeat the call with the
X-PAYMENTheader. You get the score back. See Paying with x402.
Want a working starting point? The launch guard example bot watches new launches, re-checks the clean ones and prints candidates. It runs free on the MCP trial or pays per call with x402.
Use from an AI agent (MCP)
The API is also an MCP server at /mcp (Streamable HTTP, stateless) with two tools: rugcheck and latest_launches. MCP access is a free trial of 50 tool calls per IP address per day. For more, use the paid HTTP endpoints.
Claude Code
claude mcp add --transport http agentfuel https://agentfuel-api.onrender.com/mcp
Claude Desktop, Cursor and other stdio clients
{
"mcpServers": {
"agentfuel": { "command": "npx", "args": ["-y", "mcp-remote", "https://agentfuel-api.onrender.com/mcp"] }
}
}
| Tool | Arguments | Returns |
|---|---|---|
rugcheck | mint (required), exclude (token accounts to leave out) | Same JSON as /v1/rugcheck |
latest_launches | maxRisk 0 to 100, sinceMs, limit 1 to 50 (default 20) | Array of launches, newest first |
Paying with x402
x402 puts the payment inside the HTTP request. AgentFuel never holds your funds: your bot pays from its own wallet, and an x402 facilitator verifies and settles the payment. The payment is only settled when the call succeeds.
- The first call returns
402with anacceptslist of payment requirements. - Your x402 client signs a payment for one of them.
- Send the same request again with the signed payment, base64-encoded, in the
X-PAYMENTheader.
// 402 response body { "x402Version": 1, "error": "X-PAYMENT header is required", "accepts": [{ "scheme": "exact", "network": "solana", "maxAmountRequired": "2000", // USDC base units: 0.002 USDC "asset": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", "payTo": "<AgentFuel wallet>", "resource": "https://agentfuel-api.onrender.com/v1/rugcheck/<mint>", "maxTimeoutSeconds": 60 }] }
TypeScript
const API = "https://agentfuel-api.onrender.com"; async function rugcheck(mint: string, pay: (requirement: unknown) => Promise<string>) { const url = `${API}/v1/rugcheck/${mint}`; let res = await fetch(url); if (res.status === 402) { const { accepts } = await res.json(); res = await fetch(url, { headers: { "X-PAYMENT": await pay(accepts[0]) } }); } if (!res.ok) throw new Error(`rugcheck failed: ${res.status}`); return res.json(); }
Python
import requests API = "https://agentfuel-api.onrender.com" def rugcheck(mint, pay): url = f"{API}/v1/rugcheck/{mint}" r = requests.get(url) if r.status_code == 402: r = requests.get(url, headers={"X-PAYMENT": pay(r.json()["accepts"][0])}) r.raise_for_status() return r.json()
In both examples pay is your x402 client: it signs a USDC transfer for the requirement and returns the encoded header value.
GET /v1
Machine-readable manifest: endpoints, prices in USDC, payment protocol, MCP details and rate limits. Agents can read it to discover the API on their own. The manifest is always current; if it differs from this page, the manifest is right.
GET /v1/rugcheck/{mint}
Risk score for one Solana token. Known pump.fun and PumpSwap pool accounts are left out of the holder check automatically.
| Parameter | Where | Meaning |
|---|---|---|
mint | path | Token mint address, base58 |
exclude | query | Comma-separated token accounts to leave out of the holder check, such as your own pool |
// 200 response { "mint": "8qRa…pump", "riskScore": 55, // 0 = no red flags, 100 = very risky "level": "high", // low < 15, medium 15–39, high ≥ 40 "findings": [ { "code": "MINT_REVOKED", "severity": "info", "message": "Mint authority is revoked." }, { "code": "WHALE_HOLDER", "severity": "danger", "message": "The largest holder owns 49.78% of the supply." } ], "top10SharePct": 49.85, "topHolders": [ { "tokenAccount": "…", "owner": "…", "sharePct": 49.78, "label": null } // label: pool, mayhem_agent, excluded or null ], "disclaimer": "Automated on-chain checks only. Not financial advice; a low score does not mean a token is safe." }
GET /v1/launches
Newest pump.fun launches with creator, dev-buy share and risk score, newest first.
| Query | Default | Meaning |
|---|---|---|
since | 0 | Only launches after this unix time in milliseconds. Pass the newest launchedAt you have seen to poll for new ones. |
maxRisk | 100 | Only launches with a risk score at or below this |
limit | 50 | Maximum number of launches, up to 200 |
// 200 response { "launches": [{ "mint": "H8uE…pump", "creator": "81L6…V17z", "signature": "yYcd…w2Fd", "launchedAt": 1793785019000, "devBuyPct": 1.44, "bondingCurveTokenAccount": "Ccj…XMcH", "risk": { "riskScore": 0, "level": "low", "findings": [ … ], "top10SharePct": 1.44 } }] }
How the score works
The score adds up the findings: each warn adds 15 points and each danger adds 40, capped at 100. info findings add nothing. The checks are:
- Mint authority. If someone can still mint new tokens, the supply can be inflated.
- Freeze authority. If someone can freeze accounts, holders can be blocked from selling.
- Largest holder and top 10 share. A few wallets holding most of the supply can dump it. Pool and bonding-curve accounts are left out.
The scoring code is open source: src/lib/rugcheck.ts.
Errors and limits
| Status | When |
|---|---|
400 | The mint address or a query parameter is not valid |
402 | Payment required, or the payment could not be verified or settled. The body lists what to pay. |
404 | The address is not a token mint |
429 | Rate limit exceeded: 30 calls per minute per caller |
502 | The Solana RPC did not answer. Try again. |
503 | Payments or the launch feed are not enabled on this server |
The API runs on free hosting during development. After a quiet period the first call can take up to a minute while it wakes up.