-
Notifications
You must be signed in to change notification settings - Fork 2
docs: [ai] add Jupiter Trading MCP page #925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
0xYankee-Raccoons
wants to merge
8
commits into
main
Choose a base branch
from
feat/ai-trading-mcp
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
7005944
docs: [ai] add Jupiter Trading MCP page
0xYankee-Raccoons cedde6b
docs: [ai] re-verify MCP findings, add portal-URL flag
0xYankee-Raccoons ef671dc
docs: [ai] add MCP auth-header nit (F4) to findings
0xYankee-Raccoons e6fee1f
docs: [ai] add live e2e verification section to MCP findings
0xYankee-Raccoons 08399e0
docs: [ai] mark happy-path e2e verified in MCP findings
0xYankee-Raccoons d31affe
docs: [ai] add client-level (Claude Code) e2e to MCP findings
0xYankee-Raccoons 22e44e1
docs: [ai] add read-sweep + real write-path e2e to MCP findings
0xYankee-Raccoons 5e29988
docs: [ai] address PR review — 75 tools/11 domains, key optional, tri…
0xYankee-Raccoons File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,171 @@ | ||
| --- | ||
| title: "Jupiter Trading MCP" | ||
| sidebarTitle: "Trading MCP" | ||
| description: "Execute Jupiter trades and DeFi operations from any MCP client." | ||
| llmsDescription: "Jupiter's hosted Trading MCP server at https://mcp.jup.ag gives AI agents access to Jupiter's trading infrastructure through the Model Context Protocol. It exposes 75 tools across 11 domains: Swap (quote, execute), Tokens (search, discovery, verification), Price, Trigger (limit orders, v2 vault flow), Recurring (DCA), Lend (earn yield), Prediction (prediction markets), Portfolio (positions, staked JUP), Send (invite-based transfers), Studio (token launch pools), and Transaction (land signed transactions). An API key is optional: requests without one work at a lower rate limit, and passing your Jupiter API key from the Developer Platform as a Bearer token raises the limit. Transport is HTTP (Streamable HTTP). Covers setup for Claude Desktop, Claude Code, Cursor, and Windsurf, plus example prompts. This is the read-write operations server, distinct from the read-only Documentation MCP." | ||
| --- | ||
|
|
||
| The Jupiter Trading MCP is a hosted [Model Context Protocol](https://modelcontextprotocol.io/) server that lets AI agents trade and run DeFi operations on Jupiter. Connect any MCP client to `https://mcp.jup.ag` and your agent can swap tokens, place orders, lend, and read on-chain positions. An API key is optional and only raises your rate limit. | ||
|
|
||
| <Note> | ||
| This server executes operations. For an AI assistant that searches and reads Jupiter's documentation instead, see the read-only [Documentation MCP](/ai/mcp). | ||
| </Note> | ||
|
|
||
| ## What You Can Do | ||
|
|
||
| The server exposes **75 tools across 11 domains**. Your MCP client discovers them automatically once connected. | ||
|
|
||
| | Domain | What it does | | ||
| |:-------|:-------------| | ||
| | **Swap** | Get a quote and a ready-to-sign transaction, then execute the swap with managed landing. | | ||
| | **Tokens** | Search tokens by name, symbol, or mint, list by tag, category, or recent listings, and run token verification. | | ||
| | **Price** | Fetch real-time USD prices, liquidity, and 24h change for one or more tokens. | | ||
| | **Trigger** | Create, update, cancel, and list limit orders that execute when a token hits a target price. | | ||
| | **Recurring** | Set up and manage dollar-cost averaging (DCA) orders that buy at regular intervals. | | ||
| | **Lend** | Deposit into and withdraw from Jupiter Lend to earn yield, and read your lending positions. | | ||
| | **Prediction** | Browse prediction market events, place and close bets, claim payouts, and read scores and forecasts. | | ||
| | **Portfolio** | Read a wallet's positions across Solana protocols and its staked JUP. | | ||
| | **Send** | Send tokens via Jupiter Send invites, claw back unclaimed invites, and list invite history. | | ||
| | **Studio** | Create Jupiter Studio token-launch (Dynamic Bonding Curve) pools and claim creator fees. | | ||
| | **Transaction** | Land any signed Solana transaction on-chain through Jupiter's Beam landing infrastructure. | | ||
|
|
||
| ## API Key (Optional) | ||
|
|
||
| The server works without an API key at a lower rate limit, which is enough to try it out. For higher rate limits, create a key in the [Developer Platform](https://developers.jup.ag/portal) and pass it as a Bearer token (shown in the setup below). The server forwards the key to Jupiter's API on your behalf and never stores it, so you use your own rate limits and permissions. | ||
|
|
||
| ## Connect Your Client | ||
|
|
||
| Add the server to your MCP client's configuration. To use a higher rate limit, pass your Jupiter API key as a Bearer token in the `Authorization` header and replace `YOUR_JUPITER_API_KEY` with your key. To start without a key, drop the `headers` block entirely. | ||
|
|
||
| <Tabs> | ||
| <Tab title="Claude Desktop"> | ||
| Open **Settings > Developer > Edit Config** and add: | ||
|
|
||
| ```json | ||
| { | ||
| "mcpServers": { | ||
| "jupiter": { | ||
| "type": "http", | ||
| "url": "https://mcp.jup.ag", | ||
| "headers": { | ||
| "Authorization": "Bearer YOUR_JUPITER_API_KEY" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| Restart Claude Desktop to load the server. | ||
| </Tab> | ||
|
|
||
| <Tab title="Claude Code"> | ||
| Add the server from your terminal: | ||
|
|
||
| ```bash | ||
| claude mcp add --transport http jupiter https://mcp.jup.ag --header "Authorization: Bearer YOUR_JUPITER_API_KEY" | ||
| ``` | ||
|
|
||
| Or add it manually to `.claude/settings.json`: | ||
|
|
||
| ```json | ||
| { | ||
| "mcpServers": { | ||
| "jupiter": { | ||
| "type": "http", | ||
| "url": "https://mcp.jup.ag", | ||
| "headers": { | ||
| "Authorization": "Bearer YOUR_JUPITER_API_KEY" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| Verify with: | ||
|
|
||
| ```bash | ||
| claude mcp list | ||
| ``` | ||
| </Tab> | ||
|
|
||
| <Tab title="Cursor"> | ||
| Open **Settings > MCP** and add a new server, or edit `.cursor/mcp.json`: | ||
|
|
||
| ```json | ||
| { | ||
| "mcpServers": { | ||
| "jupiter": { | ||
| "url": "https://mcp.jup.ag", | ||
| "headers": { | ||
| "Authorization": "Bearer YOUR_JUPITER_API_KEY" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| Save and reload Cursor. | ||
| </Tab> | ||
|
|
||
| <Tab title="Windsurf"> | ||
| Open **Settings > MCP** and add a new server, or edit `~/.codeium/windsurf/mcp_config.json`: | ||
|
|
||
| ```json | ||
| { | ||
| "mcpServers": { | ||
| "jupiter": { | ||
| "serverUrl": "https://mcp.jup.ag", | ||
| "headers": { | ||
| "Authorization": "Bearer YOUR_JUPITER_API_KEY" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
|
||
| Save and restart Windsurf. | ||
| </Tab> | ||
| </Tabs> | ||
|
|
||
| ### Other MCP-Compatible Tools | ||
|
|
||
| Any tool that supports the MCP protocol can connect to `https://mcp.jup.ag` over HTTP transport. Add a Jupiter API key in the `Authorization: Bearer` header for a higher rate limit, or connect without one. | ||
|
|
||
| ## Authentication | ||
|
|
||
| Authentication is optional and stateless. When you send a key, each request carries it as a Bearer token and the server stores nothing. | ||
|
|
||
| - No key: requests work at a lower rate limit. Omit the `Authorization` header. | ||
| - With a key: pass `Authorization: Bearer YOUR_JUPITER_API_KEY` for a higher rate limit. | ||
| - A `401 Unauthorized` response means the key you sent is invalid, not that a key is missing. | ||
| - The MCP endpoint is `https://mcp.jup.ag`. A separate `GET /health` endpoint needs no auth. | ||
|
|
||
| ## Example Prompts | ||
|
|
||
| Once connected, ask your AI assistant in plain language. Each prompt maps to one or more tools. | ||
|
|
||
| | Prompt | Tools used | | ||
| |:-------|:-----------| | ||
| | "What is the current price of SOL and JUP?" | `price_get` | | ||
| | "Swap 10 USDC for SOL" | `swap_get_order`, then `swap_execute_order` | | ||
| | "Place a limit order to sell 50 USDC for SOL at a target price." | `trigger_get_challenge` → `trigger_verify_challenge` → `trigger_build_deposit` → `trigger_create_order` | | ||
| | "DCA 100 USDC into SOL daily for 10 days." | `recurring_build_order` | | ||
| | "What tokens can I lend on Jupiter and what APY do they offer?" | `lend_list_tokens` | | ||
| | "Are there any prediction markets about Bitcoin?" | `prediction_search_events` | | ||
|
|
||
| Trading prompts that move funds return an unsigned transaction. Your client signs it with your wallet and submits it, so you stay in control of every transaction. | ||
|
|
||
| <Tip> | ||
| If a tool call returns `401 Unauthorized`, the Jupiter API key you passed is invalid. Remove the `Authorization` header to run keyless at the lower rate limit, or replace it with a valid key from the [Developer Platform](https://developers.jup.ag/portal). | ||
| </Tip> | ||
|
|
||
| ## Resources | ||
|
|
||
| <CardGroup cols={2}> | ||
| <Card title="Developer Platform" icon="key" href="https://developers.jup.ag/portal"> | ||
| Create an optional Jupiter API key for a higher rate limit. | ||
| </Card> | ||
| <Card title="Documentation MCP" icon="plug" href="/ai/mcp"> | ||
| The read-only server for searching and querying Jupiter docs. | ||
| </Card> | ||
| </CardGroup> | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -591,6 +591,7 @@ | |
| "ai/llms-txt", | ||
| "ai/skills", | ||
| "ai/mcp", | ||
| "ai/trading-mcp", | ||
| "ai/cli" | ||
| ] | ||
| } | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.