Purpose
jupiter-mcp is an MCP (Model Context Protocol) server designed to execute token swaps on the Solana blockchain via Jupiter's new Ultra API. It allows users (or AI agents) to obtain swap orders and execute swaps through natural language instructions or programmatic calls, thereby simplifying the process of conducting token transactions on Solana.
Main capabilities
The server provides two core tools:
-
get-ultra-order: Obtains a swap order from Jupiter's Ultra API. It combines DEX routing and RFQ (request for quote) to provide the optimal price. The input includes the mint address of the input token, the mint address of the output token, the input amount, and slippage tolerance (expressed in basis points). The output is a JSON object containing requestId, the base64-encoded transaction, the input/output mint, the input/output amount, and the price.
-
execute-ultra-order: Requests that Jupiter execute the swap transaction on behalf of the wallet owner, handling slippage, priority fees, and transaction landing. The input includes the requestId obtained from get-ultra-order and the base64-encoded transaction. The output is a JSON object containing the status, transaction ID, slot, input/output amount results, and swap events.
How to use
To use jupiter-mcp, you need to meet the following prerequisites:
- Node.js version 18 or higher (to support native fetch).
- A Solana wallet private key (base58-encoded) for signing transactions.
- Access to a Solana RPC node (for example, https://api.mainnet-beta.solana.com)。
Installation steps:
-
Clone the repository:
git clone https://github.com/kukapay/jupiter-mcp.git cd jupiter-mcp -
Install dependencies:
npm install -
Configure the client (for the specific configuration method, please refer to the repository documentation).
Usage examples (via natural language prompts):
- Get a swap order: a prompt such as "Get a swap order to exchange 1.23 SOL for USDC." The tool will return JSON containing the requestId and the base64 transaction.
- Execute a swap: a prompt such as "Execute the swap order with request ID 'a770110b-82c9-46c8-ba61-09d955b27503' using the provided transaction." The tool will return the execution result.
Applicable scenarios
jupiter-mcp is suitable for scenarios that require automated Solana token swaps, such as:
- AI agents or chatbots integrating Solana swap functionality.
- Developers building automated trading tools or bots.
- Users who need to execute token swaps quickly without wanting to do it manually.
Limitations
- A private key must be provided, which poses a security risk and should be handled carefully.
- Access to a Solana RPC node is required, which may incur fees or be subject to rate limits.
- Only token swaps on the Solana blockchain are supported.
- The project uses the MIT license.
The above information is all based on the provided official text, with no functions or details not mentioned having been added.