MCP Server

Connect your JTX Markets account to Claude Desktop
Need an API key first? Head to API Additional API Keys+ Create API Key. Choose Read scope for the safest first setup, or Trade if you want Claude to submit orders. Copy the secret — it’s only shown once.
Connect to Claude DesktopPrivate beta — 15 tools (read + trade + algos)
⚠ DISCLAIMER — EXAMPLE USE ONLY
The MCP server is provided as an example / educational tool. YOU control every trade setting — symbol, size, price, leverage, duration, side. YOU are solely responsible for any profit and losses arising from orders placed or algos executed via natural-language commands to an LLM. JTX Markets is not responsible for outcomes. Nothing here constitutes financial advice.
Start with a Read-scoped key. Test with tiny sizes first. Consider setting JTXMARKETS_MAX_ORDER_USDT in the env block to cap the notional the LLM can place per order.

The JTX Markets MCP server is a Model Context Protocol bridge that lets Claude Desktop query your account, place trades, and run TWAP algos in plain English: “show my open BTC-PERP positions”, “close half my ETH-PERP long”, “TWAP 1000 BTC-PERP contracts over the next 30 minutes in 10 slices”.

Ships with 15 tools — 7 read (get_balance / get_positions / get_orders / get_trades / get_funding_history / list_markets / get_market_summary), 5 trade (submit_order / cancel_order / cancel_all_orders / close_position / set_leverage), and 3 algos (submit_twap / list_algos / cancel_algo). Trade + algo tools require a Trade-scoped API key; a Read key gets a 403 insufficient scope back from the engine.

Withdrawals never touch MCP — they need email code + TOTP + admin approval on the dashboard, which does not translate to natural language.

Step 1
Download the MCP server
Download MCP Server (tarball)
jtxmarkets-mcp-server-0.3.0.tgz · Node 18+ required
Step 2
Install locally
# From wherever you downloaded the tarball:
tar -xzf jtxmarkets-mcp-server-0.3.0.tgz
cd package
npm install
# The runnable server is now at:  $(pwd)/dist/index.js
Step 3
Create an API key
Scroll up to the Additional API Keys panel and click + Create API Key. Pick your scope:
  • Read — safest. Claude can see everything but can’t submit or cancel orders.
  • Trade — Claude can also submit / cancel orders and close positions. Never touches withdrawals.
Copy the api_key and secret — the secret is only shown once. Consider adding your IP to the IP allowlist for defence in depth.
Step 4
Add to Claude Desktop
Open the Claude Desktop config file and paste this block. Replace the <paste-…> placeholders with your API key + secret from step 3, and change the /path/to/… to the actual location where you extracted the tarball.
Config location: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows).
{
  "mcpServers": {
    "jtxmarkets": {
      "command": "node",
      "args": [
        "/path/to/jtxmarkets-mcp-server/dist/index.js"
      ],
      "env": {
        "JTXMARKETS_API_KEY": "<paste-your-api-key>",
        "JTXMARKETS_API_SECRET": "<paste-your-api-secret>",
        "JTXMARKETS_CLIENT_ID": "<your-client-id>",
        "JTXMARKETS_ENV": "staging"
      }
    }
  }
}
Step 5
Restart Claude Desktop
After restart, open a new chat and click the tools icon at the bottom. You should see jtxmarkets listed with a green status indicator. Try one:
Read (safe on any scope)
  • “Show me my open positions and total unrealized P&L.”
  • “What’s the funding rate on BTC-PERP and when’s the next settlement?”
  • “Which of my recent trades had the biggest realized P&L?”
Trade / Algo (needs Trade-scoped key + confirms disclaimer)
  • “Place a limit buy for 100 BTC-PERP contracts at 500 USDT below the mark.”
  • “Close half my ETH-PERP long as a market order.”
  • “TWAP 1,000 BTC-PERP contracts over the next 30 minutes in 10 slices, buy side, market.”
  • “Show my running algos.” · “Cancel the TWAP.”
Algo example — TWAP walkthrough
A concrete lifecycle: submit a TWAP, confirm the parameters, check progress, cancel if the market turns. Try with a Trade-scoped key and a small size first.
You
TWAP 1,000 BTC-PERP contracts over the next 30 minutes in 10 slices, buy side, market.
Claude
Just to confirm — this will submit a real TWAP algo:
  • Symbol: BTC-PERP · Side: Buy · Total: 1,000 contracts (≈ 0.01 BTC)
  • Duration: 30 min · Slices: 10 · Interval: ~180s between fills
  • Order type: market · Reduce-only: no
⚠ Disclaimer — this is example / educational use only. YOU are solely responsible for outcomes. JTX Markets is not responsible for losses. Proceed?
You
Yes, go ahead.
Claude
TWAP submitted.
  • id: algo-4f2a-…c19d
  • status: started
  • First slice scheduled in ~5 seconds
Monitor with “show my running algos”, cancel with “cancel algo …”.
You(10 minutes later)
Show my running algos.
Claude
Running algos (1):
  • BTC-PERP BUY market · 300 / 1,000 filled (3/10 slices, 30%) · id algo-4f2a-…c19d · running
You(market starts running against you)
Cancel the TWAP.
Claude
Cancelled algo algo-4f2a-…c19d. Any remaining slices will not execute. Already-filled 300 contracts stay in your position — reduce with “close my BTC-PERP position” if needed.
Real responses will vary — Claude reads the live disclaimer, echoes your parameters back in its own words, and only submits once you confirm. The algo-… id is the trader-visible handle for cancel + progress queries.
Safety notes
  • Never share a Claude chat that contains active JTX Markets tool calls — it exposes your account state.
  • Withdrawals will never work through MCP. They require email verification code + TOTP + admin approval on the dashboard.
  • If a key is compromised, revoke it from the Additional API Keys panel above.