Integrations
Provides tools for creating, buying, and selling tokens on the Pump.fun platform on the Solana blockchain, with account management capabilities and balance checking
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 文件中写入以下内容:
Copy
将https://your-helius-rpc-url.com
替换为您的Helius RPC URL 。
安装
- 克隆此存储库:Copy
- 安装依赖项:Copy
- 使用您的 Solana RPC URL 创建一个
.env
文件:您可以从Helius获取免费的 RPC URL。要使用现有的 Solana 钱包,请将您的私钥添加到Copy.env
文件中:然后运行转换脚本来创建密钥对文件:Copy这将使用您的密钥对在Copy.keys
文件夹中创建一个default.json
文件。 - 构建项目:Copy
- 运行 MCP 服务器:Copy
成分
工具
- 获取令牌信息
- 获取有关 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 文件的实用程序
建筑
Copy
Related MCP Servers
- AsecurityAlicenseAqualityA Model Context Protocol server that allows AI assistants to interact with Appwrite's API, providing tools to manage databases, users, functions, teams, and other resources within Appwrite projects.Last updated -8436PythonMIT License
- AsecurityFlicenseAqualityA Model Context Protocol server that enables AI assistants to interact with the Deriv trading API, providing access to active trading symbols and account balance information.Last updated -2Python
- -securityAlicense-qualityA 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.Last updated -6015TypeScriptMIT License
- -securityFlicense-qualityA Model Context Protocol server that enables AI assistants to access Flow blockchain data and perform operations such as checking balances, resolving domains, executing scripts, and submitting transactions.Last updated -JavaScript