by kukapay
An MCP server for executing token swaps on the Solana blockchain using Jupiter's new Ultra API.
jupiter-mcp is an MCP (Multi-Chain Protocol) server designed to facilitate token swaps on the Solana blockchain. It leverages Jupiter's new Ultra API to provide efficient and optimized trading.
To use jupiter-mcp, you need to have Node.js (version 18 or higher), a Solana Wallet with a private key, and access to a Solana RPC endpoint. After cloning the repository and installing dependencies, you configure the server by providing your Solana RPC URL and private key in a client configuration file. The server exposes tools like get-ultra-order
and execute-ultra-order
that can be interacted with to fetch and execute swap orders.
get-ultra-order
and execute-ultra-order
) for programmatic interaction, allowing developers to integrate swap functionalities into their applications.Q: What are the prerequisites for running jupiter-mcp? A: You need Node.js (version 18+), a Solana Wallet private key (base58-encoded), and a Solana RPC endpoint.
Q: How do I get a swap order?
A: You use the get-ultra-order
tool, providing inputMint
, outputMint
, amount
, and slippageBps
as arguments.
Q: How do I execute a swap order?
A: You use the execute-ultra-order
tool, providing the requestId
and transaction
obtained from get-ultra-order
.
Q: What is the license for jupiter-mcp? A: The project is licensed under the MIT License.
An MCP server for executing token swaps on the Solana blockchain using Jupiter's new Ultra API.
fetch
support).https://api.mainnet-beta.solana.com
).Clone the Repository:
git clone https://github.com/kukapay/jupiter-mcp.git
cd jupiter-mcp
Install Dependencies: Ensure you have the MCP Server package installed along with other required dependencies:
npm install
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"
}
}
}
}
get-ultra-order
:
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%).requestId
, transaction
(base64-encoded), inputMint
, outputMint
, inAmount
, outAmount
, price
.execute-ultra-order
:
requestId
: Unique identifier from get-ultra-order
.transaction
: Base64-encoded transaction from get-ultra-order
.status
, transactionId
, slot
, inputAmountResult
, outputAmountResult
, swapEvents
.Below are examples of interacting with the server using natural language prompts and expected responses:
get-ultra-order
inputMint
: "So11111111111111111111111111111111111111112" (SOL)outputMint
: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" (USDC)amount
: "1.23"slippageBps
: 50{
"requestId": "a770110b-82c9-46c8-ba61-09d955b27503",
"transaction": "AQAAAA...base64-encoded-transaction...==",
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"inAmount": "1230000000",
"outAmount": "19950000",
"price": 0.01621951219512195
}
execute-ultra-order
requestId
: "a770110b-82c9-46c8-ba61-09d955b27503"transaction
: "AQAAAA...base64-encoded-transaction...=="{
"status": "Success",
"transactionId": "5x...solana-transaction-signature...",
"slot": 299283763,
"inputAmountResult": "1230000000",
"outputAmountResult": "19950000",
"swapEvents": [
{
"type": "swap",
"inputMint": "So11111111111111111111111111111111111111112",
"outputMint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"inAmount": "1230000000",
"outAmount": "19950000"
}
]
}
This project is licensed under the MIT License. See the LICENSE file for details.
Reviews feature coming soon
Stay tuned for community discussions and feedback