PumpSwap MCP Server

PumpSwap MCP Server

MCP server for real-time Solana token trades and pool data.

5
Stars
5
Forks
5
Watchers
1
Issues
PumpSwap MCP Server allows AI agents to interact with the PumpSwap DEX on Solana for automated, real-time token swaps and on-chain trading operations. It exposes commands for buying and selling tokens, querying token prices, and retrieving liquidity pool information. Designed for secure integration with Solana accounts, it enables customizable slippage and transaction fees while supporting context-driven, AI-issued commands. The server operates as a bridge between AI agents and the PumpSwap protocol, facilitating seamless trading and data queries.

Key Features

Buy tokens with customizable slippage and priority fees
Sell tokens for SOL with parameter configuration
Real-time token price querying
Retrieval of detailed liquidity pool data
MCP command-based server interface
Integration with PumpSwap DEX
Secure Solana private key management
Configurable environment variables
Python 3.10+ support
Automated transaction signing and execution

Use Cases

Automated cryptocurrency trading via AI agents
Real-time token purchase and sale on the Solana blockchain
Building trading bots with context-aware NLP interfaces
Querying live token prices for portfolio management
Fetching and analyzing PumpSwap pool data for research
Enabling AI-driven DeFi applications or assistants
Integrating Python applications with Solana DEX operations
Implementing custom trading strategies with programmatic control
Monitoring and managing crypto assets with automated tools
Facilitating secure, on-chain token swaps for end users

README

PumpSwap MCP Server

An MCP server that enables AI agents to interact with PumpSwap for real-time token swaps and automated on-chain trading.

License Python Status

Features

  • Buy Tokens: Purchase tokens using SOL with customizable slippage and priority fees.
  • Sell Tokens: Sell tokens for SOL with configurable parameters.
  • Token Price Query: Retrieve current token prices in SOL.
  • Pool Data Retrieval: Fetch and display detailed pool information for a given token mint.

Prerequisites

  • Python 3.13 or higher
  • uv for dependency management and script execution
  • Solana RPC endpoint (e.g., https://api.mainnet-beta.solana.com)
  • A valid Solana private key for transaction signing

Installation

  1. Clone the Repository:

    bash
    git clone https://github.com/kukapay/pumpswap-mcp.git
    cd pumpswap-mcp
    
  2. Install uv: If uv is not installed, follow the official uv installation guide. For example:

    bash
    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  3. Set Up Dependencies: Use uv to install dependencies:

    bash
    uv sync
    
  4. Configure Environment Variables: Create a .env.private filein the project root with the following variables:

    plaintext
    HTTPS_RPC_ENDPOINT=https://api.mainnet-beta.solana.com
    BUY_SLIPPAGE=0.3
    SELL_SLIPPAGE=0.1
    SWAP_PRIORITY_FEE=1500000
    PRIVATE_KEY=your-solana-private-key
    

    Replace your-solana-private-key with your actual Solana private key.

Usage

Run the MCP Server

Use uv to run the server:

bash
uv run main.py

The server will listen for MCP commands and expose the following tools:

  • buy_token(mint: str, sol_amount: float, user_private_key: str): Buy tokens with SOL.
  • sell_token(mint: str, token_amount: float, user_private_key: str): Sell tokens for SOL.
  • get_token_price(mint: str): Fetch the current token price in SOL.
  • get_pool_data(mint: str): Retrieve formatted pool data for a token.

Buy Tokens

Prompt:

Buy 0.1 SOL worth of tokens with mint address FC988ZAKRPc26wefDAxcYWB8kgbJTH4Tg3qDvf7xpump.

This triggers buy_token("FC988ZAKRPc26wefDAxcYWB8kgbJTH4Tg3qDvf7xpump", 0.1).

Expected Output:

Buy successful for 0.1 SOL of token FC988ZAKRPc26wefDAxcYWB8kgbJTH4Tg3qDvf7xpump
Transaction ID: <transaction-id>
Amount: <token-amount>
Token Price (SOL): <price>

Sell Tokens

Prompt:

Sell 1000 tokens of FC988ZAKRPc26wefDAxcYWB8kgbJTH4Tg3qDvf7xpump.

This triggers sell_token("FC988ZAKRPc26wefDAxcYWB8kgbJTH4Tg3qDvf7xpump", 1000).

Expected Output:

Sell successful for 1000 tokens of FC988ZAKRPc26wefDAxcYWB8kgbJTH4Tg3qDvf7xpump
Transaction ID: <transaction-id>
Amount: <sol-amount>
Token Price (SOL): <price>

Get Token Price

Prompt:

What is the current price of the token with mint FC988ZAKRPc26wefDAxcYWB8kgbJTH4Tg3qDvf7xpump?

This triggers get_token_price("FC988ZAKRPc26wefDAxcYWB8kgbJTH4Tg3qDvf7xpump").

Expected Output:

The current price of token FC988ZAKRPc26wefDAxcYWB8kgbJTH4Tg3qDvf7xpump is <price> SOL.

Get Pool Data

Prompt:

Show me the pool data for the token with mint FC988ZAKRPc26wefDAxcYWB8kgbJTH4Tg3qDvf7xpump.

This triggers get_pool_data("FC988ZAKRPc26wefDAxcYWB8kgbJTH4Tg3qDvf7xpump").

Expected Output:

PumpPool Data for mint FC988ZAKRPc26wefDAxcYWB8kgbJTH4Tg3qDvf7xpump:
Pool Bump: <bump>
Index: <index>
Creator: <creator-pubkey>
Base Mint: <base-mint>
Quote Mint: <quote-mint>
LP Mint: <lp-mint>
Pool Base Token Account: <base-account>
Pool Quote Token Account: <quote-account>
LP Supply: <supply>

Environment Variables

The server uses the following environment variables, loaded from .env.private:

Variable Description Default Value
HTTPS_RPC_ENDPOINT Solana RPC endpoint URL https://api.mainnet-beta.solana.com
BUY_SLIPPAGE Slippage tolerance for buy transactions 0.3 (30%)
SELL_SLIPPAGE Slippage tolerance for sell transactions 0.1 (10%)
SWAP_PRIORITY_FEE Priority fee for transactions (in lamports) 1500000
PRIVATE_KEY Solana private key for signing transactions None (required)

Ensure PRIVATE_KEY is set, as the server will raise an error if it's missing.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Disclaimer

This software interacts with decentralized finance (DeFi) protocols and handles sensitive data like private keys. Use it at your own risk. Ensure your .env.private file is secure and never share your private key. The authors are not responsible for any financial losses or security issues arising from the use of this software.

Star History

Star History Chart

Repository Owner

kukapay
kukapay

User

Repository Details

Language Python
Default Branch main
Size 14 KB
Contributors 1
License MIT License
MCP Verified Nov 12, 2025

Programming Languages

Python
100%

Tags

Join Our Newsletter

Stay updated with the latest AI tools, news, and offers by subscribing to our weekly newsletter.

We respect your privacy. Unsubscribe at any time.

Related MCPs

Discover similar Model Context Protocol servers

  • Sui Trader MCP

    Sui Trader MCP

    MCP server enabling automated token swaps on the Sui blockchain.

    Sui Trader MCP acts as an MCP server designed for AI agents to conduct optimal token swaps on the Sui blockchain. It integrates with the Cetus Aggregator to execute swaps on the Sui mainnet, utilizing secure Bech32 private key management. The tool supports configuration for MCP-compatible clients, allowing seamless invocation of swap operations. Built with Node.js, it provides a reliable interface between AI-driven applications and blockchain-based token swap functionality.

    • 4
    • MCP
    • kukapay/sui-trader-mcp
  • Uniswap Trader MCP

    Uniswap Trader MCP

    Automate token swaps on Uniswap across multiple blockchains for AI agents.

    Uniswap Trader MCP provides an MCP server interface enabling AI agents to automate token swaps on Uniswap V3 across several EVM-compatible blockchains. It offers real-time price quoting, optimized trade route suggestions, and direct execution of swaps with configurable slippage and deadlines. Multi-chain support allows seamless integration with networks such as Ethereum, Polygon, Arbitrum, and others for robust DeFi trading automation.

    • 34
    • MCP
    • kukapay/uniswap-trader-mcp
  • Uniswap V3 Price MCP Server

    Uniswap V3 Price MCP Server

    Real-time Uniswap V3 token price server for AI agents and DeFi automation.

    Uniswap V3 Price MCP Server delivers real-time token prices from Uniswap V3 across major EVM-compatible networks, including Ethereum, Polygon, Arbitrum, and Optimism. Optimized for AI agents and DeFi automation, it queries token prices in USD or other stablecoins, with optional conversion via CryptoCompare. The server is designed for compatibility with MCP clients, enabling seamless and standardized integrations. Environment setup is straightforward, leveraging Infura endpoints and Node.js.

    • 2
    • MCP
    • kukapay/uniswap-price-mcp
  • Rug-Check-MCP

    Rug-Check-MCP

    Detect risks in Solana meme tokens to prevent rug pulls

    Rug-Check-MCP is an MCP server designed to analyze Solana meme tokens for potential risks, leveraging data from the Solsniffer API. It provides comprehensive token analysis through the 'analysis_token' tool, delivering structured information on risk scores, market data, and security factors. The solution aids AI agents and clients in identifying high-risk or unsafe projects, helping protect users from fraudulent tokens. Installation is streamlined for Smithery and manual Python environments.

    • 15
    • MCP
    • kukapay/rug-check-mcp
  • solscan-mcp

    solscan-mcp

    A Rust-based MCP server for querying Solscan Pro API on Solana blockchain data.

    solscan-mcp provides a Model Context Protocol (MCP) server that interfaces with the Solscan Pro API to deliver blockchain data from the Solana network. Built in Rust, it allows querying of token information, account activities, and transactions, and is designed for easy integration with language models. The tool supports context-driven investigations by leveraging AI to analyze and report on blockchain wallet behaviors using customized context inputs.

    • 32
    • MCP
    • wowinter13/solscan-mcp
  • Raydium LaunchLab MCP

    Raydium LaunchLab MCP

    Enables AI agents to launch, buy, and sell tokens on Raydium Launchpad using MCP.

    Raydium LaunchLab MCP is an MCP-compliant server that lets AI agents mint, buy, and sell bonding-curve tokens on the Raydium Launchpad. It supports seamless token creation with customizable parameters, buying and selling via Solana transactions, and decentralized metadata storage through IPFS integration. Developers can automate LaunchLab interactions by exposing standardized command interfaces for agent-driven workflows.

    • 3
    • MCP
    • kukapay/raydium-launchlab-mcp
  • Didn't find tool you were looking for?

    Be as detailed as possible for better results