Skip to content

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.

  1. Install the jv CLI.
  2. We recommend running jv enable in your own terminal first to complete authorization. The agent can also start authorization with the wallet_setup tool, but that requires setting BASE_HTTP_RPC_URL in 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 --ai claude            # Claude Code, skill installed in the current directory
jv install --ai claude --global   # Claude Code, skill installed in the user directory
jv install --ai cursor            # Cursor, skill installed in the current directory
jv install --ai cursor --global   # Cursor, skill installed in the user directory
jv install --ai openclaw          # OpenClaw
jv install                        # all three platforms, skill installed in the user directory

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; --global only determines where the skill is installed.
  • If a skill already exists at the target location, the command reports an error; add --force to overwrite it. After upgrading the CLI, we recommend reinstalling once with --force so that the skill matches the new version.
  • Restart your AI client after installing.
  • To uninstall, use jv uninstall --ai claude (or cursor, openclaw, all). If the skill was installed in your user directory, add --global when uninstalling as well.

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:

claude mcp add --scope user --transport stdio jasper-vault -- jv mcp

jv install adds the following to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "jasper-vault": { "command": "jv", "args": ["mcp"] }
  }
}

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:

claude mcp add --scope user -e BASE_HTTP_RPC_URL=https://mainnet.base.org --transport stdio jasper-vault -- jv mcp

Cursor: add an env entry under jasper-vault in ~/.cursor/mcp.json:

{
  "mcpServers": {
    "jasper-vault": {
      "command": "jv",
      "args": ["mcp"],
      "env": { "BASE_HTTP_RPC_URL": "https://mainnet.base.org" }
    }
  }
}

If you only authorize and withdraw in your own terminal, you can skip this step.

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 with jv market list. To query limit orders, you need to provide your wallet address; you can use eoa from jv wallet info.
  • Most tools run for up to 90 seconds. wallet_setup, deposit_via_browser, and withdraw_via_browser run 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.
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
  • 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 a limitOrderId (limit orders, TP/SL orders). If it returns timeout, failed, or a network error, the order may still have been filled. Check the result with list_orders and list_limit_orders first, then decide whether to place it again.
  • For a position you have reduced, close_position may close it and then open a reverse position; we recommend closing such positions on the web app. After closing with close_position, use list_orders to 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.