Cover image
Try Now
2025-03-28

使用木星的新Ultra API在Solana区块链上执行令牌交换的MCP服务器。

3 years

Works with Finder

1

Github Watches

2

Github Forks

3

Github Stars

Jupiter MCP Server

An MCP server for executing token swaps on the Solana blockchain using Jupiter's new Ultra API.

License Node.js Status

Features

  • Fetch swap orders from Jupiter's Ultra API, combining DEX routing and RFQ (Request for Quote) for optimal pricing.
  • Execute swaps via Jupiter's Ultra API, handling slippage, priority fees, and transaction landing.

Prerequisites

  • Node.js: Version 18 or higher (for native fetch support).
  • Solana Wallet: A private key (base58-encoded) for signing transactions.
  • RPC Endpoint: Access to a Solana RPC node (e.g., https://api.mainnet-beta.solana.com).

Installation

  1. Clone the Repository:

    git clone https://github.com/your-username/jupiter-mcp.git
    cd jupiter-mcp
    
  2. Install Dependencies: Ensure you have the MCP Server package installed along with other required dependencies:

    npm install
    
  3. Client Configuration:

{
  "mcpServers": {
    "Jupiter-MCP": {
      "command": "node",
      "args": ["path/to/jupiter-mcp/server/index.js"],
      "env": {
        "SOLANA_RPC_URL": "solana rpc url you can access",
        "PRIVATE_KEY": "your private key"
      }
    }
  }
}

Tools

Ultra API Tools

  • get-ultra-order:

    • Description: Fetches a swap order from Jupiter's Ultra API, leveraging both DEX routing and RFQ for optimal pricing.
    • Inputs:
      • inputMint: Input token mint address (e.g., SOL or token pubkey).
      • outputMint: Output token mint address (e.g., USDC or token pubkey).
      • amount: Input amount as a string (e.g., "1.23").
      • slippageBps: Slippage tolerance in basis points (e.g., 50 for 0.5%).
    • Output: JSON with requestId, transaction (base64-encoded), inputMint, outputMint, inAmount, outAmount, price.
  • execute-ultra-order:

    • Description: Requests Jupiter to execute the swap transaction on behalf of the wallet owner, handling slippage, priority fees, and transaction landing.
    • Inputs:
      • requestId: Unique identifier from get-ultra-order.
      • transaction: Base64-encoded transaction from get-ultra-order.
    • Output: JSON with status, transactionId, slot, inputAmountResult, outputAmountResult, swapEvents.

Example Interaction

Below are examples of interacting with the server using natural language prompts and expected responses:

Fetching a Swap Order

  • Prompt: "Get a swap order to trade 1.23 SOL for USDC."
  • Input:
    • Tool: get-ultra-order
    • Arguments:
      • inputMint: "So11111111111111111111111111111111111111112" (SOL)
      • outputMint: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" (USDC)
      • amount: "1.23"
  • Response:
    {
      "requestId": "a770110b-82c9-46c8-ba61-09d955b27503",
      "transaction": "AQAAAA...base64-encoded-transaction...==",
      "inputMint": "So11111111111111111111111111111111111111112",
      "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
      "inAmount": "1230000000",
      "outAmount": "19950000",
      "price": 0.01621951219512195
    }
    

Executing a Swap

  • Prompt: "Execute the swap order with request ID 'a770110b-82c9-46c8-ba61-09d955b27503' using the transaction provided."
  • Input:
    • Tool: execute-ultra-order
    • Arguments:
      • requestId: "a770110b-82c9-46c8-ba61-09d955b27503"
      • transaction: "AQAAAA...base64-encoded-transaction...=="
  • Response:
    {
      "status": "Success",
      "transactionId": "5x...solana-transaction-signature...",
      "slot": 299283763,
      "inputAmountResult": "1230000000",
      "outputAmountResult": "19950000",
      "swapEvents": [
        {
          "type": "swap",
          "inputMint": "So11111111111111111111111111111111111111112",
          "outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
          "inAmount": "1230000000",
          "outAmount": "19950000"
        }
      ]
    }
    

License

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

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Yasir Eryilmaz
  • AI scriptwriting assistant for short, engaging video content.

  • J. DE HARO OLLE
  • Especialista en juegos de palabras en varios idiomas.

  • Daren White
  • A supportive coach for mastering all Spanish tenses.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • albert tan
  • Japanese education, creating tailored learning experiences.

  • momi
  • Provides initial medical assessments and advice.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

  • zhaoyunxing92
  • MCP(消息连接器协议)服务

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

    Reviews

    1 (1)
    Avatar
    user_hLjJGKaS
    2025-04-15

    As a dedicated user of OpenSCAD MCP Server, I am thoroughly impressed with its seamless performance and robustness. This server, developed by MCP-Mirror, has become an indispensable tool in my 3D modeling workflow. It integrates effortlessly, ensuring smooth and efficient operations. Highly recommended for anyone who values reliability and efficiency in their 3D design process!