pumpfun-climcp
v1.0.0
Published
Pump.fun MCP server and CLI - Trade tokens on Pump.fun directly from terminal or Claude
Maintainers
Readme
Pump.fun MCP Server
An 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
Features
- 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
Quick Start
Terminal CLI (Recommended)
Install and use the CLI directly from your terminal:
npm install -g pumpfun-climcp
pumpfun-cliOr use locally:
npm install pumpfun-climcp
npx pumpfun-cliSee CLI_INSTALL.md for detailed instructions.
Connect via Claude
- Open Claude Settings → MCP Servers → Add Server
- Enter:
https://pumpfun-mcp.com/mcp - Authenticate with your Solana wallet address and private key
Self-Host MCP Server
git clone https://github.com/angrymouse/pumpfun-mcp
cd pumpfun-mcp
npm installCreate .env:
HELIUS_RPC_URL=https://mainnet.helius-rpc.com/?api-key=YOUR_KEY
PORT=9241
BASE_URL=http://localhost:9241Run:
npm run build
npm startAPI Reference
MCP Tools
| 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 |
HTTP Endpoints
| 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 |
Authentication
- 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.
Architecture
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 creationSecurity
- 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
Dependencies
- @pump-fun/pump-sdk - Official Pump.fun SDK
- @modelcontextprotocol/sdk - MCP SDK
- Hono - Web framework
- @solana/web3.js - Solana SDK
License
MIT
