Client Integration

Claude Code CLI Crypto Trading via Eterna MCP

Claude Code is uniquely suited for systematic traders who keep strategy specs, risk policies, and backtest notes in a local Git repository. Pairing Claude Code with Eterna MCP turns your terminal into an interactive trading workstation with OAuth 2.1 security and isolated sub-accounts.

Updated: By Eterna Engineering (MCP & Agent Infrastructure Team)Read as Markdown
Quick Answer

Run `claude mcp add --transport http eterna https://mcp.eterna.exchange/mcp` in your terminal to connect Anthropic Claude Code to Eterna AI. Claude Code can then run multi-step TypeScript market scans, indicator calculations, and live USDT perpetual or spot trades across 1,180+ markets inside one `execute_code` call with zero local API keys.

Install Command1 lineclaude mcp add --transport http eterna ...
Auth MethodOAuth 2.1No local .env secrets or API keys
Execution Modelexecute_codeFull TypeScript runs inside Deno sandbox
Trading Fees0.014% / 0.035%Perp maker / taker, $0 MCP fee
https://mcp.eterna.exchange/mcp

1. Add Eterna MCP to Claude Code

Register the remote HTTP transport directly in Claude Code user or project scope. No npm wrapper or local proxy is needed.

  1. 01Register the remote MCP server

    Add Eterna as an HTTP MCP server at user scope so every workspace can access it, or omit `--scope user` to keep it inside one trading repository.

    claude mcp add --scope user --transport http eterna https://mcp.eterna.exchange/mcp
  2. 02Verify connection and trigger OAuth

    Launch `claude`, run `/mcp`, select `eterna`, and sign in through the browser OAuth flow. Eterna provisions an isolated no-KYC sub-account automatically.

    /mcp
  3. 03Pin trading guardrails in CLAUDE.md

    Add your max risk per trade, allowed leverage cap, and confirmation rule to a local `CLAUDE.md` file so Claude Code applies them on every session.

CLAUDE.md (recommended repo guardrails)
# Trading Guardrails (Eterna MCP)
- Always call eterna.getBalance() and eterna.getPositions() before opening any trade.
- Never exceed 5x leverage or risk more than 1.5% of equity per trade.
- Always attach stopLoss and takeProfit when calling eterna.placeOrder().
- Require explicit user confirmation before executing any market order or withdrawal.
Note: Claude Code loads CLAUDE.md automatically at session start and enforces these constraints before calling execute_code.

2. Why Claude Code + execute_code Beats Script Hacking

Instead of writing disposable Python scripts that leak API keys into `.env` files, Claude Code executes typed SDK code inside Eterna's managed sandbox.

  • Version-control strategy prompts and audit logs in Git without ever committing exchange credentials.
  • Inspect live orderbooks, RSI, MACD, EMA, VWAP, and Bollinger Bands across 20 pairs in one sandbox execution.
  • Combine local files (journal CSVs, watchlists, news notes) with live Eterna positions in the same reasoning turn.
  • Install the official Eterna Trading Skill zip into `.claude/skills/` for pre-tuned trade workflows.
FAQ

Frequently asked questions

Does Claude Code need local Bybit or Eterna API keys?
No. Claude Code connects via OAuth 2.1 directly to `https://mcp.eterna.exchange/mcp`. Credentials never sit in `.env` files or shell history.
Can Claude Code run scheduled or headless trading loops?
For unattended cron loops or VPS deployments, pair Eterna MCP with `@eterna-hybrid-exchange/cli` and OAuth device flow rather than an interactive terminal session.
Primary Sources

References & verification links

Start Trading via MCP

Connect your AI agent in 30 seconds

One remote MCP URL. 800+ USDT perpetuals, 380+ spot pairs, 0.014% maker / 0.035% taker, no KYC.

View on GitHub