Agent Sniper — Claude Code MCP server: pump.fun sniper
An MCP server for pump.fun trading: your agent scores new launches, runs guards and opens positions. Simulate mode is the default.
claude mcp add --env SNIPER_MODE=<SNIPER_MODE> --env SNIPER_NETWORK=<SNIPER_NETWORK> --env SOLANA_RPC_URL=<SOLANA_RPC_URL> --env SOLANA_SECRET_KEY=<SOLANA_SECRET_KEY> --transport stdio agent-sniper -- npx -y @three-ws/agent-sniperWhat Agent Sniper does
Agent Sniper is a pump.fun sniping engine that plugs into an AI agent over MCP. One trade loop: a stream of new launches arrives, each gets scored against a per-agent strategy, pre-trade guards run, then a buy goes out. Open positions are swept on an interval and closed on stop-loss, take-profit, trailing-stop, timeout or a sentiment flip.
Five adapters sit underneath: launch feed, Solana, wallet, executor and store. Swap any of them without touching the loop — a Postgres store instead of memory, or a custodial wallet instead of local keys. The package ships as a library, a CLI and an x402-gated HTTP API.
A strategy must carry stop_loss_pct; the engine refuses to arm one without it. SOL amounts go in as lamports, written as a string, number or bigint. Node >= 20 is required. Simulate is the default mode — --mode live trades real funds, and then each armed strategy can spend up to its daily_budget_lamports per UTC day.
What it helps with
- wire a pump.fun sniper into an AI agent over MCP
- dry-run a strategy on devnet without moving funds
- set stop-loss, take-profit and trailing-stop on a position
- cap an agent's daily SOL spend
- swap in your own store or wallet adapter
Example prompts for the agent
- Run the sniper in simulate mode on devnet with the strategy in
strategy.json - Show sniper stats: events, buys, sells
- Arm strategy
strat_scout_1and sweep open positions
How to install Agent Sniper
Platform CLI
claude mcp add --env SNIPER_MODE=<SNIPER_MODE> --env SNIPER_NETWORK=<SNIPER_NETWORK> --env SOLANA_RPC_URL=<SOLANA_RPC_URL> --env SOLANA_SECRET_KEY=<SOLANA_SECRET_KEY> --transport stdio agent-sniper -- npx -y @three-ws/agent-sniperReplace <…> with your own values
Platform CLI
codex mcp add agent-sniper --env SNIPER_MODE=<SNIPER_MODE> --env SNIPER_NETWORK=<SNIPER_NETWORK> --env SOLANA_RPC_URL=<SOLANA_RPC_URL> --env SOLANA_SECRET_KEY=<SOLANA_SECRET_KEY> -- npx -y @three-ws/agent-sniperReplace <…> with your own values
Config file
{
"mcpServers": {
"agent-sniper": {
"command": "npx",
"args": [
"-y",
"@three-ws/agent-sniper"
],
"env": {
"SNIPER_MODE": "<SNIPER_MODE>",
"SNIPER_NETWORK": "<SNIPER_NETWORK>",
"SOLANA_RPC_URL": "<SOLANA_RPC_URL>",
"SOLANA_SECRET_KEY": "<SOLANA_SECRET_KEY>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"agent-sniper": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@three-ws/agent-sniper"
],
"env": {
"SNIPER_MODE": "<SNIPER_MODE>",
"SNIPER_NETWORK": "<SNIPER_NETWORK>",
"SOLANA_RPC_URL": "<SOLANA_RPC_URL>",
"SOLANA_SECRET_KEY": "<SOLANA_SECRET_KEY>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e SNIPER_MODE=<SNIPER_MODE> -e SNIPER_NETWORK=<SNIPER_NETWORK> -e SOLANA_RPC_URL=<SOLANA_RPC_URL> -e SOLANA_SECRET_KEY=<SOLANA_SECRET_KEY> agent-sniper npx -y @three-ws/agent-sniperReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about Agent Sniper
How do I install Agent Sniper in Claude Code?
Add the server with claude mcp add agent-sniper -e SOLANA_SECRET_KEY=<SOLANA_SECRET_KEY> -- npx -y @three-ws/agent-sniper. A second form passes more variables: `claude mcp add --env SNIPER_MODE=<SNIPER_MODE> --env SNIPER_NETWORK=<SNIPER_NETWORK> --env SOLANA_RPC_URL=<SOLANA_RPC_URL> --env SOLANA_SECRET_KEY=<SOLANA_SECRET_KEY> --transport stdio agent-sniper -- npx -y @three-ws/agent-sniper`.
What does Agent Sniper do?
It watches new pump.fun launches, scores them against the agent's strategy, runs guards and buys. Open positions close on stop-loss, take-profit, trailing-stop, timeout or a sentiment flip.
What do I need to run Agent Sniper?
Node >= 20 and a wallet key in SOLANA_SECRET_KEY. Durable storage needs better-sqlite3, the HTTP API needs express. Without stop_loss_pct the engine will not arm a strategy.