Pump.fun MCP Server

Pump.fun MCP Server

Enables AI assistants to interact with the Pump.fun platform on Solana for creating, buying, and selling meme tokens. Provides comprehensive token management including balance checking, account management, and secure transaction handling.

Category
访问服务器

README

pumpfun-mcp

A Model Context Protocol (MCP) server for interacting with the Pump.fun platform on Solana. This server enables AI assistants to create, buy, and sell tokens on the Pump.fun platform.

<img src="https://pump.fun/logo.png" width="250" height="250" alt="Pump.fun MCP Demo">

Usage

https://github.com/user-attachments/assets/0b0f1f6f-6ea6-4ca8-92a8-b4cc895814e4

To use this server with Claude or other MCP-compatible AI assistants, add the following configuration to your MCP client:

If you're on MacOS and want to run this in Claude Desktop, in your ~/Library/Application \Support/Claude/claude_desktop_config.json file, write the following:

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

Replace https://your-helius-rpc-url.com with your Helius RPC URL.

Installation

  1. Clone this repository:

    git clone https://github.com/noahgsolomon/pumpfun-mcp.git
    cd pumpfun-mcp
    
  2. Install dependencies:

    npm install
    
  3. Create a .env file with your Solana RPC URL:

    HELIUS_RPC_URL=https://your-helius-rpc-url.com
    

    You can get a free RPC URL from Helius.

    To use an existing Solana wallet, add your private key to the .env file:

    PRIVATE_KEY=your-base58-encoded-private-key
    

    Then run the conversion script to create a keypair file:

    node convert-key.js
    

    This will create a default.json file in the .keys folder with your keypair.

  4. Build the project:

    npm run build
    
  5. Run the MCP server:

    node build/index.js
    

Components

Tools

  • get-token-info

    • Get information about a Pump.fun token
    • Input parameters:
      • tokenAddress (string, required): The token's mint address
  • create-token

    • Create a new Pump.fun token
    • Input parameters:
      • name (string, required): Token name
      • symbol (string, required): Token symbol
      • description (string, required): Token description
      • imageUrl (string, optional): Path to local image file
      • initialBuyAmount (number, required): Initial buy amount in SOL (min 0.0001)
      • accountName (string, optional): Name of the account to use (defaults to "default")
  • buy-token

    • Buy a Pump.fun token
    • Input parameters:
      • tokenAddress (string, required): The token's mint address
      • buyAmount (number, required): Amount to buy in SOL (min 0.0001)
      • accountName (string, optional): Name of the account to use (defaults to "default")
      • slippageBasisPoints (number, optional): Slippage tolerance in basis points (defaults to 100)
  • sell-token

    • Sell a Pump.fun token
    • Input parameters:
      • tokenAddress (string, required): The token's mint address
      • sellAmount (number, required): Amount of tokens to sell (use 0 to sell all)
      • accountName (string, optional): Name of the account to use (defaults to "default")
      • slippageBasisPoints (number, optional): Slippage tolerance in basis points (defaults to 100)
  • list-accounts

    • List all accounts in the keys folder
    • No input parameters required
  • get-account-balance

    • Get the SOL and token balances for an account
    • Input parameters:
      • accountName (string, optional): Name of the account to check (defaults to "default")
      • tokenAddress (string, optional): Token address to check balance for

Account Management

The MCP automatically creates and manages Solana keypairs in the .keys folder. Each keypair is stored as a JSON file with the account name as the filename.

When creating a token, the mint keypair is also saved in the .keys folder with the prefix mint-.

To use the MCP with your own account, you need to:

  1. Add your private key to the .env file and run node convert-key.js
  2. Have sufficient SOL in that wallet

Standalone Scripts

The project includes several standalone scripts that can be run directly:

  • Get Token Info: node build/get-token-info.js <token_address>
  • Create Token: node build/create-token.js <name> <symbol> <description> <initial_buy_amount> [account_name] [image_url]
  • Buy Token: node build/buy-token.js <token_address> <buy_amount_sol> [account_name] [slippage_basis_points]
  • Sell Token: node build/sell-token.js <token_address> <sell_amount> [account_name] [slippage_basis_points]
  • List Accounts: node build/list-accounts.js
  • Get Account Balance: node build/get-token-balance.js <account_name> [token_address]

Important Notes

  • Security: The keypairs are stored unencrypted in the .keys folder. Make sure to secure this folder appropriately.
  • Fees: All transactions on Solana require SOL for transaction fees. Make sure your accounts have enough SOL.
  • Slippage: The default slippage tolerance is 1% (100 basis points). You can adjust this for each transaction.
  • Images: When creating tokens with images, you must provide a local file path to the image. Remote URLs are not supported.

Development

Project Structure

  • src/index.ts: Main MCP server entry point
  • src/get-token-info.ts: Token information retrieval
  • src/create-token.ts: Token creation functionality
  • src/buy-token.ts: Token buying functionality
  • src/sell-token.ts: Token selling functionality
  • src/list-accounts.ts: Account listing functionality
  • src/get-token-balance.ts: Account balance checking
  • src/utils.ts: Shared utility functions
  • convert-key.js: Utility to convert a base58 private key to a keypair JSON file

Building

npm run build

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选