logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

solana-pumpfun-gateway

A specialized Model Context Protocol (MCP) interface engineered for seamless interaction with the Solana-based Pump.fun decentralized application. This tool empowers AI agents to execute core operations such as novel token minting, acquisition (buying), and divestment (selling) of digital assets on the platform, alongside comprehensive management of associated Solana account keypairs. It further augments these capabilities with AI-driven transaction optimization and account oversight features.

Author

solana-pumpfun-gateway logo

noahgsolomon

No License

Quick Info

GitHub GitHub Stars 17
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

solanacryptopumpfunsolana accountsplatform solanacrypto noahgsolomon

Solana Pump.fun Operational Interface (MCP)

This Model Context Protocol (MCP) server furnishes AI systems with the necessary endpoints to programmatically engage with the Pump.fun ecosystem residing on the Solana ledger. It facilitates automated execution of token lifecycle management actions.

Pump.fun Operation Demonstration

Deployment

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

To integrate this gateway with Claude or other compliant MCP clients, configure your client utilizing the subsequent structure. For macOS users utilizing Claude Desktop, integrate this into ~/Library/Application Support/Claude/claude_desktop_config.json:

{ "mcpServers": { "pumpfun": { "command": "node", "args": ["/path/to/your/pumpfun-mcp/build/index.js"], // IMPORTANT: Substitute with your actual absolute file path. "env": { "HELIUS_RPC_URL": "https://your-preferred-helius-endpoint.com" } } } }

Ensure that https://your-preferred-helius-endpoint.com is substituted with a valid Helius RPC endpoint.

Initialization Sequence

  1. Repository Cloning:

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

  2. Dependency Installation:

    npm install

  3. Environment Configuration (.env file):

    Establish a .env file containing your Solana connection string:

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

    Optionally, for account persistence, inject your private key (Base58 encoded) into the environment:

    PRIVATE_KEY=your-base58-encoded-private-key

    Subsequently, execute the key material serialization script:

    node convert-key.js

    This action generates a default.json keypair file within the .keys directory.

  4. Project Compilation:

    npm run build

  5. Server Startup:

node build/index.js

Available Functionalities (Tools)

Token Operations

  • retrieve-token-metadata

  • Fetches operational data for a specified Pump.fun digital asset.

  • Parameters:

    • tokenAddress (Text, Mandatory): The unique mint identifier for the asset.
  • mint-new-asset

  • Initiates the creation process for a new token on Pump.fun.

  • Parameters:

    • name (Text, Mandatory): The designated name of the asset.
    • symbol (Text, Mandatory): The ticker symbol.
    • description (Text, Mandatory): A comprehensive overview of the asset.
    • imageUrl (Text, Optional): Local file system path to the asset's visual representation.
    • initialBuyAmount (Numeric, Mandatory): Initial liquidity injection in SOL (minimum threshold: 0.0001 SOL).
    • accountName (Text, Optional): Identifier for the originating account (defaults to "default").
  • execute-purchase

  • Executes a buy order for a targeted token using SOL.

  • Parameters:

    • tokenAddress (Text, Mandatory): The asset's mint address.
    • buyAmount (Numeric, Mandatory): Quantity of SOL designated for the purchase.
    • accountName (Text, Optional): The signing account identifier (defaults to "default").
    • slippageBasisPoints (Numeric, Optional): Maximum permissible deviation from expected price, measured in 1/100th of a percent (default: 100).
  • execute-sale

  • Executes a sell order, liquidating holdings of a specific token.

  • Parameters:

    • tokenAddress (Text, Mandatory): The asset's mint address.
    • sellAmount (Numeric, Mandatory): Quantity of tokens to divest (Input '0' signifies liquidation of the entire holding).
    • accountName (Text, Optional): The signing account identifier (defaults to "default").
    • slippageBasisPoints (Numeric, Optional): Permissible price divergence tolerance (default: 100).
  • enumerate-wallets

  • Generates a listing of all local keypair files maintained in the .keys repository.

  • Parameters: None.

  • check-wallet-holdings

  • Retrieves the current SOL and specific token balances for a designated wallet.
  • Parameters:
    • accountName (Text, Optional): The wallet identifier to inspect (defaults to "default").
    • tokenAddress (Text, Optional): The optional mint address whose balance is required.

Wallet Management

The MCP inherently manages Solana cryptographic keypairs, storing them as JSON artifacts within the .keys directory, named according to their assigned account names.

Upon token genesis, the associated mint keypair is also archived in .keys, prefixed with mint-.

To utilize personalized credentials:

  1. Inject your private key into .env and execute node convert-key.js.
  2. Ensure the utilized wallet possesses adequate SOL reserves for transaction costs.

Auxiliary Command-Line Scripts

Standalone execution scripts are provided for direct terminal interaction:

  • Token Metadata Retrieval: node build/get-token-info.js <token_address>
  • Token Genesis: node build/create-token.js <name> <symbol> <description> <initial_buy_amount_sol> [account_name] [image_path]
  • Token Acquisition: node build/buy-token.js <token_address> <buy_amount_sol> [account_name] [slippage_bps]
  • Token Divestment: node build/sell-token.js <token_address> <sell_quantity> [account_name] [slippage_bps]
  • Wallet Enumeration: node build/list-accounts.js
  • Balance Inquiry: node build/get-token-balance.js <account_name> [token_address]

Critical Operational Directives

  • Security Posture: Wallet private keys are persisted in plaintext within the .keys directory. Extreme diligence must be applied to securing this location.
  • Cost Implications: All network interactions on Solana incur transaction fees, payable in SOL. Maintain sufficient SOL balance in operative wallets.
  • Price Variation Tolerance: The standard allowable variance for trade execution is 1.0% (represented by 100 basis points). This can be customized per trade.
  • Visual Assets: Token creation only accepts absolute paths to local image files; remote HTTP/S references are not supported for asset imagery.

Development Structure

Directory Layout

  • src/index.ts: Core server bootstrap and routing logic.
  • src/get-token-info.ts: Logic for fetching asset metadata.
  • src/create-token.ts: Implementation for new asset issuance.
  • src/buy-token.ts: Logic governing token purchases.
  • src/sell-token.ts: Logic governing token sales.
  • src/list-accounts.ts: Implementation for local wallet file listing.
  • src/get-token-balance.ts: Functionality to query SOL/Token holdings.
  • src/utils.ts: Shared, reusable utility routines.
  • convert-key.js: Utility script for translating Base58 private keys to standardized keypair JSON format.

Compilation Process

npm run build

See Also

`