Pump.fun MCP server and CLI - Trade tokens on Pump.fun directly from terminal or Claude
npm install pumpfun-climcpAn MCP (Model Context Protocol) server that enables Claude to trade tokens on Pump.fun directly. Built with Hono and the official @pump-fun/pump-sdk.
Live Server: https://pumpfun-mcp.com
- Create tokens - Launch new tokens on Pump.fun with custom metadata
- Buy tokens - Purchase tokens using SOL with configurable slippage
- Sell tokens - Sell tokens for SOL (full balance or partial)
- Token info - Get bonding curve data + DexScreener market data
- Search tokens - Find tokens by name, symbol, or address via DexScreener
- Account balance - Check SOL and token balances
Install and use the CLI directly from your terminal:
``bash`
npm install -g pumpfun-climcp
pumpfun-cli
Or use locally:
`bash`
npm install pumpfun-climcp
npx pumpfun-cli
See CLI_INSTALL.md for detailed instructions.
1. Open Claude Settings → MCP Servers → Add Server
2. Enter: https://pumpfun-mcp.com/mcp
3. Authenticate with your Solana wallet address and private key
`bash`
git clone https://github.com/angrymouse/pumpfun-mcp
cd pumpfun-mcp
npm install
Create .env:
`env`
HELIUS_RPC_URL=https://mainnet.helius-rpc.com/?api-key=YOUR_KEY
PORT=9241
BASE_URL=http://localhost:9241
Run:
`bash`
npm run build
npm start
| Tool | Description |
|------|-------------|
| get-token-info | Get token info with bonding curve + DexScreener data |create-token
| | Create a new Pump.fun token |buy-token
| | Buy tokens with SOL |sell-token
| | Sell tokens for SOL |get-account-balance
| | Check SOL and token balances |search-tokens
| | Search tokens via DexScreener |
| Method | Path | Description |
|--------|------|-------------|
| POST | /mcp | MCP protocol endpoint |GET
| | /authorize | OAuth authorization page |POST
| | /authorize | Process authorization |POST
| | /token | OAuth token exchange |GET
| | /.well-known/oauth-authorization-server | OAuth discovery |
- Client ID: Your Solana wallet address
- Client Secret: Your private key (base58 encoded)
The server validates that the private key derives to the provided wallet address.
```
src/
├── index.ts # Hono server + MCP setup
├── sdk.ts # Pump.fun SDK initialization
├── utils.ts # Solana utilities
├── pages.ts # HTML pages
├── dexscreener.ts # DexScreener API client
└── operations/
├── get-info.ts # Token info + DexScreener
├── buy.ts # Buy operations
├── sell.ts # Sell operations
└── create.ts # Token creation
- Private keys are never stored to disk
- Keys exist only in memory during active sessions
- Rate limiting on auth endpoints (10 req/min)
- Automatic cleanup of expired tokens
- Generic error messages prevent credential enumeration
- @pump-fun/pump-sdk - Official Pump.fun SDK
- @modelcontextprotocol/sdk - MCP SDK
- Hono - Web framework
- @solana/web3.js - Solana SDK
MIT
- GitHub Repository
- Pump.fun
- Model Context Protocol
- DexScreener