Pump SDK MCP Server

io.github.nirholas由 GitHub 帳號 nirholas 發布v1.0.2更新於 Oct 24, 2026

Build extend and maintain pump - Token creation buying selling migration fee collection

已驗證STDIO僅桌面金融開發者工具

概覽

AI 產生的概覽

本機 MCP 伺服器,封裝 Solana 上的 Pump SDK:建立、報價並查詢 Pump.fun 代幣發行、聯合曲線交易、AMM 池與創作者費用。

可以做什麼
  • 讀取 Pump 協議狀態:聯合曲線、價格、市值、畢業進度、AMM 池與全域設定
  • 離線報價買入與賣出,含手續費、有效價格與價格衝擊
  • 建立代幣建立、聯合曲線與 AMM 交易、費用拆分與費用撥付的指令
  • 查詢與領取創作者費用和交易量獎勵,並推導 Pump 程式位址
  • 解碼交易中的 Pump 事件,並產生靚號 mint 位址
適用情境
適合需要檢視或準備 Pump.fun / Solana 代幣操作的場合:查詢某代幣的曲線與畢業狀態、在下單前估算交易成本,或為開發流程組裝發行與費用拆分指令。
執行需求
透過 npx 以 stdio 在本機執行(npm 套件 pump-fun-mcp);使用 SDK 需 Node.js 及 Solana 相關相依套件。未宣告任何環境變數或 API 金鑰。讀取鏈上狀態需要 Solana RPC 連線;送出交易需要使用者自行提供有餘額的錢包與簽章方式。
安裝前請注意
這是加密貨幣工具:交易、代幣發行與費用領取都會動用 Solana 主網上的真實資金,SDK 產生的是需由錢包簽章並廣播的指令。README 稱 SDK 本身不送出交易、交易會先模擬並確認後才送出,但由助理驅動的流程仍可能產生實際花費。請將錢包金鑰視為機密,並在簽章前核對報價、滑點與收款位址。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Pump SDK MCP Server,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Pump SDK

TypeScript SDK for the Pump protocol on Solana — token creation, bonding curves, AMM pools, fee sharing, and volume rewards.

[npm version] [license] [downloads] [TypeScript] [Solana]


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

A GitHub social-fee withdrawal is real on-chain activity, not automatic proof that a developer created or endorses a coin. Claim cards distinguish verified repository/creator-wallet relationships, identity mismatches, unverified links, and unresolved pooled withdrawals. See the notification rules above.

📈 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

bash
# npmnpm install @nirholas/pump-sdk
# yarnyarn add @nirholas/pump-sdk
# pnpmpnpm add @nirholas/pump-sdk

Peer Dependencies

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

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

Minimal Example

typescript
import { Connection, PublicKey } from "@solana/web3.js";import { OnlinePumpSdk } from "@nirholas/pump-sdk";
// 1. Create an online SDK instanceconst connection = new Connection("https://api.mainnet-beta.solana.com");const sdk = new OnlinePumpSdk(connection);
// 2. Fetch current token stateconst 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.

bash
npm install -g @nirholas/pump-sdk
pump curve <mint>                  # price, market cap, graduation meter, fee tierpump quote buy <mint> --sol 1      # what 1 SOL really buys, after fees and impactpump watch <mint>                  # live dashboardpump 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:

bash
pump curve <mint> --json | jq .marketCapSolpump 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.

bash
git clone https://github.com/nirholas/pump-fun-sdk && cd pump-fun-sdk && npm installnpm run example        # list all 50npm run example 11     # offline buy quotesnpm 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

typescript
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 Holder-Reward Token

Set holderReward: true to direct creator fees to the protocol-derived holder rewards PDA. Pump.fun distributes those fees to holders automatically; holders do not need to submit claims.

typescript
const createIx = await PUMP_SDK.createV2Instruction({  mint: mintKeypair.publicKey,  name: "Holder Helper",  symbol: "HOLD",  uri: "https://example.com/holder-helper.json",  creator: wallet.publicKey,  user: wallet.publicKey,  mayhemMode: false,  holderReward: true,});

For an atomic launch and initial buy, pass the same flag to createV2AndBuyInstructions; the SDK routes the buy through creatorVaultPda(holderRewardsPda(mint)). Run the complete broadcast-free demo with npm run example 51.

New cashback launches are deprecated and rejected. Existing cashback coins remain tradeable and accrued cashback remains claimable.

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.

typescript
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

typescript
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 SOLconst solAmount = new BN(100_000_000); // 0.1 SOL in lamportsconst expectedTokens = getBuyTokenAmountFromSolAmount({  global,  feeConfig,  mintSupply: buyState.bondingCurve.tokenTotalSupply,  bondingCurve: buyState.bondingCurve,  amount: solAmount,});
// buyState spreads: bondingCurveAccountInfo, bondingCurve, associatedUserAccountInfo, tokenProgramconst 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

typescript
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 fetchconst [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, tokenProgramconst 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

typescript
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

typescript
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 the quote mint's base units
newBondingCurve(global, quoteMint?, ...)BondingCurveFresh bonding curve from global config, for any quote mint
getBuyV3QuoteAmountFromTokenAmount(...)BNbuy_v3 cost, including the post-completion leg of a synthetic migration
getBuyV3TokenAmountFromQuoteAmount(...)BNTokens buy_exact_quote_in_v3 buys for a quote budget
pumpQuoteReserves(global, quote){ virtualQuoteReserves, depth }Starting reserves create_v2 derives for a coin quoted in a pump coin

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
selectCurveFeeSchedule(...)FeesFee schedule by quote mint (SOL-like tiers, stable tiers, or exotic flat fees)

October 2026 Program Upgrade (3.0.0)

BuilderDescription
buyV3Instructions / buyExactQuoteInV3Instructions / sellV3Instructionsv3 curve trades for SOL and token-quoted curves; fees stay on the curve for a sweep
buyV2Instructions / buyExactQuoteInV2Instructions / sellV2Instructionsv2 curve trades that pay fees out in the trade; the lane for cashback coins
ammBuyV2Instruction / ammBuyExactQuoteInV2Instruction / ammSellV2InstructionPumpSwap v2 trades; fees stay in the pool for a sweep
multiHopSwapInstructionsOne exact-input route through pump pools and pump-coin quoted curves
sweepCreatorFeeInstruction / ammSweepCreatorFeeInstruction (and the protocol variants)Pay fees left by v3 / v2 trades out to the creator vault or protocol recipients
OnlinePumpSdk.creatorFeeSweepInstructions(mint, payer)Exactly the sweeps a coin needs before a distribution, CTO or fee-share change
createV2Instruction({ quoteMint, pumpQuote, ... })Launch a coin quoted in a whitelisted, QuoteControl-listed, or pump coin mint

Program guides for each are in docs/pump-official/docs/instructions; the SDK side is in docs/api-reference.md, docs/amm-trading.md and docs/bonding-curve-math.md. Upgrading from 2.x: see the 3.0.0 entry in CHANGELOG.md.

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://sdk.pumpk.it

Star History

[Star History Chart]

Support the project

If pump-fun-sdk saves you time, star it on GitHub. Stars are how other developers and AI agents find the repositories worth trusting, and they cost you one click.

Know someone who would use it? Post on X · Share on Bluesky · Share on LinkedIn · Submit to Hacker News · Share on Reddit

Built for AI agents too

Coding agents and LLM tooling can read this repo directly: AGENTS.md, llms.txt, llms-full.txt. Point an agent at https://github.com/nirholas/pump-fun-sdk and it has the context it needs.

More from the same author

Contributors

[Contributors]

來源:README.md,提交 f5bf85b

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.2最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。