PluginBench
MCP Server
Active

Pump SDK MCP Server MCP Server

io.github.nirholas/pump-fun-sdk

TypeScript SDK for Pump.fun protocol on Solana — token creation, bonding curves, trading, and fee sharing.

What is the Pump SDK MCP Server MCP server?

The Pump SDK MCP Server is a TypeScript SDK for the Pump.fun protocol on Solana that provides offline-first instruction builders for token creation, bonding curve trading, AMM pool management, fee configuration, and volume-based incentives. It returns TransactionInstruction[] for composing into transactions with your own signing strategy, never sending transactions directly.

Build, extend, and maintain Pump tokens on Solana. The SDK handles token launches with vanity mints, bonding curve buy/sell operations, graduation to AMM pools, tiered fee sharing, and creator incentives. Includes a CLI for reading chain state, pricing trades, and managing tokens without a wallet or API key.

How to install Pump SDK MCP Server

Copy-paste configuration for popular MCP clients.

transport: stdio
Config generated by PluginBench — verify against the source before use.
~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "pump-fun-sdk": {
      "command": "npx",
      "args": [
        "-y",
        "pump-fun-mcp"
      ]
    }
  }
}

Tools & capabilities

Tools this server exposes to the agent.

  • createV2Instruction — Create a new token with metadata, optional vanity mint suffix, and atomic first buy
  • buyInstructions — Build buy instructions for tokens on the bonding curve with slippage protection
  • sellInstructions — Build sell instructions for tokens on the bonding curve with slippage protection
  • fetchBondingCurveSummary — Fetch current token state including market cap, graduation progress, and fees
  • fetchBuyState — Fetch all required state for a buy operation, auto-detecting token program
  • fetchSellState — Fetch all required state for a sell operation, auto-detecting token program
  • fetchGraduationProgress — Check bonding curve completion percentage and tokens remaining
  • createFeeSharingConfig — Set up fee sharing configuration for creators
  • updateFeeShares — Update fee shareholders and their share percentages
  • generateVanityMint — Grind keypairs to produce mint addresses ending in 'pump' or custom patterns
  • getBuyTokenAmountFromSolAmount — Calculate tokens received for a given SOL amount
  • getSellSolAmountFromTokenAmount — Calculate SOL received for selling a token amount
  • calculateBuyPriceImpact — Compute price impact metrics for buy trades
  • calculateSellPriceImpact — Compute price impact metrics for sell trades

Use cases

  • Launch a new token on Pump.fun with optional vanity mint address and atomic first buy
  • Buy and sell tokens on the bonding curve with accurate fee calculations and slippage protection
  • Monitor token graduation progress and migrate to AMM pools when bonding curve completes
  • Set up multi-recipient fee sharing and claim creator fees and volume rewards
  • Price trades offline and simulate transactions before sending them on-chain
  • Build Telegram bots, dashboards, and trading agents using the CLI or SDK directly

Pump SDK MCP Server MCP server FAQ

What is the Pump SDK MCP Server?

It's a TypeScript SDK for the Pump.fun protocol on Solana. It provides offline instruction builders for token creation, bonding curve trading, AMM management, and fee sharing. The SDK never sends transactions itself — it returns TransactionInstruction[] that you compose and sign with your own strategy.

Is it free to use?

Yes. The SDK is open-source (licensed under the repository's license) and available on npm as @nirholas/pump-sdk. There are no API keys or subscription fees required.

How do I install it in Cursor or Claude?

Install the npm package: npm install @nirholas/pump-sdk. Peer dependencies (@solana/web3.js, @solana/spl-token, @coral-xyz/anchor, bn.js) must also be installed. The SDK works in any Node.js or browser environment that supports these Solana libraries.

Do I need a wallet or RPC endpoint?

For read-only operations (pricing, checking state), you only need an RPC endpoint. For transactions, you need a Solana wallet with SOL for fees. The CLI works without a wallet for all read commands.

What does the CLI do?

The pump CLI provides commands to read token state (pump curve), price trades (pump quote buy/sell), execute trades (pump buy/sell), launch tokens (pump create), grind vanity mints (pump vanity), check fees (pump fees), and monitor live dashboards (pump watch). All read commands work without a wallet.

Can I use this to build bots or trading agents?

Yes. The SDK is designed for programmatic use. It includes 50 runnable examples, a CLI for scripting, and full TypeScript types. Many community projects use it to build Telegram bots, dashboards, and DeFi agents.

README (reference)

Source of truth, from the repository.

<p align="center"> <h1 align="center">Pump SDK</h1> <p align="center"> TypeScript SDK for the Pump protocol on Solana — token creation, bonding curves, AMM pools, fee sharing, and volume rewards. </p> </p> <p align="center"> <a href="https://www.npmjs.com/package/@nirholas/pump-sdk"><img src="https://img.shields.io/npm/v/@nirholas/pump-sdk.svg?style=flat-square&color=blue" alt="npm version" /></a> <a href="https://github.com/nirholas/pump-fun-sdk/blob/main/LICENSE"><img src="https://img.shields.io/npm/l/@nirholas/pump-sdk.svg?style=flat-square" alt="license" /></a> <a href="https://www.npmjs.com/package/@nirholas/pump-sdk"><img src="https://img.shields.io/npm/dm/@nirholas/pump-sdk.svg?style=flat-square" alt="downloads" /></a> <img src="https://img.shields.io/badge/TypeScript-5.0+-blue?style=flat-square&logo=typescript" alt="TypeScript" /> <img src="https://img.shields.io/badge/Solana-1.98+-purple?style=flat-square&logo=solana" alt="Solana" /> </p>

What is Pump SDK?

Pump SDK is the community TypeScript SDK for the Pump.fun protocol on Solana. It provides offline-first instruction builders for every on-chain operation — token creation, bonding curve trading, AMM pool management, tiered fee configuration, creator fee sharing, volume-based token incentives, and social referral fees.

The SDK never sends transactions itself. It returns TransactionInstruction[] that you compose into transactions with your preferred signing and sending strategy.


📋 Table of Contents


🚀 Live Demos & Resources

📈 Proof & Virality

Proof the GitHub Claim Tracker bot is profitable to monitor
→ View tweet

Went mega viral
→ View tweet

just shipped a real-time PumpFun intelligence bot on Telegram

17 commands. zero cost. fully on-chain.

/price → instant token price & bonding curve
/monitor → live token launch feed
/cto → creator takeover alerts
/watch → wallet fee claim tracking
/quote → buy/sell estimates
/graduated → AMM graduation status
/alerts → customize your notifications

all powered by the open-source pump-fun-sdk

→ View original post

The post that started it all
→ View tweet

Looking for more? Check out PumpKit 💊💚

Open-source framework for building PumpFun Telegram bots on Solana. Claim monitors, channel feeds, group trackers, whale alerts — build your own or use ours.

PumpKit Web App + Documentation


🚀 Quick Start

Installation

# npm
npm install @nirholas/pump-sdk

# yarn
yarn add @nirholas/pump-sdk

# pnpm
pnpm add @nirholas/pump-sdk

Peer Dependencies

The SDK requires these Solana packages (install them if not already present):

npm install @solana/web3.js @solana/spl-token @coral-xyz/anchor bn.js

Minimal Example

import { Connection, PublicKey } from "@solana/web3.js";
import { OnlinePumpSdk } from "@nirholas/pump-sdk";

// 1. Create an online SDK instance
const connection = new Connection("https://api.mainnet-beta.solana.com");
const sdk = new OnlinePumpSdk(connection);

// 2. Fetch current token state
const mint = new PublicKey("YourTokenMintAddress...");
const summary = await sdk.fetchBondingCurveSummary(mint);

console.log("Market Cap:", summary.marketCap.toString(), "lamports");
console.log("Graduated:", summary.isGraduated);
console.log("Progress:", summary.progressBps / 100, "%");

💻 The pump CLI

The SDK ships with a binary. No wallet, no API key, and no configuration are needed for anything that reads the chain.

npm install -g @nirholas/pump-sdk

pump curve <mint>                  # price, market cap, graduation meter, fee tier
pump quote buy <mint> --sol 1      # what 1 SOL really buys, after fees and impact
pump watch <mint>                  # live dashboard
pump doctor                        # check your RPC, wallet, and balance in one shot

Or without installing anything: npx -p @nirholas/pump-sdk pump curve <mint>.

FeMbDoX7R1Psc4GEcvJdsbNbZA3bfztcyDCatJVJpump live on the bonding curve
────────────────────────────────────────────────────────────

  Market cap   93.705347 SOL
  Buy price    0.000000096 SOL per token
  Sell price   0.000000091 SOL per token
  Trading fee  1.25% 0.95% protocol + 0.3% creator

  Graduation  ███████████████░░░░░░░░░ 61.39%

  SOL to graduate   60.684661 SOL
  SOL in curve      24.921536 SOL
  Tokens left       306.21M of 793.1M
CommandWhat it does
pump curve / price / pool / globalRead curve, price, AMM pool, and protocol state
pump quote buy|sellPrice a trade offline: output, fees, effective price, impact
pump buy / sellTrade, auto-routing between the bonding curve and PumpAMM
pump createLaunch a token, optionally with an atomic first buy
pump vanityGrind a ...pump mint address
pump fees / incentivesCheck and claim creator fees and volume rewards
pump watchLive-refreshing dashboard, or a JSON price feed
pump eventsDecode the Pump events in any transaction
pump pdaDerive any Pump program address
pump doctor / configDiagnose and configure

Safe by construction. Reads never load a keypair. Every trade is simulated before anything is sent, prints exactly what is about to happen, and waits for an explicit yes. --simulate sends nothing; --yes is the scripting escape hatch; a piped command with neither refuses rather than spending funds unattended.

Scriptable. Every command takes --json and writes nothing else to stdout in that mode:

pump curve <mint> --json | jq .marketCapSol
pump watch <mint> --json --interval 10 | jq -r '"\(.at)  \(.marketCapSol) SOL"'
pump events <sig> --json | jq '.events[] | select(.type=="trade")'

Full reference: docs/cli.md. Ten-minute walkthrough: tutorial 45.


🧪 50 Runnable Examples

The repo ships fifty tested, runnable examples covering the entire SDK surface. Each one runs with a single command, exports its logic for offline testing, and has a matching step-by-step tutorial.

git clone https://github.com/nirholas/pump-fun-sdk && cd pump-fun-sdk && npm install
npm run example        # list all 50
npm run example 11     # offline buy quotes
npm run test:examples  # run every example's test suite offline
RangeCategory
01-10Token Lifecycle: create, buy, sell, mayhem mode, cashback
11-20Curve Math & Fees: offline quotes, tiers, price impact
21-30Accounts & Events: every PDA, every decoder
31-40Live Data: mainnet reads, batching, WebSocket feeds
41-50AMM & Advanced: pools, liquidity, fee sharing, incentives, vanity mints

Full catalog: docs/examples.md · Browse: examples/ · Tutorials: tutorials/examples/


📖 Usage Examples

Create a Token

import { Keypair } from "@solana/web3.js";
import { PUMP_SDK } from "@nirholas/pump-sdk";

const mintKeypair = Keypair.generate();
const creator = wallet.publicKey;

const createIx = await PUMP_SDK.createV2Instruction({
  mint: mintKeypair.publicKey,
  name: "My Token",
  symbol: "MYTKN",
  uri: "https://arweave.net/metadata.json",
  creator,
  user: creator,
  mayhemMode: false,
});

// createIx is a TransactionInstruction — add to a Transaction and send

Warning: Do NOT use createInstruction — it is deprecated (v1). Always use createV2Instruction.

Create a Token With a ...pump Vanity Mint

Mint addresses ending in pump (like the ones on pump.fun) are produced by grinding keypairs off-chain. The SDK exposes this as a first-class helper — swap Keypair.generate() for generateVanityMint() and the rest of the flow is unchanged.

import { generateVanityMint, PUMP_SDK } from "@nirholas/pump-sdk";

// Grind until we find a mint whose address ends in "pump" (~11M attempts, ~1–4 min in Node)
const { keypair: mintKeypair } = await generateVanityMint({ suffix: "pump" });

const createIx = await PUMP_SDK.createV2Instruction({
  mint: mintKeypair.publicKey,  // ← ends in "pump"
  name: "My Token",
  symbol: "MYTKN",
  uri: "https://arweave.net/metadata.json",
  creator: wallet.publicKey,
  user: wallet.publicKey,
  mayhemMode: false,
});

// Sign the transaction with BOTH the payer and the mint keypair.
// tx.sign([wallet, mintKeypair]);

Supports prefix, suffix, caseInsensitive, maxAttempts, onProgress, and AbortSignal. For patterns longer than 4 characters, use the multi-threaded Rust generator at rust/. See Tutorial 13: Vanity Mints for the full end-to-end flow and a runnable devnet example.

Buy Tokens on the Bonding Curve

import { Connection, PublicKey } from "@solana/web3.js";
import BN from "bn.js";
import { getBuyTokenAmountFromSolAmount, OnlinePumpSdk } from "@nirholas/pump-sdk";

const connection = new Connection("https://api.mainnet-beta.solana.com");
const sdk = new OnlinePumpSdk(connection);

const mint = new PublicKey("TokenMintAddress...");
const user = wallet.publicKey;

// Fetch all required state in parallel — buyState includes tokenProgram (auto-detected)
const [buyState, global, feeConfig] = await Promise.all([
  sdk.fetchBuyState(mint, user),
  sdk.fetchGlobal(),
  sdk.fetchFeeConfig(),
]);

assert(!buyState.bondingCurve.complete, "Token has already graduated to AMM");

// Calculate expected tokens for 0.1 SOL
const solAmount = new BN(100_000_000); // 0.1 SOL in lamports
const expectedTokens = getBuyTokenAmountFromSolAmount({
  global,
  feeConfig,
  mintSupply: buyState.bondingCurve.tokenTotalSupply,
  bondingCurve: buyState.bondingCurve,
  amount: solAmount,
});

// buyState spreads: bondingCurveAccountInfo, bondingCurve, associatedUserAccountInfo, tokenProgram
const buyIxs = await sdk.buyInstructions({
  ...buyState,
  mint,
  user,
  amount: expectedTokens,
  solAmount,
  slippage: 0.05,         // 5% slippage tolerance
});
// buyIxs is TransactionInstruction[] — compose into a VersionedTransaction and send

Note: fetchBuyState auto-detects whether the token uses SPL Token or Token-2022 and returns tokenProgram accordingly. Always spread ...buyState into buyInstructions to ensure the correct program is used.

Sell Tokens

import BN from "bn.js";
import { getSellSolAmountFromTokenAmount, OnlinePumpSdk } from "@nirholas/pump-sdk";

const sdk = new OnlinePumpSdk(connection);

// Fetch required state in parallel
// Pass buyState.tokenProgram if you have it to avoid a second mint account fetch
const [sellState, global, feeConfig] = await Promise.all([
  sdk.fetchSellState(mint, user),
  sdk.fetchGlobal(),
  sdk.fetchFeeConfig(),
]);

const tokenAmount = new BN(1_000_000_000); // amount in raw units (6 decimals)
const expectedSol = getSellSolAmountFromTokenAmount({
  global,
  feeConfig,
  mintSupply: sellState.bondingCurve.tokenTotalSupply,
  bondingCurve: sellState.bondingCurve,
  amount: tokenAmount,
});

// sellState spreads: bondingCurveAccountInfo, bondingCurve, tokenProgram
const sellIxs = await sdk.sellInstructions({
  ...sellState,
  mint,
  user,
  amount: tokenAmount,
  solAmount: expectedSol,
  slippage: 0.05,
});

Note: fetchSellState returns tokenProgram (auto-detected from the mint). Always spread ...sellState into sellInstructions.

Check Graduation Progress

import { OnlinePumpSdk } from "@nirholas/pump-sdk";

const sdk = new OnlinePumpSdk(connection);
const progress = await sdk.fetchGraduationProgress(mint);

console.log(`Progress: ${progress.progressBps / 100}%`);
console.log(`Graduated: ${progress.isGraduated}`);
console.log(`Tokens remaining: ${progress.tokensRemaining.toString()}`);
console.log(`SOL accumulated: ${progress.solAccumulated.toString()}`);

Set Up Fee Sharing

import { PublicKey } from "@solana/web3.js";
import { PUMP_SDK } from "@nirholas/pump-sdk";

// Create a fee sharing config (creator only, before or after graduation)
const createConfigIx = await PUMP_SDK.createFeeSharingConfig({
  creator: wallet.publicKey,
  mint: tokenMint,
  pool: null,  // null for pre-graduation tokens
});

// Update shareholders (must total exactly 10,000 BPS = 100%)
const updateIx = await PUMP_SDK.updateFeeShares({
  authority: wallet.publicKey,
  mint: tokenMint,
  currentShareholders: [wallet.publicKey],
  newShareholders: [
    { address: wallet.publicKey, shareBps: 7000 },         // 70%
    { address: new PublicKey("Partner..."), shareBps: 3000 }, // 30%
  ],
});

Warning: Shares must total exactly 10,000 BPS. The SDK throws InvalidShareTotalError otherwise. Maximum 10 shareholders.


📚 API Reference

See docs/api-reference.md for the complete API documentation with full TypeScript signatures, parameters, and examples.

Core Classes

ClassDescription
PumpSdkOffline instruction builder — no RPC connection required
OnlinePumpSdkExtends PumpSdk with RPC fetchers for account state
PUMP_SDKPre-instantiated singleton of PumpSdk

Bonding Curve Functions

FunctionReturnsDescription
getBuyTokenAmountFromSolAmount(...)BNTokens received for a given SOL amount
getBuySolAmountFromTokenAmount(...)BNSOL cost for a given token amount
getSellSolAmountFromTokenAmount(...)BNSOL received for selling tokens
bondingCurveMarketCap(...)BNCurrent market cap in lamports
newBondingCurve(global)BondingCurveFresh bonding curve from global config

Analytics Functions

FunctionReturnsDescription
calculateBuyPriceImpact(...)PriceImpactResultPrice impact for a buy trade
calculateSellPriceImpact(...)PriceImpactResultPrice impact for a sell trade
getGraduationProgress(...)GraduationProgressBonding curve completion percentage
getTokenPrice(...)TokenPriceInfoCurrent buy/sell price per token
getBondingCurveSummary(...)BondingCurveSummaryComplete bonding curve overview

Fee Functions

FunctionReturnsDescription
getFee(...)BNFee amount for a trade
computeFeesBps(...)CalculatedFeesBpsCurrent fee basis points (protocol + creator)
calculateFeeTier(...)FeesFee tier for a given market cap

Token Incentive Functions

FunctionReturnsDescription
totalUnclaimedTokens(...)BNUnclaimed $PUMP reward tokens
currentDayTokens(...)BNTokens earned today

🔗 On-Chain Programs

ProgramIDPurpose
Pump6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6PBonding curve creation, buying, selling, migration
PumpAMMpAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEAGraduated AMM pools — trading, liquidity, fees
PumpFeespfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZFee sharing config and social fee PDAs

🔧 Configuration

Constructor

The SDK has no required environment variables. You configure it via the constructor:

ParameterTypeRequiredDescription
connectionConnectionOnly for OnlinePumpSdkSolana RPC connection

Key Constants

ConstantValueDescription
PUMP_PROGRAM_ID6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6PMain Pump program
PUMP_AMM_PROGRAM_IDpAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEAAMM program
PUMP_FEE_PROGRAM_IDpfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZFee program
PUMP_TOKEN_MINTpumpCmXqMfrsAkQ5r49WcJnRayYRqmXz6ae8H7H9Dfn$PUMP token mint
MAX_SHAREHOLDERS10Maximum shareholders in fee sharing
ONE_BILLION_SUPPLY10000000000000001B tokens with 6 decimals
BONDING_CURVE_NEW_SIZE151Bonding curve account size in bytes

⚠️ Error Handling

The SDK defines typed errors for fee sharing validation:

ErrorCauseFix
NoShareholdersErrorEmpty shareholders arrayProvide at least 1 shareholder
TooManyShareholdersErrorMore than 10 shareholdersReduce to ≤ 10 shareholders
ZeroShareErrorA shareholder has 0 or negative BPSSet all shares to positive values
InvalidShareTotalErrorShares don't sum to 10,000 BPSEnsure shares total exactly 10,000
DuplicateShareholderErrorSame address appears twiceRemove duplicate addresses
ShareCalculationOverflowErrorBPS sum exceeds safe integer rangeCheck share values
PoolRequiredForGraduatedErrorpool is null for a graduated coinPass the pool address from fetchPool()

Common Pitfalls

Warning: Never use JavaScript number for token or lamport amounts. Always use BN from bn.js. JavaScript numbers lose precision above 2^53.

Warning: Check bondingCurve.complete before trading. If true, the token has graduated to AMM — use ammBuyInstruction/ammSellInstruction instead.

Warning: createInstruction is deprecated. Use createV2Instruction for all new token creation.


❓ FAQ

Q: Do I need an RPC connection to use the SDK? No. PumpSdk (and the PUMP_SDK singleton) builds instructions offline. Only use OnlinePumpSdk when you need to fetch on-chain state.

Q: How do I know if a token has graduated to AMM? Check bondingCurve.complete === true or use sdk.isGraduated(mint). Graduated tokens trade on PumpAMM, not the bonding curve.

Q: What is slippage in buy/sell instructions? A decimal fraction (e.g., 0.05 = 5%). The SDK adjusts maxSolCost (buy) or minSolOutput (sell) to protect against price movement.

Q: Why do amounts use BN instead of number? Solana token amounts (lamports, token units) regularly exceed JavaScript's safe integer limit (2^53). BN provides arbitrary-precision arithmetic.

Q: What's the difference between Pump and PumpAMM programs? Pump handles the bonding curve phase (creation → graduation). PumpAMM handles post-graduation trading with constant-product AMM pools.

Q: How does fee sharing work? Token creators can split their creator fees among up to 10 shareholders. Each shareholder gets a share in basis points (1/10,000). The total must equal exactly 10,000 BPS (100%).

Q: What is Mayhem Mode? A special token creation mode with randomized bonding curve parameters. Tokens created with mayhemMode: true have unpredictable pricing dynamics.

Q: Can I use the SDK in the browser? Yes. The SDK has no Node.js-specific dependencies. The ESM build works in modern browsers with a bundler.


🏗️ Architecture

See docs/architecture.md for detailed system design, data flow diagrams, and module explanations.


🤝 Contributing

We welcome contributions! See CONTRIBUTING.md for:

  • Development setup
  • Branch naming and commit conventions
  • Testing requirements
  • PR process

📄 License

Apache-2.0 © nirholas


🙏 Acknowledgments

Documentation

Full documentation site: https://nirholas.github.io/pump-fun-sdk/

Related MCP servers

Real-time Solana PumpFun on-chain intelligence — GitHub claims, token graduations, and credibility scoring.

19
TypeScript
View repository →

Free, read-only pump.fun + Solana MCP for token discovery, on-chain analysis, SNS, and 3D snapshots.

218
JavaScript
Apache-2.0
View repository →

AI-powered codebase analysis platform with security scanning, semantic search, and support for massive monorepos.

27
Python
View repository →

Robinhood Crypto Trading API for AI agents: quotes, holdings, orders read-only; opt-in trading.

6
TypeScript
Apache-2.0
View repository →

Generate interactive 3D dioramas from text prompts, export GLB models, and manage saved scenes.

218
JavaScript
Apache-2.0
View repository →

Discover and track signal feeds ranked by proven trading edge, subscribe to publishers, and monitor results.

218
JavaScript
Apache-2.0
View repository →