Pump.fun MCP Server
pumpfun-mcp
一个模型上下文协议 (MCP) 服务器,用于与 Solana 上的Pump.fun平台交互。该服务器使 AI 助手能够在 Pump.fun 平台上创建、购买和出售代币。
用法
https://github.com/user-attachments/assets/0b0f1f6f-6ea6-4ca8-92a8-b4cc895814e4
要将此服务器与 Claude 或其他与 MCP 兼容的 AI 助手一起使用,请将以下配置添加到您的 MCP 客户端:
如果您使用的是 MacOS 并且想要在 Claude Desktop 中运行它,请在您的 ~/Library/Application \Support/Claude/claude_desktop_config.json 文件中写入以下内容:
{
"mcpServers": {
"pumpfun": {
"command": "node",
"args": ["/Users/noahsolomon/Desktop/pumpfun-mcp/build/index.js"], // note this should be YOUR absolute path to index.js, not mine.
"env": {
"HELIUS_RPC_URL": "https://your-helius-rpc-url.com"
}
}
}
}将https://your-helius-rpc-url.com替换为您的Helius RPC URL 。
Related MCP server: AMOCA Solana MCP Server
安装
克隆此存储库:
git clone https://github.com/noahgsolomon/pumpfun-mcp.git cd pumpfun-mcp安装依赖项:
npm install使用您的 Solana RPC URL 创建一个
.env文件:HELIUS_RPC_URL=https://your-helius-rpc-url.com您可以从Helius获取免费的 RPC URL。
要使用现有的 Solana 钱包,请将您的私钥添加到
.env文件中:PRIVATE_KEY=your-base58-encoded-private-key然后运行转换脚本来创建密钥对文件:
node convert-key.js这将使用您的密钥对在
.keys文件夹中创建一个default.json文件。构建项目:
npm run build运行 MCP 服务器:
node build/index.js
成分
工具
获取令牌信息
获取有关 Pump.fun 代币的信息
输入参数:
tokenAddress(字符串,必需):代币的铸造地址
创建令牌
创建一个新的 Pump.fun 代币
输入参数:
name(字符串,必需):令牌名称symbol(字符串,必需):代币符号description(字符串,必需):令牌描述imageUrl(字符串,可选):本地图像文件的路径initialBuyAmount(数字,必需):SOL 中的初始购买金额(最小 0.0001)accountName(字符串,可选):要使用的帐户名称(默认为“default”)
购买代币
购买 Pump.fun 代币
输入参数:
tokenAddress(字符串,必需):代币的铸造地址buyAmount(数字,必填):SOL 购买金额(最小 0.0001)accountName(字符串,可选):要使用的帐户名称(默认为“default”)slippageBasisPoints(数字,可选):基点的滑点容差(默认为 100)
出售代币
出售 Pump.fun 代币
输入参数:
tokenAddress(字符串,必需):代币的铸造地址sellAmount(数字,必需):要出售的代币数量(使用 0 表示全部出售)accountName(字符串,可选):要使用的帐户名称(默认为“default”)slippageBasisPoints(数字,可选):基点的滑点容差(默认为 100)
列出账户
列出密钥文件夹中的所有帐户
无需输入参数
获取账户余额
获取帐户的 SOL 和代币余额
输入参数:
accountName(字符串,可选):要检查的帐户名称(默认为“default”)tokenAddress(字符串,可选):用于检查余额的代币地址
账户管理
MCP 自动在.keys文件夹中创建并管理 Solana 密钥对。每个密钥对都存储为一个 JSON 文件,文件名以账户名命名。
创建令牌时,mint 密钥对也会保存在.keys文件夹中,前缀为mint- 。
要使用您自己的帐户来使用 MCP,您需要:
将您的私钥添加到
.env文件并运行node convert-key.js钱包里有足够的 SOL
独立脚本
该项目包含几个可以直接运行的独立脚本:
获取令牌信息:
node build/get-token-info.js <token_address>创建令牌:
node build/create-token.js <name> <symbol> <description> <initial_buy_amount> [account_name] [image_url]购买代币:
node build/buy-token.js <token_address> <buy_amount_sol> [account_name] [slippage_basis_points]出售代币:
node build/sell-token.js <token_address> <sell_amount> [account_name] [slippage_basis_points]列出帐户:
node build/list-accounts.js获取账户余额:
node build/get-token-balance.js <account_name> [token_address]
重要提示
安全性:密钥对以未加密的形式存储在
.keys文件夹中。请确保妥善保护此文件夹。费用:Solana 上的所有交易都需要 SOL 作为交易费。请确保您的账户有足够的 SOL。
滑点:默认滑点容差为 1%(100 个基点)。您可以根据每笔交易进行调整。
图片:使用图片创建令牌时,必须提供图片的本地文件路径。不支持远程 URL。
发展
项目结构
src/index.ts:主 MCP 服务器入口点src/get-token-info.ts:获取token信息src/create-token.ts:令牌创建功能src/buy-token.ts:代币购买功能src/sell-token.ts:代币销售功能src/list-accounts.ts:帐户列表功能src/get-token-balance.ts:账户余额检查src/utils.ts:共享实用程序函数convert-key.js:将 base58 私钥转换为密钥对 JSON 文件的实用程序
建筑
npm run buildAvailable Tools
6 toolsbuy-tokenC
Buy a Pump.fun token
Inputs: buyAmount (required), tokenAddress (required), accountName, slippageBasisPoints.
create-tokenC
Create a new Pump.fun token
Inputs: description (required), initialBuyAmount (required), name (required), symbol (required), +2 more.
get-account-balanceC
Get the SOL and token balances for an account
Inputs: accountName, tokenAddress.
get-token-infoC
Get information about a Pump.fun token
Inputs: tokenAddress (required).
list-accountsB
List all accounts in the keys folder
Inputs: no named parameters.
sell-tokenC
Sell a Pump.fun token
Inputs: sellAmount (required), tokenAddress (required), accountName, slippageBasisPoints.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool has a clearly distinct purpose with no overlap: buying, selling, creating tokens, getting token info, getting account balances, and listing accounts. The actions and targets are well-defined and unambiguous.
Most tools follow a consistent verb_noun pattern (e.g., buy-token, create-token, get-token-info, sell-token). However, 'list-accounts' uses 'list' instead of 'get' for consistency with 'get-account-balance', and 'get-account-balance' includes a hyphenated compound noun, causing minor deviations.
With 6 tools, this server is well-scoped for managing Pump.fun tokens and accounts. Each tool serves a clear, essential function, and the count is appropriate for the domain without being excessive or insufficient.
The toolset covers core token operations (create, buy, sell, get info) and account management (balance, listing), providing good coverage. A minor gap is the lack of update or delete operations for tokens or accounts, but agents can likely work around this for basic workflows.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
DexTrading's MCP server gives AI assistants live, read-only data on profitable on-chain traders on Solana, BNB Chain, Base and Robinhood Chain. Free, no API key. Tools: smart_money_buying_now (coins proven wallets are buying now), find_traders_to_copy (best traders, coin launchers and fake numbers left out), trader_report_card (profit, win rate, hold time, red flags, verdict), compare_traders (side by side) and build_copy_squad (a group copied only when several agree).
Pay-per-call MCP tools over x402 (USDC/Solana): LLM, utilities, x402 market and model prices.
Production-grade MCP gateway delivering 8 real-time AI tools with instant x402 micropayments settled in USDC on Base Mainnet or SPL-USDC on Solana. Features Basescan contract auditing, wallet analytics, headless browser scraping, and pre-scraped oracle data feeds.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server enabling AI agents to interact with the Solana blockchain for DeFi operations like checking balances, transferring tokens, executing swaps, and fetching price data.21MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI models to interact with the Solana blockchain, providing RPC methods, wallet management, DeFi trading capabilities, and Helius API integration for enhanced Solana development.5MIT
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables Claude AI to interact with the Solana blockchain, allowing it to execute transactions, query accounts, manage wallets, get price predictions, trade tokens, and access various blockchain data sources.4-
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that extends AI capabilities by providing tools to interact with the Solana blockchain, enabling operations like transactions, account queries, and wallet management.1Apache 2.0