About GDEX Trading
GDEX Trading is the official MCP server for GDEX, a multi-chain trading terminal, aimed at AI agents. Its tools cover trade execution, account data, documentation, and workflow guidance across spot markets, perpetuals, and related services.
Key features
- 01Spot swaps across Solana, Sui, and EVM chains
- 02Hyperliquid perpetual trading and positions
- 03Copy trading and cross-chain bridging
- 04Portfolio and token discovery
- 05Search and read GDEX documentation
Use cases
- 01Execute spot swaps through an AI agent
- 02Review perpetual positions and place orders
- 03Bridge assets and inspect portfolio data
MCP support
The server exposes GDEX trading, account, and documentation tools to MCP clients, serving over stdio. It includes an initializer that merges its configuration into supported client config files.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
npx -y @gemachdao/gdex-mcp-serverGDEX_API_KEYSecretGDEX API key; the server auto-authenticates with it on startupGDEX_API_URLOverride the GDEX API base URL (default: https://trade-api.gemach.io/v1)Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.
Tools
117Saved tool list · updated 1w ago
| Parameter | Type | Required | Description |
|---|---|---|---|
| query | string | Yes | Search query — keywords to find across all GDEX skills and documentation |
Details
From the project READMEGDEX MCP Server
The official Model Context Protocol server for GDEX, Gemach DAO's multi-chain trading terminal. It gives AI agents 154 tools: 145 that execute trades and read account state, plus 9 documentation tools.
- Spot swaps on Solana, Sui and 10 EVM chains (
buy_token,sell_token,limit_buy,limit_sell) - Hyperliquid perpetuals, including tokenized equities, FX and commodities (
open_perp_position,place_perp_order,close_perp_position,get_perp_positions) - Copy trading, cross-chain bridging, portfolio and token discovery
The server is implemented in this directory. The npm package @gemachdao/gdex-mcp-server is built from it, and it is listed in the official MCP Registry as io.github.GemachDAO/gdex-mcp-server.
Source layout
| Path | What it is |
|---|---|
src/index.ts | Entry point: creates the McpServer, registers every tool, serves over stdio |
src/tools/ | Tool handlers by area: spotTrade, perpTrade, perpRead, limitOrders, copyTrade, hlCopyTrade, bridge, portfolio, managed, directExec, auth, v110, usdc |
src/knowledge.ts | Documentation tools: search and read the GDEX skills, which build:mcp embeds in dist/index.js (the npm package and Docker image ship no skills/ directory) |
src/workflowGuides.ts | Hand-written explain_workflow guides (type-checked against the SDK by tests/docs/docExamples.test.ts) |
src/init.ts | init --client <name> [--force]: merges the GDEX entry into the MCP config for Claude, Cursor, VS Code, Codex, OpenCode (JSONC helpers in src/jsonc.ts, TOML in src/tomlLite.ts) |
src/sdk.ts | Shared GDEX SDK client (the SDK lives in ../src) |
tests/ | Jest tests |
dist/index.js | Prebuilt single-file bundle (npm run build:mcp from the repo root) |
Run
From npm:
npx -y @gemachdao/gdex-mcp-server
From source (repo root):
npm ci
npm run build:mcp
node mcp-server/dist/index.js
With Docker, from source (repo root):
docker build -t gdex-mcp-server .
docker run -i --rm gdex-mcp-server
Write a client config automatically:
npx @gemachdao/gdex-mcp-server init --client claude # or cursor, vscode, codex, opencode
An existing config file is merged, not overwritten: other servers and settings stay, comments in VS Code's JSONC and Codex's TOML are kept, the previous file is saved as <file>.bak, and the write is atomic. Rerunning is a no-op. If a different gdex-mcp-server entry already exists, init prints the current and new entry and exits non-zero; pass --force to replace it. A file that doesn't parse is left untouched and init exits non-zero.
Configuration
| Variable | Description | Required |
|---|---|---|
GDEX_API_KEY | GDEX API key; the server authenticates with it on startup | Optional |
GDEX_API_URL | Override the API base URL (default https://trade-api.gemach.io/v1) | Optional |
Develop
cd mcp-server
npm ci
npx tsc --noEmit
npm test
License
MIT © GemachDAO. See LICENSE.
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.