How to trade on Eterna with an AI agent (MCP guide)
Eterna ships agent infrastructure as a first-class product: a Model Context Protocol server, a CLI that provisions an isolated sub-account and API key in one command, and a 29-method TypeScript SDK that runs in a sandboxed Deno runtime. This is what the wiring actually looks like.
The agent stack in one picture
Quick start
-
Create and fund the master account
Sign up via ehx.app/r/Steve (code
Steve, no KYC), connect your wallet, and deposit the collateral the agent will trade. The master account keeps custody; the agent only ever sees a sub-account. -
Point an MCP client at the endpoint
Add
https://mcp.eterna.exchange/mcpas a remote MCP server. This works today with Claude via the claude.ai MCP connector, with Claude Code and Claude Desktop, and with Openclaw. -
Register the agent
Call
register_agent. Eterna provisions an isolated sub-account and issues an API key instantly — no ticket, no manual review. Keys are stored Argon2-hashed and carry no withdrawal permissions. -
Or drive it from the CLI
Prefer a terminal?
npx @eterna-hybrid-exchange/cliexposes the same registration and trading surface for scripts and CI. -
Write strategy code against the TypeScript SDK
The SDK exposes 29 methods (market data, orders, positions, sub-accounts) and executes in a sandboxed Deno runtime, so generated strategy code runs with restricted host access.
Wiring examples
Remote MCP server config
{
"mcpServers": {
"eterna": {
"type": "http",
"url": "https://mcp.eterna.exchange/mcp"
}
}
}
CLI
# interactive: register an agent and print its sub-account + API key
npx @eterna-hybrid-exchange/cli
# the CLI is the same surface the MCP server exposes,
# so anything an agent can do you can reproduce in a shell script
Agent prompt pattern that works
You have Eterna MCP tools. Rules:
1. Call register_agent once, then reuse the returned sub-account.
2. Never send more than 2% of sub-account equity per position.
3. Always set a stop before opening a position.
4. Report fills, fees (0.014% maker / 0.035% taker) and PnL after each cycle.
5. You have no withdrawal permission - never attempt transfers.
Fee awareness matters for agents more than for humans: a bot that over-trades pays the taker rate repeatedly. Model it first in the fee calculator — at 0.035% taker, 100 round trips a day on $10k notional is roughly $21 of fees per day before any PnL.
Safety notes
Isolated sub-account
Fund the sub-account with only what the agent is allowed to risk. Blast radius equals the sub-account balance, not your whole book.
No withdrawal permissions
Agent API keys cannot move funds off the exchange. A leaked key is a trading risk, not a theft risk — still rotate it immediately.
Argon2-hashed keys
Keys are stored hashed with Argon2 server-side. Keep your local copy in a secret manager, never in a repo or a prompt you paste around.
Sandboxed runtime
SDK calls run in a sandboxed Deno runtime with restricted host access, which limits what LLM-generated strategy code can touch.
Hard position limits in the prompt
Encode max notional, max leverage and mandatory stops as explicit rules. Models drift; limits do not.
Paper-first, then small size
Run the loop read-only, then at minimum size for a week. Leverage plus an unattended agent is how accounts get zeroed.
Affiliate disclosure: This site contains referral links. If you sign up through them, the site owner may earn a share of trading fees at no extra cost to you.
Fund an agent sub-account
Create the master account with referral code Steve, then register your agent through MCP and give it a sandboxed sub-account.
Sources
All fee figures and product claims on this page were checked against the primary sources below in August 2026. Exchanges change fees — verify on the official pages before trading.
- Eterna Hybrid Exchange — AI & infrastructure overview (fees, latency, MCP) — https://ai.eterna.exchange/
- Eterna Hybrid Exchange — Home — https://eterna.exchange/
- Eterna Hybrid Exchange — Referral system (4-level program, staking tiers) — https://eterna.exchange/referral-system/
Endpoint, CLI package name and SDK details are as published on Eterna's AI infrastructure page in August 2026. Verify against the official docs before wiring production capital.