Pump.fun MCP Server

A Cloudflare Worker that implements the MCP Streamable HTTP transport for AI agents to read pump.fun data on Solana. It is stateless: every request is answered on its own, with no sessions.
Tools (10 read-only tools)
| Tool | Description | Source |
|---|
searchTokens | Search tokens by name, symbol, or mint address | pump.fun API |
getTokenDetails | Full details for a specific token | pump.fun API |
getBondingCurve | Bonding curve read on-chain: reserves, spot price, market cap in SOL, exact graduation progress; for graduated coins, their PumpSwap pool | Solana RPC |
getTokenTrades | Recent trade history (buys and sells), with offset pagination | pump.fun API |
getTrendingTokens | Top tokens by market cap | pump.fun API |
getNewTokens | Most recently launched tokens | pump.fun API |
getGraduatedTokens | Graduated tokens among the 50 largest by market cap | pump.fun API |
getKingOfTheHill | Highest market cap token still on its bonding curve | pump.fun API |
getCreatorProfile | Tokens by a creator wallet, with a heuristic risk note | pump.fun API |
getTokenHolders | Largest holders as a share of total supply, grouped by owner wallet, with the bonding-curve and PumpSwap pool vaults labelled | Solana RPC |
All tools are read-only: no wallet keys needed. Write operations (buy/sell/create) require client-side wallet signing and are intentionally excluded for safety. Every argument is validated (addresses must be 32-byte base58 keys, counts are bounded integers) before any upstream request.
How the on-chain numbers are derived:
- Bonding curve. The curve account is the PDA
["bonding-curve", mint] of the pump program, decoded per the pump IDL. Spot price is virtual_quote_reserves / virtual_token_reserves; market cap is spot price times total supply. A curve completes when real_token_reserves reaches 0, so graduation progress is the share of the curve's initial real token reserves already sold, computed exactly with the Global account's parameters. Curves created with other parameters report progress as unknown rather than a guess.
- Holders.
getTokenLargestAccounts returns at most the 20 largest token accounts. Each account is resolved to its owner, accounts with the same owner are added together, and shares are measured against getTokenSupply. The bonding-curve vault and the canonical PumpSwap pool vault are labelled and left out of the top-5 concentration figure.
The pump.fun frontend API sits behind a bot challenge that can refuse datacenter traffic. When it does, the API-backed tools return a clear error; the two Solana RPC tools are unaffected.
Deploy
npm install
npx wrangler deploy
Configuration
| Name | Kind | Purpose |
|---|
SOLANA_RPC_URL | variable or secret | Solana RPC endpoint. The default public endpoint rate-limits getTokenLargestAccounts heavily; use a paid RPC in production. A keyed URL is a credential: remove it from [vars] and run npx wrangler secret put SOLANA_RPC_URL. The Worker never echoes this URL in errors. |
PUMP_API_URL | variable | pump.fun frontend API base URL. |
ALLOWED_ORIGINS | variable (optional) | Comma-separated browser origins allowed to call /mcp, or *. Unset: the built-in allowlist (SperaxOS and LobeHub). Clients that send no Origin header are unaffected. |
RATE_LIMITER | rate limit binding | Per-IP limit on POST /mcp (60 requests per minute in wrangler.toml). Optional in code. |
Custom domain
To serve at pump-fun-sdk.modelcontextprotocol.name (or any subdomain):
- Add a CNAME record in Cloudflare DNS pointing to your Worker
- Add a Custom Domain in the Cloudflare dashboard under Workers, pump-fun-mcp, Settings, Domains & Routes
Or for the path-based gateway pattern (modelcontextprotocol.name/mcp/pump-fun-sdk):
- Uncomment the
[route] section in wrangler.toml
- Redeploy
Connect from SperaxOS
The server is registered in cryptoMcpData.ts and appears in the MCP marketplace. Users can also add it manually: