mcpField
G
GDEX Trading

GDEX Trading

Local
gdex.proFinance4Updated 1w ago

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

  1. 01Spot swaps across Solana, Sui, and EVM chains
  2. 02Hyperliquid perpetual trading and positions
  3. 03Copy trading and cross-chain bridging
  4. 04Portfolio and token discovery
  5. 05Search and read GDEX documentation

Use cases

  1. 01Execute spot swaps through an AI agent
  2. 02Review perpetual positions and place orders
  3. 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.

mcp.json · Universal config
{
"mcpServers": {
"gemachdao-gdex": {
"command": "npx",
"args": [
"-y",
"@gemachdao/gdex-mcp-server"
],
"env": {
"GDEX_API_KEY": "<GDEX_API_KEY>",
"GDEX_API_URL": "<GDEX_API_URL>"
}
}
}
}
Run commandnpx -y @gemachdao/gdex-mcp-server
Environment variables to set
GDEX_API_KEYSecretGDEX API key; the server auto-authenticates with it on startup
GDEX_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.

Packages
npm@gemachdao/gdex-mcp-server5.1.0

Tools

117

Saved tool list · updated 1w ago

ParameterTypeRequiredDescription
querystringYesSearch query — keywords to find across all GDEX skills and documentation

Details

From the project README

GDEX 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

PathWhat it is
src/index.tsEntry 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.tsDocumentation 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.tsHand-written explain_workflow guides (type-checked against the SDK by tests/docs/docExamples.test.ts)
src/init.tsinit --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.tsShared GDEX SDK client (the SDK lives in ../src)
tests/Jest tests
dist/index.jsPrebuilt 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

VariableDescriptionRequired
GDEX_API_KEYGDEX API key; the server authenticates with it on startupOptional
GDEX_API_URLOverride 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

Markdown supported

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.