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-pumpswap-connector

Facilitate instantaneous SOL-based token exchanges and autonomous trading operations on the Solana ledger via the PumpSwap protocol. Securely govern all blockchain interactions with configurable transaction settings and retrieve comprehensive liquidity pool metadata.

Author

solana-pumpswap-connector logo

kukapay

MIT License

Quick Info

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

Tags

pumpswapsolanakukapaysolana blockchainkukapay pumpswappumpswap manage

Solana PumpSwap Interaction Module

This specialized Management Control Point (MCP) server grants AI entities the capability to interface directly with PumpSwap for on-demand token swapping and automated market participation on the Solana network.

License Language Status

Core Functionality

  • Acquire Assets: Execute purchases of specified tokens using SOL, allowing fine-grained tuning of price impact tolerance (slippage) and transaction priority fees.
  • Liquidate Assets: Perform token divestment back into SOL, subject to user-defined transaction constraints.
  • Price Inquiry: Obtain the current spot valuation of a token expressed in SOL.
  • Liquidity Metrics: Fetch and present detailed structural data pertaining to any given token's liquidity pool.

Prerequisites for Deployment

  • A Python runtime environment, version 3.13 or newer.
  • The uv package manager (installation instructions).
  • Access to a functioning Solana Remote Procedure Call (RPC) endpoint (e.g., https://api.mainnet-beta.solana.com).
  • A provisioned and securely held Solana private signing key.

Setup Procedure

  1. Repository Cloning: bash git clone https://github.com/kukapay/pumpswap-mcp.git cd pumpswap-mcp

  2. Install uv Dependency Manager: If uv is absent, obtain it via the official installer: bash curl -LsSf https://astral.sh/uv/install.sh | sh

  3. Dependency Resolution: Utilize uv to resolve and install necessary packages: bash uv sync

  4. Environment Configuration: Establish a configuration file named .env.private in the root directory, populating it with required secrets and settings: 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_ACTUAL_SOLANA_SECRET_KEY

Substitute the placeholder with your legitimate Solana private key.

Operation Guide

Launching the MCP Service

Execute the primary script using uv to commence listening for commands: bash uv run main.py

The service exposes the following transactional interfaces for agents: - buy_token(mint: str, sol_amount: float, user_private_key: str): Mechanism for purchasing assets with SOL. - sell_token(mint: str, token_amount: float, user_private_key: str): Mechanism for divesting assets back to SOL. - get_token_price(mint: str): Function to retrieve the current SOL-denominated token exchange rate. - get_pool_data(mint: str): Function to query and format the underlying liquidity pool metrics.

Asset Acquisition Example

Input Query:

Execute a purchase equivalent to 0.1 SOL for the asset identified by mint address FC988ZAKRPc26wefDAxcYWB8kgbJTH4Tg3qDvf7xpump.

This maps to the tool invocation: buy_token("FC988ZAKRPc26wefDAxcYWB8kgbJTH4Tg3qDvf7xpump", 0.1).

Anticipated Return:

Purchase completed successfully: 0.1 SOL exchanged for token FC988ZAKRPc26wefDAxcYWB8kgbJTH4Tg3qDvf7xpump Transaction Identifier: Quantity Received: Current SOL Value:

Asset Liquidation Example

Input Query:

Transfer 1000 units of token FC988ZAKRPc26wefDAxcYWB8kgbJTH4Tg3qDvf7xpump back to SOL.

This maps to the tool invocation: sell_token("FC988ZAKRPc26wefDAxcYWB8kgbJTH4Tg3qDvf7xpump", 1000).

Anticipated Return:

Liquidation finalized: 1000 tokens of FC988ZAKRPc26wefDAxcYWB8kgbJTH4Tg3qDvf7xpump converted. Transaction Identifier: SOL Received: Current SOL Value:

Token Valuation Retrieval Example

Input Query:

Ascertain the present market valuation in SOL for the token identified by the mint FC988ZAKRPc26wefDAxcYWB8kgbJTH4Tg3qDvf7xpump.

This triggers get_token_price("FC988ZAKRPc26wefDAxcYWB8kgbJTH4Tg3qDvf7xpump").

Anticipated Return:

The valuation for token FC988ZAKRPc26wefDAxcYWB8kgbJTH4Tg3qDvf7xpump is currently set at SOL units.

Pool Structure Inspection Example

Input Query:

Display the underlying structure and metrics for the liquidity pool associated with mint FC988ZAKRPc26wefDAxcYWB8kgbJTH4Tg3qDvf7xpump.

This triggers get_pool_data("FC988ZAKRPc26wefDAxcYWB8kgbJTH4Tg3qDvf7xpump").

Anticipated Return:

PumpPool Metrics for mint FC988ZAKRPc26wefDAxcYWB8kgbJTH4Tg3qDvf7xpump: Pool Bump Offset: Storage Index: Asset Originator: Base Asset Mint ID: Quote Asset Mint ID: Liquidity Provider Token ID: Base Token Reserve Account: Quote Token Reserve Account: Total LP Supply:

Environment Variables Reference

The service relies on configurations sourced from the .env.private file for operational context:

Parameter Purpose Default Setting
HTTPS_RPC_ENDPOINT Solana Node Communication URL https://api.mainnet-beta.solana.com
BUY_SLIPPAGE Maximum acceptable price deviation for acquisitions 0.3 (30%)
SELL_SLIPPAGE Maximum acceptable price deviation for divestments 0.1 (10%)
SWAP_PRIORITY_FEE Transaction prioritization surcharge (in lamports) 1500000
PRIVATE_KEY Required private key for cryptographic transaction endorsement Absent (Mandatory)

Initialization will fail if the PRIVATE_KEY variable is not correctly populated.

Licensing Information

This software component is distributed under the terms of the MIT License. Consult the LICENSE documentation file for specifics.

Cautionary Note

This utility interfaces directly with decentralized finance mechanisms and necessitates handling of cryptographic secrets. Utilization is undertaken at the user's sole liability. Exercise extreme diligence in safeguarding the .env.private file and under no circumstances disclose your private key. The developers assume zero accountability for any monetary detriment or security compromises resulting from this software's deployment.

See Also

`