Skip to main content
Glama

Jupiter MCP

A Model Context Protocol server for Jupiter API, Solana's premier DEX aggregator. Supports immediate swaps through Ultra API and limit orders through Trigger API.

๐Ÿ“ฆ Pre-built Desktop Extension (DXT)

Prerequisites

Before installing the extension, ensure you have:

  1. Node.js and npx (for envmcp support)

  2. uv/uvx (Python package manager)

Once you have prereqs for easy installation in Claude Desktop:

Download jupiter-mcp-latest.dxt ๐Ÿ“ฅ

The DXT includes:

  • โœ… One-click installation in Claude Desktop

  • โœ… Automatic dependency management with uvx

  • โœ… Secure environment variable configuration

  • โœ… Built-in error handling and debugging

Note: The DXT file is automatically updated on every commit for the latest features and fixes.

Related MCP server: jupiter-mcp

๐Ÿš€ Quick Installation Options

Download the DXT file and double-click to install. See dxt/README.md for detailed instructions.

Option 2: Quick Install with Cursor ๐ŸŽฏ

Instructions:

  1. Copy the link below (click the copy button in the code block)

  2. Paste it into your browser address bar or Cursor's command palette

  3. Follow the prompts to complete installation

  4. You'll be prompted to replace REPLACE_THIS with your actual solana private key!

๐Ÿš€ Install with Direct Input:

cursor://anysphere.cursor-deeplink/mcp/install?name=jupiter-mcp&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyItLWZyb20iLCJnaXQraHR0cHM6Ly9naXRodWIuY29tL2FyYWE0Ny9qdXBpdGVyLW1jcCIsImp1cGl0ZXItbWNwIl0sImVudiI6eyJQUklWQVRFX0tFWSI6IlJFUExBQ0VfVEhJUyIsIlNPTEFOQV9SUENfVVJMIjoiaHR0cHM6Ly9hcGkubWFpbm5ldC1iZXRhLnNvbGFuYS5jb20iLCJTT0xBTkFfTkVUV09SSyI6Im1haW5uZXQtYmV0YSIsIlJFUVVFU1RfVElNRU9VVCI6IjMwIn19

Note: These links only work in Cursor

Manual config for .env file approach:

{
  "mcpServers": {
    "jupiter-mcp": {
      "command": "npx",
      "args": [
        "envmcp",
        "--env-file",
        "/path/to/your/.env",
        "uvx",
        "--from",
        "git+https://github.com/araa47/jupiter-mcp",
        "jupiter-mcp"
      ]
    }
  }
}

Replace /path/to/your/.env with your actual env file path (e.g., /Users/yourname/.env)

Pre-configured values:

  • SOLANA_RPC_URL: https://api.mainnet-beta.solana.com

  • SOLANA_NETWORK: mainnet-beta

  • REQUEST_TIMEOUT: 30 seconds

  • PRIVATE_KEY: You'll need to replace REPLACE_THIS with your base58 encoded private key

โšก Quick Start (MCP Configuration)

Add this to your MCP client configuration:

{
  "mcpServers": {
    "jupiter-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/araa47/jupiter-mcp",
        "jupiter-mcp"
      ],
      "env": {
        "SOLANA_RPC_URL": "https://api.mainnet-beta.solana.com",
        "PRIVATE_KEY": "${PRIVATE_KEY}",
        "SOLANA_NETWORK": "mainnet-beta",
        "REQUEST_TIMEOUT": "30"
      }
    }
  }
}

Alternative Configuration (Using .env file)

If you prefer to load environment variables from a .env file to avoid storing sensitive data in your MCP configuration:

{
  "mcpServers": {
    "jupiter-mcp": {
      "command": "npx",
      "args": [
        "envmcp",
        "--env-file",
        "${ENV_FILE_PATH}",
        "uvx",
        "--from",
        "git+https://github.com/araa47/jupiter-mcp",
        "jupiter-mcp"
      ],
      "env": {
        "ENV_FILE_PATH": ".env"
      }
    }
  }
}

This approach uses envmcp to securely load your PRIVATE_KEY from a .env file without exposing it in configuration files. Replace ENV_FILE_PATH with the absolute path to your .env file (e.g., /Users/yourname/.env or /home/user/.env).

Environment Variables Required:

  • PRIVATE_KEY: Your base58 encoded Solana private key (from Phantom wallet export)

  • Optional: Override SOLANA_RPC_URL if you have a custom RPC endpoint

๐ŸŽ‰ Available Tools

๐Ÿ’ฑ Ultra API (Immediate Swaps)

Tool

Description

Parameters

Cost

get_swap_quote

Get a swap quote and unsigned transaction

input_mint, output_mint, amount

FREE

execute_swap_transaction

Execute a signed swap transaction

transaction, request_id

PAID

get_balances

Get token balances for a wallet

wallet_address?

FREE

get_shield

Get token security information

mints

FREE

search_token

Search for tokens

query

FREE

๐Ÿ“Š Trigger API (Limit Orders)

Tool

Description

Parameters

Cost

create_limit_order

Create a limit order transaction

input_mint, output_mint, making_amount, taking_amount, slippage_bps?, expired_at?

FREE

execute_limit_order

Execute a limit order transaction

transaction, request_id

PAID

cancel_limit_order

Cancel a single limit order

order

FREE

cancel_limit_orders

Cancel multiple limit orders

orders?

FREE

get_limit_orders

Get active/historical limit orders

order_status, wallet_address?, input_mint?, output_mint?, page?

FREE

Key Differences: Swaps vs Limit Orders

  • Swaps (Ultra API): Execute immediately at current market price

  • Limit Orders (Trigger API): Execute automatically when your target price is reached

๐Ÿ› ๏ธ Development & CI/CD

Automated DXT Building

This project includes automated DXT building integrated with pre-commit hooks:

  • Pre-commit Hook: Automatically builds DXT files when changes are made to dxt/ folder

  • Simple Naming: Always creates jupiter-mcp-latest.dxt for easy downloads

  • Auto-update: The latest DXT file is always current with the main branch

Manual DXT Build

# Build DXT
./scripts/build-dxt.sh

# Output: jupiter-mcp-latest.dxt

Pre-commit Setup

# Install pre-commit hooks (includes DXT building)
pre-commit install

# The DXT will be automatically built when changes are detected in:
# - dxt/ directory
# - scripts/build-dxt.sh

๐Ÿ”ง Alternative Installation (Development)

For local development or testing:

Prerequisites

  • Python 3.12+

  • uv for dependency management

  • direnv

Setup

git clone https://github.com/araa47/jupiter-mcp
cd jupiter-mcp
direnv allow
cp .env.example .env
# Edit .env with your configuration

Environment Variables (.env file)

SOLANA_RPC_URL=https://api.mainnet-beta.solana.com
PRIVATE_KEY=your_base58_encoded_private_key_here
SOLANA_NETWORK=mainnet-beta
REQUEST_TIMEOUT=30

Local Development Usage

# Start the server locally
uv run python run_server.py

๐Ÿงช Testing

The project includes comprehensive testing with safety features:

Test Types

๐Ÿ†“ Free Tests (Default - No SOL spent):

  • Mock execution tests

  • API quote/balance checks

  • Token searches and security checks

  • Error handling validation

๐Ÿ’ฐ Paid Tests (Requires --run-paid-tests flag):

  • Real trade execution on mainnet

  • Swap tests: Uses tiny amounts (0.0001 SOL โ‰ˆ $0.015)

  • Limit order tests: Creates orders 20% above market price

    • Uses 0.04 SOL (โ‰ˆ $6) to meet minimum requirements

    • Orders won't execute at the high price

    • Automatically cancelled after verification

  • Full transaction signing and broadcasting

Running Tests

# Safe tests only (default)
uv run pytest tests/ -v

# Include real trade execution (spends tiny amounts)
uv run pytest tests/ -v --run-paid-tests

# Test with detailed output
uv run pytest tests/ -v --run-paid-tests -s

Test Safety Features

  • Paid tests clearly marked with @pytest.mark.paid

  • Minimal trade amounts for real execution

  • Limit orders use out-of-range prices that won't execute

  • Clear warnings before spending real money

  • Transaction confirmations with blockchain signatures

๐Ÿ’ก Important Notes

Free vs Paid Operations

  • ๐Ÿ†“ FREE: get_swap_quote, get_balances, get_shield, search_token, create_limit_order, cancel_limit_order, cancel_limit_orders, get_limit_orders - API calls only

  • ๐Ÿ’ฐ PAID: execute_swap_transaction, execute_limit_order - Executes real trades and spends SOL

Automatic Referral System

  • All orders include a 255 basis point (2.55%) referral fee (maximum allowed)

  • Referral wallet: 8cK8hCyRQCp52nVuPLnLL71afkRvRcFibSwHMjGFT8bm (Referral Dashboard)

  • Note: Fees only collected for tokens with referral token accounts (currently SOL)

  • Supports development and maintenance

Security

  • ๐Ÿ” Private keys never leave your machine

  • ๐Ÿ›ก๏ธ All API calls use HTTPS

  • โš ๏ธ Never commit .env files to version control

๐Ÿ› Troubleshooting

Common Issues

  1. "PRIVATE_KEY environment variable is required"

    • Copy env.example to .env and set your private key

  2. "Invalid PRIVATE_KEY format"

    • Use base58 encoded private key (from Phantom wallet export)

  3. Connection timeouts

    • Try different RPC URL or increase REQUEST_TIMEOUT

๐ŸŽ‰ Ready to Trade!

Your Jupiter MCP server is ready for Solana DeFi interactions! ๐Ÿš€

Available Tools

10 tools
cancel_limit_orderA

Cancel a single active limit order.

This function is FREE to call and does not execute any transactions. It returns an unsigned transaction that must be signed and executed.

Args: order: Order account address to cancel

Returns: Dictionary containing: - success: Boolean indicating if the request was successful - data: Contains 'transaction' (unsigned) and 'requestId' - error: Error message if request failed

Note: - Returns unsigned transaction that needs to be executed - Uses configured wallet as maker

Example: >>> # Cancel a specific order >>> result = await api.cancel_limit_order( ... order="your_order_account_address_here" ... ) >>> if result["success"]: ... # Execute the cancellation ... exec_result = await api.execute_limit_order( ... transaction=result["data"]["transaction"], ... request_id=result["data"]["requestId"] ... )

Inputs: order (required). Returns: object

cancel_limit_ordersA

Cancel multiple limit orders (batched in groups of 5).

This function is FREE to call and does not execute any transactions. It returns unsigned transactions that must be signed and executed.

Args: orders: Array of order account addresses. If None/empty, cancels ALL orders

Returns: Dictionary containing: - success: Boolean indicating if the request was successful - data: Contains 'transactions' (array of unsigned) and 'requestId' - error: Error message if request failed

Note: - Returns multiple transactions if >5 orders - Each transaction needs to be signed and executed separately - Uses configured wallet as maker

Example: >>> # Cancel specific orders >>> result = await api.cancel_limit_orders( ... orders=["order1_address", "order2_address", "order3_address"] ... ) >>> >>> # Cancel ALL orders >>> result = await api.cancel_limit_orders() >>> if result["success"]: ... # Execute each cancellation transaction ... for tx in result["data"]["transactions"]: ... exec_result = await api.execute_limit_order( ... transaction=tx, ... request_id=result["data"]["requestId"] ... )

Inputs: orders. Returns: object

create_limit_orderA

Create a limit order that executes when target price is reached.

This function is FREE to call and does not execute any transactions. It returns an unsigned transaction that must be signed and executed.

โš ๏ธ IMPORTANT WARNINGS:

  1. MINIMUM ORDER SIZE: Jupiter frontend enforces $5 USD minimum to ensure keeper profitability. Programmatically, smaller orders are accepted but may never execute!

  2. PRICE VALIDATION: The program does NOT check if your price makes sense!

    • Buying above market price? Order executes immediately at a LOSS

    • Setting wrong rate (e.g., 1000 USDC for 1 SOL)? You LOSE the difference!

    • Jupiter frontend warns/blocks orders >5% above market - API does NOT!

  3. TRANSFER TAX: Tokens with transfer tax extensions are disabled on frontend but API will accept them - be careful!

  4. SLIPPAGE: By default, trigger orders execute with 0 slippage (exact price). Add slippage for better fill probability but at worse price.

Args: input_mint: Input token mint address (token to sell) output_mint: Output token mint address (token to buy) making_amount: Amount of input token to sell in smallest unit taking_amount: Amount of output token to receive in smallest unit (sets the price) slippage_bps: Slippage in basis points (0 = exact price, >0 = accept worse price) expired_at: Unix timestamp when order expires (optional)

Returns: Dictionary containing: - success: Boolean indicating if the request was successful - data: Contains 'order' (account address), 'transaction' (unsigned), and 'requestId' - error: Error message if request failed

Note: - Uses configured wallet as maker/payer - Includes automatic referral (2.55%) - Order executes when market price reaches your target

Example: >>> # SAFE: Create limit order to sell 0.1 SOL when price reaches $200 >>> # Current market: 1 SOL = $180, so this waits for price to rise >>> result = await api.create_limit_order( ... input_mint="So11111111111111111111111111111111111111112", # SOL ... output_mint="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", # USDC ... making_amount="100000000", # 0.1 SOL (9 decimals) ... taking_amount="20000000", # 20 USDC (6 decimals) = $200/SOL rate ... slippage_bps=50 # 0.5% slippage for better fills ... ) >>> >>> # DANGEROUS: Wrong price - selling 1 SOL for only 1 USDC! >>> # This executes immediately and you LOSE ~$179! >>> # DON'T DO THIS: >>> # result = await api.create_limit_order( >>> # input_mint="So11...112", >>> # output_mint="EPj...t1v", >>> # making_amount="1000000000", # 1 SOL >>> # taking_amount="1000000" # 1 USDC - HUGE LOSS! >>> # )

Inputs: input_mint (required), output_mint (required), making_amount (required), taking_amount (required), +2 more. Returns: object

execute_limit_orderA

๐Ÿšจ WARNING: THIS WILL CREATE A REAL LIMIT ORDER ON-CHAIN! ๐Ÿšจ

Sign and execute a limit order transaction.

This is a PAID operation that creates a limit order on the Solana blockchain. The order will execute automatically when market conditions are met.

Args: transaction: Base64 encoded unsigned transaction from create_limit_order request_id: Request ID from create_limit_order response

Returns: Dictionary containing: - success: Boolean indicating if the execution was successful - data: Contains 'signature' and status if successful - error: Error message if execution failed

Note: - This creates a limit order that may execute later - Orders have fees: 0.03% (stable pairs) or 0.1% (other pairs) - Plus automatic referral fees (2.55%) - Minimum order size is $5 USD

Example: >>> # First create the order >>> order = await api.create_limit_order(...) >>> if order["success"]: ... # Then execute it ... result = await api.execute_limit_order( ... transaction=order["data"]["transaction"], ... request_id=order["data"]["requestId"] ... ) ... if result["success"]: ... print(f"Limit order created! Signature: {result['data']['signature']}")

Inputs: request_id (required), transaction (required). Returns: object

execute_swap_transactionA

๐Ÿšจ WARNING: THIS WILL EXECUTE A REAL TRADE AND SPEND ACTUAL SOL! ๐Ÿšจ

Sign and execute a swap transaction via Jupiter Ultra API.

This is a PAID operation that executes real trades on the Solana blockchain. Only call this function when you want to actually execute a trade.

This method will:

  1. Sign the provided unsigned transaction with your configured private key

  2. Execute the signed transaction on the Solana blockchain

  3. SPEND REAL SOL/TOKENS - THIS IS NOT REVERSIBLE!

Args: transaction: The base64 encoded UNSIGNED transaction from get_swap_quote request_id: The request ID from the swap quote response

Returns: Dictionary containing: - success: Boolean indicating if the execution was successful - data: Contains 'signature' and transaction details if successful - error: Error message if execution failed

Example: >>> # First get a quote >>> quote = await api.get_swap_quote(input_mint, output_mint, amount) >>> if quote["success"]: ... # Then execute the trade ... result = await api.execute_swap_transaction( ... transaction=quote["data"]["transaction"], ... request_id=quote["data"]["requestId"] ... ) ... if result["success"]: ... print(f"Trade executed! Signature: {result['data']['signature']}")

Inputs: request_id (required), transaction (required). Returns: object

get_balancesA

Get token balances for a wallet address via Jupiter Ultra API.

This function is FREE to call and does not execute any transactions. Use this to check wallet holdings before making trades.

Args: wallet_address: The wallet address to get balances for (optional, will use configured wallet if not provided)

Returns: Dictionary containing: - success: Boolean indicating if the request was successful - wallet_address: The wallet address that was queried - data: Array of token balances with mint addresses, amounts, and decimals - error: Error message if request failed

Example: >>> # Get balances for configured wallet >>> result = await api.get_balances() >>> if result["success"]: ... balances = result["data"] ... for balance in balances: ... print(f"Token: {balance['mint']}, Amount: {balance['amount']}") >>> >>> # Get balances for specific wallet >>> result = await api.get_balances(wallet_address="11111111111111111111111111111112")

Inputs: wallet_address. Returns: object

get_limit_ordersA

Get active or historical limit orders for a wallet.

This function is FREE to call and does not execute any transactions.

Args: order_status: "active" or "history" (default: "active") wallet_address: Wallet to check (optional, defaults to configured wallet) input_mint: Filter by input token (optional) output_mint: Filter by output token (optional) page: Page number for pagination, 10 orders per page (optional)

Returns: Dictionary containing: - success: Boolean indicating if the request was successful - wallet_address: The wallet address that was queried - data: Array of order objects with details - hasMoreData: Boolean indicating if there are more pages - error: Error message if request failed

Example: >>> # Get active orders for configured wallet >>> result = await api.get_limit_orders(order_status="active") >>> if result["success"]: ... for order in result["data"]: ... print(f"Order {order['orderAccount']}: {order['makingAmount']} โ†’ {order['takingAmount']}") >>> >>> # Get order history with pagination >>> result = await api.get_limit_orders(order_status="history", page=1)

Inputs: page, input_mint, output_mint, order_status, +1 more. Returns: object

get_shieldA
    Get token security information via Jupiter Ultra Shield API.

    This function is FREE to call and does not execute any transactions.
    Use this to check token security before making trades. Essential for avoiding scam tokens.

    IMPORTANT: You can check MULTIPLE tokens in a single request by comma-separating mints!
    This is much more efficient than making multiple individual requests.

    Args:
        mints: Comma-separated list of token mint addresses to check
               Example: "mint1,mint2,mint3" (no spaces between commas)
               No specific limit mentioned in API docs

    Returns:
        Dictionary containing:
        - success: Boolean indicating if the request was successful
        - data: A "warnings" object with mint addresses as keys, each containing an array of warnings
        - error: Error message if request failed

    Warning Types and Severities:
        Info level warnings:
        - NOT_VERIFIED: Token is not verified, double-check mint address
        - LOW_ORGANIC_ACTIVITY: Token has low organic trading activity
        - NEW_LISTING: Token is newly listed
        - HAS_MINT_AUTHORITY: Owner can mint more tokens (dilution risk)

        Warning level warnings:
        - HAS_FREEZE_AUTHORITY: Owner can freeze your tokens (high risk!)
        - Transfer tax tokens are disabled on Jupiter frontend

    Example:
        >>> # Check security for multiple tokens at once
        >>> mints = "So11111111111111111111111111111111111111112,EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v,someTokenMint"
        >>> result = await api.get_shield(mints=mints)
        >>> if result["success"]:
        ...     warnings = result["data"]["warnings"]
        ...     for mint, mint_warnings in warnings.items():
        ...         if mint_warnings:
        ...             print(f"

โš ๏ธ Warnings for {mint}:") ... for warning in mint_warnings: ... severity_icon = "๐Ÿ”ด" if warning["severity"] == "warning" else "๐ŸŸก" ... print(f" {severity_icon} {warning['type']}: {warning['message']}") ... else: ... print(f"โœ… {mint}: No warnings found")

Inputs: mints (required). Returns: object

get_swap_quoteA

Get a swap quote and unsigned transaction from Jupiter Ultra API.

This function is FREE to call and does not execute any transactions. Use this to get price quotes and prepare transactions for execution.

Args: input_mint: The input token mint address (e.g., SOL: "So11111111111111111111111111111111111111112") output_mint: The output token mint address (e.g., USDC: "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v") amount: The amount of input token to swap in smallest unit (e.g., "1000000" = 0.001 SOL)

Returns: Dictionary containing: - success: Boolean indicating if the request was successful - data: Contains 'transaction' (unsigned) and 'requestId' for execution - error: Error message if request failed

Example: >>> result = await api.get_swap_quote( ... input_mint="So11111111111111111111111111111111111111112", # SOL ... output_mint="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", # USDC ... amount="1000000" # 0.001 SOL ... ) >>> if result["success"]: ... transaction = result["data"]["transaction"] ... request_id = result["data"]["requestId"]

Inputs: amount (required), input_mint (required), output_mint (required). Returns: object

search_tokenA

Search for tokens via Jupiter Ultra API.

This function is FREE to call and does not execute any transactions. Use this to find token mint addresses when you only know the symbol or name.

IMPORTANT: You can search for MULTIPLE tokens in a single request by comma-separating queries! This is much more efficient than making multiple individual requests.

Args: query: Search query - can be: - Single token: symbol ("SOL"), name ("Solana"), or mint address - Multiple tokens: comma-separated queries (e.g., "SOL,USDC,RAY") - Limit: Up to 100 mint addresses when searching by address - Response limit: Returns up to 20 tokens per symbol/name search

Returns: Dictionary containing: - success: Boolean indicating if the request was successful - query: The original search query - data: Array of ALL matching tokens from ALL queries combined - error: Error message if request failed

Example: >>> # Search for a single token >>> result = await api.search_token(query="SOL") >>> if result["success"]: ... for token in result["data"]: ... print(f"Symbol: {token['symbol']}, Mint: {token['mint']}") >>> >>> # Search for MULTIPLE tokens at once (RECOMMENDED for efficiency!) >>> result = await api.search_token(query="SOL,USDC,RAY,BONK") >>> if result["success"]: ... # Returns all matching tokens for all queries in one response ... for token in result["data"]: ... print(f"{token['symbol']}: {token['mint']}") >>> >>> # Search by multiple mint addresses >>> mints = "So11111111111111111111111111111111111111112,EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v" >>> result = await api.search_token(query=mints) >>> if result["success"]: ... # Returns detailed info for all specified mints ... for token in result["data"]: ... print(f"{token['symbol']}: ${token.get('usdPrice', 'N/A')}")

Inputs: query (required). Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelogโ€ฆ

    TDQS

    A4.5/5.0

    Scored across 10 tools

    Disambiguation4/5

    Tools are mostly distinct: create, quote, execute, cancel, list, search, balance, and shield have clear boundaries. However, execute_limit_order is also used to execute cancellation transactions (as shown in examples), which creates ambiguity about its role.

    Naming Consistency5/5

    All tools follow a consistent verb_noun snake_case pattern (create_limit_order, get_swap_quote, execute_swap_transaction, cancel_limit_orders). The naming is predictable and clear, with no mixing of conventions.

    Tool Count5/5

    10 tools is well-scoped for a trading/swap server. Each tool covers a core need (quotes, execution, limit order lifecycle, balance, token search, and security checks) without excessive overlap or redundancy.

    Completeness4/5

    The swap and limit order lifecycles are well covered: quote/execute for swaps, create/execute/cancel/list for orders. However, cancellation returns unsigned transactions that must be executed via execute_limit_order, which is a confusing workaround; there is no dedicated execute_cancel tool.

    Related MCP Connectors

    Related MCP Servers