Epsilon

v0.4.0
io.github.alienbase-xyz/epsilon Checked 1 day ago Published 1 month ago

Non-custodial limit, stop-loss and DCA trading on Epsilon (Robinhood Chain) for AI agents

MCP server for Epsilon — lets AI agents (Cursor, Claude Desktop, Claude Code, or any MCP client) quote, place, and manage limit / stop-loss / DCA orders on Robinhood Chain. 1. An Epsilon developer key (eps_…) — create one at developers.epsilon.exchange. 2. Optionally, a trading wallet private key to enable order placement. Use a dedicated wallet with limited funds — not your main wallet. Omit EPSILON_WALLET_KEY for a read-only connection (quotes, order status, market stats).

Summary extracted from the README.

@epsilon-exchange/mcp

Epsilon MCP connector – tool definition quality and endpoint health on Glama

MCP server for Epsilon — lets AI agents (Cursor, Claude Desktop, Claude Code, or any MCP client) quote, place, and manage limit / stop-loss / DCA orders on Robinhood Chain.

Non-custodial by construction. Orders are EIP-712 messages signed locally with your wallet key; funds never leave your wallet until a keeper fills the order on-chain. The Epsilon API only ever sees the signed payload — never the key.

Setup

You need:

  1. An Epsilon developer key (eps_…) — create one at developers.epsilon.exchange.
  2. Optionally, a trading wallet private key to enable order placement. Use a dedicated wallet with limited funds — not your main wallet.

Cursor (.cursor/mcp.json)

{
  "mcpServers": {
    "epsilon": {
      "command": "npx",
      "args": ["-y", "@epsilon-exchange/mcp"],
      "env": {
        "EPSILON_API_KEY": "eps_…",
        "EPSILON_WALLET_KEY": "0x…"
      }
    }
  }
}

Claude Desktop / Claude Code

{
  "mcpServers": {
    "epsilon": {
      "command": "npx",
      "args": ["-y", "@epsilon-exchange/mcp"],
      "env": {
        "EPSILON_API_KEY": "eps_…",
        "EPSILON_WALLET_KEY": "0x…"
      }
    }
  }
}

Omit EPSILON_WALLET_KEY for a read-only connection (quotes, order status, market stats).

Environment

Variable Required Default Purpose
EPSILON_API_KEY yes — developer key (eps_…)
EPSILON_WALLET_KEY no — 0x-prefixed private key; enables trading tools
EPSILON_API_URL no https://api.epsilon.exchange API origin
EPSILON_RPC_URL no public Robinhood Chain RPC chain reads + approvals

Tools

Tool Wallet needed What it does
get_quote no best executable quote for a swap, with price impact and split suggestion
get_order no one order by hash: status, parameters, fills
get_market_stats no engine-wide order/volume stats
get_token no one token by address (+ balance and router allowance when a wallet is set)
get_wallet yes trading wallet address, ETH balance, chain
approve_token yes on-chain ERC-20 approval of the Epsilon router (once per token)
place_limit_order yes signed limit or stop-loss order; fills when price reaches the trigger
place_dca_order yes signed DCA schedule — one signature, N timed executions
cancel_order yes cancels a pending order with a maker-signed EIP-712 cancellation

Example session

You: swap-quote 0.5 WETH → USDG, then place a limit sell at 3100

The agent calls get_quote, shows you the numbers, checks allowance via get_token, runs approve_token if needed, then place_limit_order with limit_price: "3100" — and returns the order hash, trackable with get_order or in the Epsilon app.

How signing works

  • Domain: EpsilonRouter v7, chain 4663, router 0xdb41FA80016DC946cEB7B8512c3423463d3F260f (v7.1 strict-floor deploy).
  • The order struct (salt, maker, tokens, amount, trigger price, packed maker-traits, fee fields) is signed with EPSILON_WALLET_KEY via viem.
  • Fee fields come from the route the API serves and are verified server-side — the package never invents them.
  • Cancellation signs OrderCancel(bytes32 orderHash) under the same domain; only the maker can cancel.

Development

npm install
npm run build
EPSILON_API_KEY=eps_… node dist/index.js   # stdio server

The Go indexer cross-verifies this package's signatures in CI (TestMCPSignedOrderFixtureVerifies); regenerate the fixture after signing changes with node scripts/gen-fixture.mjs.