Developers · open source

Build on GDEX.

The SDK, the MCP server and the agent skills behind GDEX, in one place. Spot, perps, outcomes, copy trading and bridging across 11 chains and HyperLiquid, through managed-custody wallets, so your code and your agents never hold a trading key.

Agent Skills

Markdown skills that Claude Code, Codex, Cursor and 40+ other agents load on demand. Start with gdex-agent-trading.

Install
npx skills add GemachDAO/gdex-skill --all --agent '*' -g

MCP server

The full trading surface as Model Context Protocol tools, for any MCP client. Node.js 22 or newer.

Install
npx @gemachdao/gdex-mcp-server init --client claude

TypeScript SDK

Typed methods for every GDEX endpoint, managed-custody encryption and signing, retries and the HyperLiquid client.

Install
npm install @gemachdao/gdex-skill
154
MCP tools
35
Agent skills
11
Chains + HyperLiquid
MIT
Open source

Connect your client.

init merges into an existing config, keeps a .bak of the old file and leaves other servers alone. No API key is needed to start; shared keys are built in.

MCP config
npx @gemachdao/gdex-mcp-server init --client claude     # .mcp.jsonnpx @gemachdao/gdex-mcp-server init --client cursor     # .cursor/mcp.jsonnpx @gemachdao/gdex-mcp-server init --client vscode     # .vscode/mcp.jsonnpx @gemachdao/gdex-mcp-server init --client codex      # .codex/config.tomlnpx @gemachdao/gdex-mcp-server init --client opencode   # opencode.json
Plugins (skills + MCP server)
/plugin marketplace add GemachDAO/gdex-skill     # Claude Code/plugin install gdex@gemachdaocodex plugin marketplace add GemachDAO/gdex-skill   # Codexcodex plugin add gdex@gemachdaogemini extensions install https://github.com/GemachDAO/gdex-skill   # Gemini CLI

The agent trading flow.

Six tools that handle units, account resolution, re-quoting and recovery. Every tool carries read and write annotations, so clients can tell what moves money.

  1. 01
    gdex_status

    API reachability, connected accounts and the one next step.

  2. 02
    gdex_connect

    Sign in once from a key file on the user's machine, or create a new wallet. No secrets in chat.

  3. 03
    gdex_preview_trade

    Exact terms before anything is signed: minimum received, size, margin, signed cap. Valid 60 seconds.

  4. 04
    gdex_execute_trade

    Runs only with the user's approval of that preview, or inside a delegated policy file the user edits.

  5. 05
    gdex_operation

    Follows the trade to filled or failed, including each cross-chain funding step and recovery.

  6. 06
    gdex_positions

    Balances per chain, HyperLiquid positions, open orders and unfinished operations; exits via gdex_manage_position.

Use the SDK.

TypeScript, with types for every request and response. The control wallet signs once at sign-in; a session key signs each trade, encrypted with AES-256-CBC.

TypeScript
import { GdexSkill, GDEX_API_KEY_PRIMARY } from '@gemachdao/gdex-skill';const skill = new GdexSkill();skill.loginWithApiKey(GDEX_API_KEY_PRIMARY);// Read-only endpoints need no accountconst trending = await skill.getTrendingTokens({ chain: 'solana', period: '24h', limit: 5 });// Trades use the managed-custody session from sign-inconst trade = await skill.buyToken({  chain: 8453, tokenAddress: '0xToken', amount: '0.01', slippage: 1,  apiKey: GDEX_API_KEY_PRIMARY, walletAddress: controlAddress, sessionPrivateKey,});

What you can build.

The MCP server exposes 145 execution tools and 9 documentation tools; the SDK covers the same surface as methods.

Spot trading

Buy and sell on Solana, Sui and the EVM chains below, with DEX routing handled by GDEX.

Unified USDC wallet

One USDC balance across Ethereum, Optimism, BSC, Sonic, Base, Arbitrum and Solana. Buys fund USDC and gas from other chains automatically.

HyperLiquid perps

Market and limit orders, TP/SL, leverage up to each market's cap, builder-DEX markets such as equities, FX and commodities.

HyperLiquid outcomes

HIP-4 outcome markets: discover, pick a side, place limit orders, cancel and exit.

Limit orders

Create, update, cancel and list limit orders with take-profit and stop-loss.

Copy trading

Mirror Solana wallets and HyperLiquid perp traders, with leaderboards, PnL and transaction history.

Bridge and transfers

Quote and execute cross-chain bridges; send native, ERC-20 and SPL tokens from managed wallets.

Portfolio and discovery

Cross-chain balances, trade history, token details, trending, OHLCV, top traders, livestreams, xStocks and Zora coins.

Risk and market data

Keyless Python feeds that print NDJSON: HyperLiquid market risk, scored anomaly events, a 12-chain token screen and GVault NAV.

UI kit skills

React and Next.js patterns for order forms, portfolios, wallet connection, theming and full trading pages.

Supported chains.

Chain ids as the SDK’s ChainId enum uses them. The API base is https://trade-api.gemach.io/v1.

ChainChain idDEXes
Ethereum1Uniswap V2/V3, Odos
Optimism10Uniswap V3, Odos
BNB Smart Chain56PancakeSwap, Odos
Sonic146—
Fraxtal252Uniswap V3
Nibiru6900—
Base8453Uniswap V3, Odos, Arcadia
Arbitrum One42161Uniswap V3, Odos
Berachain80094—
Solana622112261Raydium, Raydium V2, Orca
Sui1313131213Cetus, Bluefin
HyperLiquidperps onlyNative perp engine

Safe by design.

How money moves

  • Managed custody. GDEX holds the trading wallets. Your code signs with a session key; the control key signs only at sign-in.
  • No secrets in chat. gdex_connect reads a key file on the user’s machine and stores it with 0600 permissions. Agents never ask for a private key or seed phrase.
  • Preview, then approve. Nothing executes without the user’s approval of an exact preview, or a policy file with limits on size, daily spend, chains, leverage and slippage.
  • Honest results. An unknown submission is tracked, not resent; an unreadable balance is reported as unknown, not zero.