Pump.fun MCP Server

by noahgsolomon

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 文件中写入以下内容:

{ "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

安装

  1. 克隆此存储库:
    git clone https://github.com/noahgsolomon/pumpfun-mcp.git cd pumpfun-mcp
  2. 安装依赖项:
    npm install
  3. 使用您的 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文件。
  4. 构建项目:
    npm run build
  5. 运行 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,您需要:

  1. 将您的私钥添加到.env文件并运行node convert-key.js
  2. 钱包里有足够的 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 build
-
security - not tested
F
license - not found
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

模型上下文协议服务器使 AI 助手能够在 Solana 上的 Pump.fun 平台上创建、购买和出售代币。

  1. 用法
    1. 安装
      1. 成分
        1. 工具
        2. 账户管理
      2. 独立脚本
        1. 重要提示
          1. 发展
            1. 项目结构
            2. 建筑

          Related MCP Servers

          • A
            security
            A
            license
            A
            quality
            A 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 -
            84
            36
            Python
            MIT License
            • Linux
            • Apple
          • A
            security
            F
            license
            A
            quality
            A 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 -
            2
            Python
            • Apple
          • -
            security
            A
            license
            -
            quality
            A 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 -
            60
            15
            TypeScript
            MIT License
          • -
            security
            F
            license
            -
            quality
            A 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
            • Linux
            • Apple

          View all related MCP servers

          ID: llgscbccq1