Trade with AI Agents
jv comes with a built-in MCP server: jv mcp, running in stdio mode with the server name jasper-vault. Once an AI client is connected, the agent calls MCP tools, and each tool runs the corresponding jv command on your computer, signing with the same local authorization.
Before you start
Section titled “Before you start”- Install the jv CLI.
- We recommend running
jv enablein your own terminal first to complete authorization. The agent can also start authorization with thewallet_setuptool, but that requires settingBASE_HTTP_RPC_URLin the MCP configuration as described below.
Install the skill and MCP configuration: jv install
Section titled “Install the skill and MCP configuration: jv install”jv install installs a skill (which tells the agent how to use these tools) and writes the MCP configuration for Claude Code and Cursor:
| Platform | Skill location | MCP configuration |
|---|---|---|
| Claude Code | .claude/skills/jasper-vault-cli/; with --global, ~/.claude/skills/jasper-vault-cli/ |
Written to mcpServers in ~/.claude/settings.json |
| Cursor | .cursor/skills/jasper-vault-cli/; with --global, ~/.cursor/skills/jasper-vault-cli/ |
Written to mcpServers in ~/.cursor/mcp.json |
| OpenClaw | ~/.openclaw/skills/jasper-vault-cli/ |
Not written |
- The MCP configuration is always written to your user directory;
--globalonly determines where the skill is installed. - If a skill already exists at the target location, the command reports an error; add
--forceto overwrite it. After upgrading the CLI, we recommend reinstalling once with--forceso that the skill matches the new version. - Restart your AI client after installing.
- To uninstall, use
jv uninstall --ai claude(orcursor,openclaw,all). If the skill was installed in your user directory, add--globalwhen uninstalling as well.
Claude Code
Section titled “Claude Code”After installing, type /mcp in Claude Code and check whether jasper-vault is in the list. If it is not, register it with Claude Code’s built-in command:
Cursor
Section titled “Cursor”jv install adds the following to ~/.cursor/mcp.json:
OpenClaw
Section titled “OpenClaw”jv install --ai openclaw installs only the skill and does not write any MCP configuration. The skill requires the agent to trade through the jasper-vault MCP tools, so you also need to register jv mcp as an MCP server named jasper-vault in the way OpenClaw supports.
Let the agent start authorization and withdrawals
Section titled “Let the agent start authorization and withdrawals”The wallet_setup (authorization) and withdraw_via_browser (withdrawal) tools need BASE_HTTP_RPC_URL when they run. The MCP server runs jv commands with its own environment variables, so you need to put this variable in the MCP configuration.
Claude Code:
Cursor: add an env entry under jasper-vault in ~/.cursor/mcp.json:
If you only authorize and withdraw in your own terminal, you can skip this step.
MCP tools
Section titled “MCP tools”jv mcp provides 17 tools:
| Category | Tool | Corresponding command |
|---|---|---|
| Trading | create_order |
jv order create |
| Trading | close_position |
jv order close |
| Trading | protect_order |
jv order protect |
| Trading | set_take_profit |
jv tp set |
| Trading | set_stop_loss |
jv sl set |
| Queries | list_orders |
jv orders list |
| Queries | get_order |
jv orders get |
| Queries | get_order_stats |
jv orders stats |
| Queries | get_price |
jv price |
| Queries | get_job_status |
jv job status |
| Limit orders | list_limit_orders |
jv limit-order list |
| Limit orders | get_limit_order_status |
jv limit-order status |
| Limit orders | cancel_limit_order |
jv limit-order cancel |
| Wallet and funds | wallet_setup |
jv enable |
| Wallet and funds | deposit_via_browser |
jv deposit |
| Wallet and funds | withdraw_via_browser |
jv withdraw |
| Other | check_update |
Checks whether a new CLI version is available |
- MCP has no tool for listing markets and no tool for viewing wallet information. Write the trading symbol directly in your instructions, for example
JVBTC; see the full list withjv market list. To query limit orders, you need to provide your wallet address; you can useeoafromjv wallet info. - Most tools run for up to 90 seconds.
wallet_setup,deposit_via_browser, andwithdraw_via_browserrun for up to 16 minutes, waiting for you to finish signing in the browser. - When a new CLI version is available, an upgrade notice is appended to the end of tool results.
Example instructions
Section titled “Example instructions”| You say | The agent calls |
|---|---|
| What’s the price of JVBTC right now? | get_price |
| Open a JVBTC long at market with 100 JVUSD margin and 20x leverage | create_order |
| Place a limit long on JVBTC at 60000 with 50 margin and 10x leverage, valid for 2 hours | create_order, with a limit price and validity period |
| Add PPO protection to order 42, OTM tier 3, 8 hours | protect_order |
| Order 43 is a short; take profit at 58000, stop loss at 66000 | set_take_profit, set_stop_loss, with the side set to short |
| List my current positions | list_orders |
| Close order 42 / close all positions | close_position |
| Deposit 200 USDC from Base | deposit_via_browser, which returns a URL where you sign with your wallet |
Security tips
Section titled “Security tips”- Use a separate wallet that holds only the funds you plan to trade with.
- In your AI client, keep confirmation prompts on for tools that place orders, close positions, or withdraw; do not set them to auto-approve. Before confirming, check the side, trading symbol, margin, and leverage.
- Do not let the agent read, display, or upload files under
~/.jaspervault/, and do not paste the contents of the key file into the conversation. - When the agent gives you an authorization, deposit, or withdrawal URL, check what you are signing in your wallet before you sign, such as the amount, address, and expiry time.
- Do not let the same agent read web pages or documents from unknown sources while it has access to order tools. Instructions hidden in that content could trick it into placing orders.
- An order is clearly successful only if it returns
"status": "completed"(market orders, adding protection) or alimitOrderId(limit orders, TP/SL orders). If it returnstimeout,failed, or a network error, the order may still have been filled. Check the result withlist_ordersandlist_limit_ordersfirst, then decide whether to place it again. - For a position you have reduced,
close_positionmay close it and then open a reverse position; we recommend closing such positions on the web app. After closing withclose_position, uselist_ordersto confirm that the position is closed and that no new reverse position was opened. For the reason, see the “Add to, reduce, and close positions” section of Trade from the Command Line. - For what the delegation key can and cannot do, see the Trader Integration Overview.