mcp server jupiter
A Model Context Protocol server that enables Claude to perform Solana token swaps through Jupiter's API, including getting quotes, building transactions, and sending swap transactions on the Solana blockchain.
A Model Context Protocol server that enables Claude to perform Solana token swaps through Jupiter's API, including getting quotes, building transactions, and sending swap transactions on the Solana blockchain.
This repository contains a Model Context Protocol (MCP) server that provides Claude with access to Jupiter's swap API. The server enables Claude to perform operations like getting quotes, building swap transactions, and sending swap transactions on the Solana blockchain using Jupiter.
The MCP server exposes several tools to Claude:
jupiter_get_quote
: Get a quote for swapping tokens on Jupiterjupiter_build_swap_transaction
: Build a swap transaction on Jupiterjupiter_send_swap_transaction
: Send a swap transaction on JupiterClone this repository:
git clone https://github.com/dcSpark/mcp-server-jupiter.git
cd mcp-server-jupiter
Install dependencies:
npm ci
Build the project:
npm run build
You can also install the package globally or use it directly with npx:
# Install globally
npm install -g @mcp-dockmaster/mcp-server-jupiter
# Or use directly with npx
npx @mcp-dockmaster/mcp-server-jupiter
To configure Claude Desktop to use this MCP server:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%Claudeclaude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
Add the MCP server configuration:
{
"mcpServers": {
"mcp-server-jupiter": {
"command": "node",
"args": [
"/path/to/your/mcp-server-jupiter/build/index.js"
]
}
}
}
If you've installed the package globally or want to use npx, you can configure it like this:
{
"mcpServers": {
"mcp-server-jupiter": {
"command": "npx",
"args": [
"@mcp-dockmaster/mcp-server-jupiter"
]
}
}
}
# If installed locally
node build/index.js
# If installed globally
mcp-server-jupiter
# Using npx
npx @mcp-dockmaster/mcp-server-jupiter
Once configured, restart Claude Desktop. Claude will now have access to the Jupiter swap tools. You can ask Claude to:
Get a quote for swapping tokens:
What's the quote for swapping 1 SOL to USDC?
Build a swap transaction:
Build a swap transaction for the quote I just got.
Send a swap transaction:
Send the swap transaction I just built.
Claude will use the MCP server to interact with Jupiter's swap API directly.
To add new tools to the MCP server:
src/tools.ts
handlers
object in src/tools.ts
npm run build
MIT
[
{
"description": "Get a quote for swapping tokens on Jupiter",
"inputSchema": {
"properties": {
"amount": {
"type": "string"
},
"asLegacyTransaction": {
"type": "boolean"
},
"excludeDexes": {
"items": {
"type": "string"
},
"type": "array"
},
"inputMint": {
"type": "string"
},
"maxAccounts": {
"type": "number"
},
"onlyDirectRoutes": {
"type": "boolean"
},
"outputMint": {
"type": "string"
},
"platformFeeBps": {
"type": "number"
},
"slippageBps": {
"type": "number"
},
"swapMode": {
"type": "string"
}
},
"required": [
"inputMint",
"outputMint",
"amount"
],
"type": "object"
},
"name": "jupiter_get_quote"
},
{
"description": "Build a swap transaction on Jupiter",
"inputSchema": {
"properties": {
"asLegacyTransaction": {
"type": "boolean"
},
"computeUnitPriceMicroLamports": {
"type": "number"
},
"prioritizationFeeLamports": {
"type": "number"
},
"quoteResponse": {
"type": "string"
},
"userPublicKey": {
"type": "string"
}
},
"required": [
"quoteResponse",
"userPublicKey"
],
"type": "object"
},
"name": "jupiter_build_swap_transaction"
},
{
"description": "Send a swap transaction on Jupiter",
"inputSchema": {
"properties": {
"maxRetries": {
"type": "number"
},
"serializedTransaction": {
"type": "string"
},
"skipPreflight": {
"type": "boolean"
},
"swapTransaction": {
"type": "string"
}
},
"type": "object"
},
"name": "jupiter_send_swap_transaction"
}
]