Pump.fun MCP server

Enables direct interaction with the Pump.fun platform on Solana blockchain for creating, buying, and selling tokens with customizable parameters and secure wallet management.
Back to servers
Setup instructions
Provider
Noah Solomon
Release date
Mar 15, 2025
Language
TypeScript
Stats
11 stars

This MCP server allows AI assistants to interact with the Pump.fun platform on Solana, enabling token creation, buying, and selling operations directly from your AI tools.

Installation

  1. Clone the repository and navigate to the project folder:

    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.

  4. (Optional) 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:

    node convert-key.js
    

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

  5. Build the project:

    npm run build
    
  6. Run the MCP server:

    node build/index.js
    

Setting Up with Claude Desktop

If you're using Claude Desktop on MacOS, add the following configuration to your ~/Library/Application Support/Claude/claude_desktop_config.json file:

{
  "mcpServers": {
    "pumpfun": {
      "command": "node",
      "args": ["/path/to/your/pumpfun-mcp/build/index.js"],
      "env": {
        "HELIUS_RPC_URL": "https://your-helius-rpc-url.com"
      }
    }
  }
}

Replace /path/to/your/pumpfun-mcp/build/index.js with the absolute path to the index.js file on your system, and use your actual Helius RPC URL.

Available Tools

Get Token Information

Retrieves details about a specific Pump.fun token.

Parameters:

  • tokenAddress (string, required): The token's mint address

Create Token

Creates a new Pump.fun token.

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

Purchases a Pump.fun token.

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

Sells a Pump.fun token.

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

Lists all accounts in the keys folder.

Parameters: None

Get Account Balance

Checks the SOL and token balances for an account.

Parameters:

  • accountName (string, optional): Name of the account to check (defaults to "default")
  • tokenAddress (string, optional): Token address to check balance for

Using Standalone Scripts

You can also use the tools directly as standalone scripts:

  • 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 Security Notes

  • Keypairs are stored unencrypted in the .keys folder. Secure this folder appropriately.
  • All transactions require SOL for fees. Ensure your accounts have sufficient SOL.
  • The default slippage tolerance is 1% (100 basis points), which can be adjusted per transaction.
  • When creating tokens with images, you must provide a local file path (remote URLs are not supported).

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "pumpfun" '{"command":"node","args":["build/index.js"],"env":{"HELIUS_RPC_URL":"https://your-helius-rpc-url.com"}}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "pumpfun": {
            "command": "node",
            "args": [
                "build/index.js"
            ],
            "env": {
                "HELIUS_RPC_URL": "https://your-helius-rpc-url.com"
            }
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "pumpfun": {
            "command": "node",
            "args": [
                "build/index.js"
            ],
            "env": {
                "HELIUS_RPC_URL": "https://your-helius-rpc-url.com"
            }
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later