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. Before installing the extension, ensure you have: 1. Node.js and npx (for envmcp support) - Download from: https://nodejs.org/ - Verify with: npx --version 2. uv/uvx (Python package manager) - Install from: https://docs.astral.sh/uv/gett
Add this skill
npx mdskills install araa47/jupiter-mcpWell-documented Solana swap MCP with clear tool descriptions and setup, but permissions exceed needs
1# Jupiter MCP23A Model Context Protocol server for Jupiter API, Solana's premier DEX aggregator. Supports immediate swaps through Ultra API and limit orders through Trigger API.45## ๐ฆ Pre-built Desktop Extension (DXT)67### Prerequisites8Before installing the extension, ensure you have:9101. **Node.js and npx** (for envmcp support)11 - Download from: https://nodejs.org/12 - Verify with: `npx --version`13142. **uv/uvx** (Python package manager)15 - Install from: https://docs.astral.sh/uv/getting-started/installation/16 - macOS/Linux: `curl -LsSf https://astral.sh/uv/install.sh | sh`17 - Windows: `powershell -c "irm https://astral.sh/uv/install.ps1 | iex"`18 - Verify with: `uvx --version`192021Once you have prereqs for easy installation in Claude Desktop:2223**[Download jupiter-mcp-latest.dxt](https://github.com/araa47/jupiter-mcp/raw/main/jupiter-mcp-latest.dxt)** ๐ฅ2425The DXT includes:26- โ One-click installation in Claude Desktop27- โ Automatic dependency management with uvx28- โ Secure environment variable configuration29- โ Built-in error handling and debugging3031> **Note**: The DXT file is automatically updated on every commit for the latest features and fixes.3233## ๐ Quick Installation Options3435### Option 1: Claude Desktop DXT (Recommended) ๐ฑ๏ธ36Download the DXT file and double-click to install. See `dxt/README.md` for detailed instructions.3738### Option 2: Quick Install with Cursor ๐ฏ3940**Instructions:**411. Copy the link below (click the copy button in the code block)422. Paste it into your browser address bar or Cursor's command palette433. Follow the prompts to complete installation444. You'll be prompted to replace `REPLACE_THIS` with your actual solana private key!454647**๐ Install with Direct Input:**48```49cursor://anysphere.cursor-deeplink/mcp/install?name=jupiter-mcp&config=eyJjb21tYW5kIjoidXZ4IiwiYXJncyI6WyItLWZyb20iLCJnaXQraHR0cHM6Ly9naXRodWIuY29tL2FyYWE0Ny9qdXBpdGVyLW1jcCIsImp1cGl0ZXItbWNwIl0sImVudiI6eyJQUklWQVRFX0tFWSI6IlJFUExBQ0VfVEhJUyIsIlNPTEFOQV9SUENfVVJMIjoiaHR0cHM6Ly9hcGkubWFpbm5ldC1iZXRhLnNvbGFuYS5jb20iLCJTT0xBTkFfTkVUV09SSyI6Im1haW5uZXQtYmV0YSIsIlJFUVVFU1RfVElNRU9VVCI6IjMwIn1950```51**Note:** These links only work in Cursor5253**Manual config for .env file approach:**5455```json56{57 "mcpServers": {58 "jupiter-mcp": {59 "command": "npx",60 "args": [61 "envmcp",62 "--env-file",63 "/path/to/your/.env",64 "uvx",65 "--from",66 "git+https://github.com/araa47/jupiter-mcp",67 "jupiter-mcp"68 ]69 }70 }71}72```7374Replace `/path/to/your/.env` with your actual env file path (e.g., `/Users/yourname/.env`)7576**Pre-configured values:**7778* `SOLANA_RPC_URL`: <https://api.mainnet-beta.solana.com>79* `SOLANA_NETWORK`: mainnet-beta80* `REQUEST_TIMEOUT`: 30 seconds81* `PRIVATE_KEY`: You'll need to replace `REPLACE_THIS` with your base58 encoded private key8283## โก Quick Start (MCP Configuration)8485Add this to your MCP client configuration:8687```json88{89 "mcpServers": {90 "jupiter-mcp": {91 "command": "uvx",92 "args": [93 "--from",94 "git+https://github.com/araa47/jupiter-mcp",95 "jupiter-mcp"96 ],97 "env": {98 "SOLANA_RPC_URL": "https://api.mainnet-beta.solana.com",99 "PRIVATE_KEY": "${PRIVATE_KEY}",100 "SOLANA_NETWORK": "mainnet-beta",101 "REQUEST_TIMEOUT": "30"102 }103 }104 }105}106```107108### Alternative Configuration (Using .env file)109110If you prefer to load environment variables from a `.env` file to avoid storing sensitive data in your MCP configuration:111112```json113{114 "mcpServers": {115 "jupiter-mcp": {116 "command": "npx",117 "args": [118 "envmcp",119 "--env-file",120 "${ENV_FILE_PATH}",121 "uvx",122 "--from",123 "git+https://github.com/araa47/jupiter-mcp",124 "jupiter-mcp"125 ],126 "env": {127 "ENV_FILE_PATH": ".env"128 }129 }130 }131}132```133134This 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`).135136### Environment Variables Required:137138* `PRIVATE_KEY`: Your base58 encoded Solana private key (from Phantom wallet export)139* Optional: Override `SOLANA_RPC_URL` if you have a custom RPC endpoint140141## ๐ Available Tools142143### ๐ฑ Ultra API (Immediate Swaps)144145| Tool | Description | Parameters | Cost |146| -------------------------- | ----------------------------------------- | --------------------------------- | -------- |147| get\_swap\_quote | Get a swap quote and unsigned transaction | input\_mint, output\_mint, amount | **FREE** |148| execute\_swap\_transaction | Execute a signed swap transaction | transaction, request\_id | **PAID** |149| get\_balances | Get token balances for a wallet | wallet\_address? | **FREE** |150| get\_shield | Get token security information | mints | **FREE** |151| search\_token | Search for tokens | query | **FREE** |152153### ๐ Trigger API (Limit Orders)154155| Tool | Description | Parameters | Cost |156| --------------------- | ---------------------------------- | --------------------------------------------------------------------------------------- | -------- |157| create\_limit\_order | Create a limit order transaction | input\_mint, output\_mint, making\_amount, taking\_amount, slippage\_bps?, expired\_at? | **FREE** |158| execute\_limit\_order | Execute a limit order transaction | transaction, request\_id | **PAID** |159| cancel\_limit\_order | Cancel a single limit order | order | **FREE** |160| cancel\_limit\_orders | Cancel multiple limit orders | orders? | **FREE** |161| get\_limit\_orders | Get active/historical limit orders | order\_status, wallet\_address?, input\_mint?, output\_mint?, page? | **FREE** |162163### Key Differences: Swaps vs Limit Orders164165* **Swaps** (Ultra API): Execute immediately at current market price166* **Limit Orders** (Trigger API): Execute automatically when your target price is reached167168## ๐ ๏ธ Development & CI/CD169170### Automated DXT Building171172This project includes automated DXT building integrated with pre-commit hooks:173174- **Pre-commit Hook**: Automatically builds DXT files when changes are made to `dxt/` folder175- **Simple Naming**: Always creates `jupiter-mcp-latest.dxt` for easy downloads176- **Auto-update**: The latest DXT file is always current with the main branch177178### Manual DXT Build179180```bash181# Build DXT182./scripts/build-dxt.sh183184# Output: jupiter-mcp-latest.dxt185```186187### Pre-commit Setup188189```bash190# Install pre-commit hooks (includes DXT building)191pre-commit install192193# The DXT will be automatically built when changes are detected in:194# - dxt/ directory195# - scripts/build-dxt.sh196```197198## ๐ง Alternative Installation (Development)199200For local development or testing:201202### Prerequisites203204* Python 3.12+205* uv for dependency management206* direnv207208### Setup209210```bash211git clone https://github.com/araa47/jupiter-mcp212cd jupiter-mcp213direnv allow214cp .env.example .env215# Edit .env with your configuration216```217218### Environment Variables (.env file)219220```bash221SOLANA_RPC_URL=https://api.mainnet-beta.solana.com222PRIVATE_KEY=your_base58_encoded_private_key_here223SOLANA_NETWORK=mainnet-beta224REQUEST_TIMEOUT=30225```226227### Local Development Usage228229```bash230# Start the server locally231uv run python run_server.py232```233234## ๐งช Testing235236The project includes comprehensive testing with safety features:237238### Test Types239240**๐ Free Tests** (Default - No SOL spent):241242* Mock execution tests243* API quote/balance checks244* Token searches and security checks245* Error handling validation246247**๐ฐ Paid Tests** (Requires `--run-paid-tests` flag):248249* Real trade execution on mainnet250* Swap tests: Uses tiny amounts (0.0001 SOL โ $0.015)251* Limit order tests: Creates orders 20% above market price252 * Uses 0.04 SOL (โ $6) to meet minimum requirements253 * Orders won't execute at the high price254 * Automatically cancelled after verification255* Full transaction signing and broadcasting256257### Running Tests258259```bash260# Safe tests only (default)261uv run pytest tests/ -v262263# Include real trade execution (spends tiny amounts)264uv run pytest tests/ -v --run-paid-tests265266# Test with detailed output267uv run pytest tests/ -v --run-paid-tests -s268```269270### Test Safety Features271272* **Paid tests clearly marked** with `@pytest.mark.paid`273* **Minimal trade amounts** for real execution274* **Limit orders use out-of-range prices** that won't execute275* **Clear warnings** before spending real money276* **Transaction confirmations** with blockchain signatures277278## ๐ก Important Notes279280### Free vs Paid Operations281282* **๐ FREE**: `get_swap_quote`, `get_balances`, `get_shield`, `search_token`, `create_limit_order`, `cancel_limit_order`, `cancel_limit_orders`, `get_limit_orders` - API calls only283* **๐ฐ PAID**: `execute_swap_transaction`, `execute_limit_order` - Executes real trades and spends SOL284285### Automatic Referral System286287* All orders include a 255 basis point (2.55%) referral fee (maximum allowed)288* Referral wallet: `8cK8hCyRQCp52nVuPLnLL71afkRvRcFibSwHMjGFT8bm` ([Referral Dashboard](https://referral.jup.ag/dashboard/8cK8hCyRQCp52nVuPLnLL71afkRvRcFibSwHMjGFT8bm))289* **Note**: Fees only collected for tokens with referral token accounts (currently SOL)290* Supports development and maintenance291292### Security293294* ๐ Private keys never leave your machine295* ๐ก๏ธ All API calls use HTTPS296* โ ๏ธ Never commit `.env` files to version control297298## ๐ Troubleshooting299300### Common Issues3013021. **"PRIVATE\_KEY environment variable is required"**303 * Copy `env.example` to `.env` and set your private key3042. **"Invalid PRIVATE\_KEY format"**305 * Use base58 encoded private key (from Phantom wallet export)3063. **Connection timeouts**307 * Try different RPC URL or increase `REQUEST_TIMEOUT`308309## ๐ Ready to Trade!310311Your Jupiter MCP server is ready for Solana DeFi interactions! ๐312
Full transparency โ inspect the skill content before installing.