Model Integration

xAI Grok & Grok CLI Crypto Trading via Eterna MCP

Crypto and tokenized equities move fast on X (Twitter) headlines, earnings flashes, and macro narratives. Pairing Grok's catalyst speed with Eterna's orderbook liquidity and strict risk-sizing TypeScript prevents both slow entries and blind headline chasing.

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

Connect xAI Grok (via Grok CLI, Vercel AI SDK `@ai-sdk/xai`, or LangGraph) to `https://mcp.eterna.exchange/mcp`. Grok pairs real-time crypto/macro sentiment awareness with Eterna's deterministic `execute_code` technical analysis and <200ms perpetuals execution.

StrengthCatalyst + ExecutionCombine sentiment with live RSI/VWAP
Markets800+ perps + xStocksBTC, SOL, memecoins, TSLA, NVDA
Perp Fees0.014% / 0.035%$0/mo MCP access
GuardrailCode-enforced stopsMandatory stopLoss & leverage cap
https://mcp.eterna.exchange/mcp

1. Connect xAI Grok with `@ai-sdk/xai` + `@ai-sdk/mcp`

grok-eterna-agent.ts
import { generateText, stepCountIs } from "ai";
import { xai } from "@ai-sdk/xai";
import { createMCPClient } from "@ai-sdk/mcp";

const mcp = await createMCPClient({
  transport: {
    type: "http",
    url: "https://mcp.eterna.exchange/mcp",
    headers: { Authorization: `Bearer ${process.env.ETERNA_ACCESS_TOKEN}` },
  },
});

const res = await generateText({
  model: xai("grok-4"),
  tools: await mcp.tools(),
  stopWhen: stepCountIs(4),
  prompt:
    "Check TSLAUSDT, NVDAUSDT, BTCUSDT, and DOGEUSDT 15m VWAP, 1h RSI, and orderbook spreads via execute_code. Summarize any clean risk-reward setups.",
});

console.log(res.text);
await mcp.close();
FAQ

Frequently asked questions

How do I stop a sentiment-driven Grok bot from chasing spikes?
Always verify price distance from 15m VWAP (`eterna.getVwap`) and 1h RSI (`eterna.getRsi`) inside `execute_code` before placing any order, and cap leverage at 2x to 3x on news volatility.
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