JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1
  • Score
    100M100P100Q49676F
  • License ISC

Solana-only Model-Context-Protocol Server with Jupiter swap integration.

Package Exports

  • solana-jupiter-swap
  • solana-jupiter-swap/build/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (solana-jupiter-swap) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Solana Jupiter Swap MCP

A Model-Context-Protocol server for interacting with Solana blockchain, including wallet operations and token swaps using Jupiter aggregator. This server provides simple RPC endpoints for Solana operations, allowing secure interactions through environment variables.

Features

  • Check SOL account balances
  • Get detailed account information
  • Transfer SOL between accounts
  • View SPL token balances
  • Get your wallet address from private key
  • Swap tokens using Jupiter (Best price routing across all Solana DEXs)

Supported Tools

Method Description Parameters
getMyAddress Get your Solana public address and balances from private key none
getBalance Get SOL balance for a Solana address address (string, required)
getAccountInfo Get detailed account info for a Solana address address (string, required), encoding ("base58"
getSplTokenBalances Get SPL token balances for a Solana address address (string, required)
getSwapQuote Get best swap quote from Jupiter DEX aggregator inputMint (string), outputMint (string), amount (string), slippageBps (number, optional)
executeSwap Execute a token swap using Jupiter DEX aggregator inputMint (string), outputMint (string), amount (string), slippageBps (number, optional)
transfer Transfer SOL from your keypair to another address toAddress (string), amount (number, in SOL)

Usage Example

Example: Get My Address

{
  "method": "getMyAddress",
  "params": {}
}

Example: Get Balance

{
  "method": "getBalance",
  "params": { "address": "<SOL_ADDRESS>" }
}

Example: Get SPL Token Balances

{
  "method": "getSplTokenBalances",
  "params": { "address": "<SOL_ADDRESS>" }
}

Example: Get Swap Quote

{
  "method": "getSwapQuote",
  "params": {
    "inputMint": "So11111111111111111111111111111111111111112", // SOL
    "outputMint": "Es9vMFrzaCERa8F1tq8QzZ6pA7r6zG9aG9aG9aG9aG9a", // USDT
    "amount": "1000000", // in lamports (1 SOL = 1_000_000_000 lamports)
    "slippageBps": 50
  }
}

Example: Execute Swap

{
  "method": "executeSwap",
  "params": {
    "inputMint": "So11111111111111111111111111111111111111112",
    "outputMint": "Es9vMFrzaCERa8F1tq8QzZ6pA7r6zG9aG9aG9aG9aG9a",
    "amount": "1000000",
    "slippageBps": 50
  }
}

Example: Transfer SOL

{
  "method": "transfer",
  "params": {
    "toAddress": "<DESTINATION_SOL_ADDRESS>",
    "amount": 0.01
  }
}

Environment Variables (JSON Example)

{
  "SOLANA_RPC_URL": "https://api.mainnet-beta.solana.com",
  "SOLANA_PRIVATE_KEY": "your-base58-encoded-solana-private-key"
}

Integration Example (claude_desktop_config.json)

{
  "mcpServers": {
    "solana-jupiter-swap": {
      "command": "node",
      "args": [
        "/PATH/TO/solana-jupiter-swap/build/index.js"
      ],
      "env": {
        "SOLANA_RPC_URL": "https://api.mainnet-beta.solana.com",
        "SOLANA_PRIVATE_KEY": "your-base58-encoded-solana-private-key"
      },
      "transportType": "stdio"
    }
  }
}

Setup

  1. Clone and install dependencies: