# Agent Sniper

An MCP server for pump.fun trading: your agent scores new launches, runs guards and opens positions. Simulate mode is the default.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed · ★ 249
- Author: nirholas
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/nirholas/three.ws/tree/HEAD/packages/agent-sniper
- Updated: 2026-10-24
- HTML: https://affpapa.org/en/nevibecode/mcp/agent-sniper

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `SNIPER_MODE`, `SNIPER_NETWORK`, `SOLANA_RPC_URL`, `SOLANA_SECRET_KEY` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
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
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
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-sniper
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "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

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "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

### Gemini CLI

**Platform CLI**
```bash
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-sniper
```
Replace <…> with your own values

## When to use it
- 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
- Run the sniper in simulate mode on devnet with the strategy in `strategy.json`
- Show sniper stats: events, buys, sells
- Arm strategy `strat_scout_1` and sweep open positions

## Similar
- [REA](https://affpapa.org/en/nevibecode/mcp/rea.md) — MCP server · ★ 386989
- [GitHub](https://affpapa.org/en/nevibecode/mcp/github.md) — MCP server · ★ 33918
- [Netdata](https://affpapa.org/en/nevibecode/mcp/netdata.md) — MCP server · ★ 81115
- [browser-use](https://affpapa.org/en/nevibecode/mcp/browser-use.md) — MCP server · ★ 119160
- [Codebase Memory](https://affpapa.org/en/nevibecode/mcp/codebase-memory.md) — MCP server · ★ 47392
- [mcp-server](https://affpapa.org/en/nevibecode/mcp/mcp-server.md) — MCP server · ★ 43872

From the same set: [nirholas/three.ws](https://affpapa.org/en/nevibecode/by/nirholas/three.ws.md) — 13 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
