Skip to main content
Glama
8DX MCP Server
by 8DX-io

8DX MCP Server

MCP server that exposes 8DX DEX aggregator REST endpoints as tools for AI agents.

The server is a thin TypeScript wrapper around the 8DX REST API plus safe AI-flow helpers. By default it does not hold keys, sign, or custody funds. It can create WalletConnect requests so the user's own wallet signs and broadcasts after approval; the MCP-side local signer remains opt-in and disabled unless explicitly configured.

Tools

Supported blockchain values for quote, swap, permit, and limit-order tools: ethereum, bsc, and arbitrum.

AI wallet session

These tools help an AI agent keep conversational context for terminal or Telegram-style flows. The session is local in memory and stores only public wallet metadata.

Tool

Description

eightdx_login_wallet

Records a public wallet address, blockchain, optional wallet app, and optional client surface for this MCP run.

eightdx_get_wallet_session

Reads the current local wallet session, if any.

eightdx_logout_wallet

Clears the local wallet session. This does not revoke token approvals or cancel on-chain permissions.

Wallet execution

These tools let an AI client offer a direct wallet path. WalletConnect is the preferred production path: the user's wallet signs and broadcasts after showing its own confirmation UI. The local signer is disabled unless environment variables explicitly enable it.

Tool

Description

eightdx_walletconnect_create_session

Creates a WalletConnect session and returns QR/raw URI, copied URI, and mobile direct-connection options.

eightdx_walletconnect_get_session

Reads the current WalletConnect session and connected account, optionally waiting for a pending approval.

eightdx_walletconnect_disconnect

Disconnects the active WalletConnect session.

eightdx_wallet_send_transaction

Requests eth_sendTransaction through the connected wallet. Requires confirmedByUser: true.

eightdx_local_signer_status

Shows whether the opt-in MCP-side signer is enabled and which address/chains are configured.

eightdx_local_sign_and_send_transaction

Signs and broadcasts with the opt-in local signer. Requires env configuration and confirmedByUser: true.

Token discovery

Tool

Description

eightdx_search_tokensGET /api/tokens

Searches 8DX token metadata so agents can resolve prompts like "BTC", "bitcoin", "USDC", or token names.

Quotes and swaps

Tool

Description

eightdx_healthGET /api/health

Checks whether the 8DX API is reachable and responding normally.

eightdx_get_quoteGET /api/{blockchain}/quote

Performs a read-only quote lookup for a token pair and amountIn or amountInWei.

eightdx_preview_market_swapGET /api/{blockchain}/quote

Returns quote data plus a 30-second refresh hint, selected slippage/deadline, route-link metadata, and signing guidance.

eightdx_get_wallet_links

Builds an 8DX web URL and MetaMask Mobile dapp deeplink for wallet handoff.

eightdx_create_swapPOST /api/{blockchain}/swap

Returns swap calldata for a previously quoted path. This tool does not sign, custody funds, or broadcast by itself.

Permit helpers

Tool

Description

eightdx_get_permit_addressGET /api/{blockchain}/permit/address

Reads the permit contract address used by the selected blockchain.

eightdx_get_permit_dataGET /api/{blockchain}/permit/data

Returns permit data that a wallet or agent can inspect and sign externally. The server never signs it.

Limit orders

Tool

Description

eightdx_create_limit_orderPOST /api/{blockchain}/order

Submits an order payload that has already been signed outside the MCP server.

eightdx_get_limit_orders_by_makerGET /api/{blockchain}/orders/byMaker/{maker}

Reads active limit orders for a maker address.

eightdx_get_limit_order_historyGET /api/{blockchain}/orders/byMaker/history/{maker}

Reads historical limit orders for a maker address.

eightdx_get_order_statusGET /api/{blockchain}/orders/{orderHash}

Reads one order by hash and returns scanner links for filled transaction hashes when available.

eightdx_cancel_limit_orderPOST /api/{blockchain}/orders/cancel

Submits a cancel payload that has already been signed outside the MCP server.

Tool

Description

eightdx_build_explorer_link

Builds Etherscan, BscScan, or Arbiscan links for transactions, addresses, and tokens. Explains off-chain order hashes.

Related MCP server: Bink MCP Server

Prompts

The server also exposes MCP prompt templates that help host AI agents turn natural language into safe tool sequences:

Prompt

Purpose

eightdx_trading_agent

General operating instructions for safe 8DX trading flows.

eightdx_market_swap_scenario

Checklist for prompts like "обменяй мне 1 биткоин по рынку".

eightdx_limit_order_scenario

Checklist for limit orders, signed order payloads, status, fills, and history.

AI trading flow

Recommended WalletConnect-first market-swap flow for an AI client:

  1. Resolve or ask for the target chain before creating a WalletConnect session. If the user names tokens in natural language, call eightdx_search_tokens. If results are ambiguous, ask which token/address to use before quoting.

  2. If the request is missing the output token, amount, slippage, or deadline, ask a follow-up question. For example, "обменяй мне 1 биткоин по рынку" is missing the token the user wants to receive. Market swap deadlines are relative seconds from now; use 600 for 10 minutes, not a Unix timestamp.

  3. Call eightdx_get_wallet_session and eightdx_walletconnect_get_session.

  4. Call eightdx_preview_market_swap as soon as the chain, tokens, amount, slippage, and deadline are known. If no wallet is connected yet, omit dstAddress. Show the quote and routeLink.url as an optional prefilled 8DX web page for users who prefer the 8DX UI; direct MCP execution can continue without opening that page.

  5. If WalletConnect is unavailable in the current host, explain that direct wallet confirmation is unavailable there. Call eightdx_preview_market_swap to generate a fresh quote and route metadata, then offer routeLink.url, walletLinks.webUrl, or walletLinks.metamaskMobileDappUrl only as fallback web handoff links. Do not call eightdx_create_swap or eightdx_wallet_send_transaction in this fallback branch.

  6. If WalletConnect is available but not connected and the user wants direct MCP execution, call eightdx_walletconnect_create_session for the selected chain and show all returned connectionOptions, including WalletConnect QR, copied URI, and mobile deeplink choices. Ask the user to connect in their wallet, then call eightdx_walletconnect_get_session again.

  7. After WalletConnect connects, call eightdx_login_wallet with the connected public account, chain, surface, and wallet app when known. For normal self-swaps, this connected account is both fromAddress and dstAddress.

  8. Refresh the quote with eightdx_preview_market_swap and dstAddress set to the connected wallet and show the quote, route, price impact, slippage, deadline, and refreshAfterSeconds: 30. Also show routeLink.url as an optional prefilled 8DX web page for users who prefer the 8DX UI; direct MCP execution can continue without opening that page.

  9. Refresh the preview if the user waits longer than 30 seconds before confirming.

  10. Ask for explicit confirmation of the fresh quote and swap parameters. If the user explicitly pre-authorizes refreshed quotes for the same swap intent, the agent may refresh stale quotes and continue without another chat confirmation; the wallet UI must still require final transaction approval. Then call eightdx_create_swap with the confirmed quoted path, slippage, deadline, fromAddress, and dstAddress.

  11. Show the returned to, data, value, chain, sender, and recipient. Then call eightdx_wallet_send_transaction with confirmedByUser: true; the connected wallet signs and broadcasts only after the user approves in the wallet UI.

  12. Use eightdx_local_sign_and_send_transaction only when eightdx_local_signer_status says enabled and the user explicitly asked the MCP server to sign and send.

  13. After a transaction hash is returned, call eightdx_build_explorer_link so the terminal or Telegram bot can display a scanner link.

Recommended limit-order flow:

  1. Prepare and sign the limit-order typed data outside this server.

  2. Submit the signed payload with eightdx_create_limit_order.

  3. Poll eightdx_get_order_status or read eightdx_get_limit_order_history for result, filters, and fill transaction hashes.

Telegram and terminal UIs should orchestrate these tools. This package does not run a Telegram bot, but it exposes the MCP tools needed for the bot or AI host to manage wallet connection, quote refresh, transaction confirmation, status, and history.

Install

npm install -g @8dx/8dx-mcp-server

Or run it directly:

npx -y @8dx/8dx-mcp-server

Configuration

Environment variable

Default

Description

EIGHTDX_API_BASE_URL

https://swap.ggp.gg

8DX REST API base URL.

EIGHTDX_REQUEST_TIMEOUT_MS

30000

Request timeout in milliseconds.

EIGHTDX_WALLETCONNECT_PROJECT_ID

8DX default project

Optional WalletConnect project override. WalletConnect works out of the box.

EIGHTDX_WALLETCONNECT_RELAY_URL

unset

Optional WalletConnect relay override.

EIGHTDX_WALLETCONNECT_METADATA_NAME

8DX MCP

WalletConnect app name shown in wallets.

EIGHTDX_WALLETCONNECT_METADATA_DESCRIPTION

8DX MCP server wallet connection

WalletConnect app description shown in wallets.

EIGHTDX_WALLETCONNECT_METADATA_URL

https://8dx.io

WalletConnect app URL shown in wallets.

EIGHTDX_WALLETCONNECT_METADATA_ICONS

unset

Comma-separated icon URLs for WalletConnect metadata.

EIGHTDX_ENABLE_LOCAL_SIGNER

false

Enables MCP-side transaction signing only when set to true.

EIGHTDX_SIGNER_PRIVATE_KEY

unset

Private key for the opt-in local signer. Never use this in an untrusted host.

EIGHTDX_RPC_URL

unset

Default Ethereum RPC URL for the local signer.

EIGHTDX_ETHEREUM_RPC_URL

unset

Ethereum RPC URL for the local signer. Overrides EIGHTDX_RPC_URL.

EIGHTDX_BSC_RPC_URL

unset

BNB Smart Chain RPC URL for the local signer.

EIGHTDX_ARBITRUM_RPC_URL

unset

Arbitrum RPC URL for the local signer.

All outgoing 8DX REST API requests include:

X-Source: 8dx-mcp/0.1.3

This lets the 8DX backend distinguish MCP traffic from direct API usage.

Claude Desktop

Add this to claude_desktop_config.json:

{
  "mcpServers": {
    "8dx": {
      "command": "npx",
      "args": ["-y", "@8dx/8dx-mcp-server"],
      "env": {
        "EIGHTDX_API_BASE_URL": "https://swap.ggp.gg"
      }
    }
  }
}

Claude Code

claude mcp add 8dx --transport stdio -- npx -y @8dx/8dx-mcp-server

OpenAI Codex

Codex CLI can register this server as a stdio MCP server with codex mcp add.

Local development

Use this while developing the server before it is published to npm.

Build the server first:

cd /absolute/path/to/8dx-mcp-server
npm install
npm run build

Then add the local server to Codex:

codex mcp add 8dx-local \
  --env EIGHTDX_API_BASE_URL=https://swap.ggp.gg \
  --env EIGHTDX_REQUEST_TIMEOUT_MS=30000 \
  -- node /absolute/path/to/8dx-mcp-server/dist/index.js

Confirm that Codex can see the server:

codex mcp list
codex mcp get 8dx-local

Published package

After the package is published to npm, use npx instead of the local node path:

codex mcp add 8dx \
  --env EIGHTDX_API_BASE_URL=https://swap.ggp.gg \
  --env EIGHTDX_REQUEST_TIMEOUT_MS=30000 \
  -- npx -y @8dx/8dx-mcp-server

Cursor

Cursor supports project-level and global MCP configuration:

  • Project-level: create .cursor/mcp.json in the project root.

  • Global: create ~/.cursor/mcp.json.

Local development

Use this while developing the server before it is published to npm.

Build the server first:

cd /absolute/path/to/8dx-mcp-server
npm install
npm run build

Then create or update .cursor/mcp.json in the project where you want to use the 8DX tools:

{
  "mcpServers": {
    "8dx-local": {
      "type": "stdio",
      "command": "node",
      "args": ["/absolute/path/to/8dx-mcp-server/dist/index.js"],
      "env": {
        "EIGHTDX_API_BASE_URL": "https://swap.ggp.gg",
        "EIGHTDX_REQUEST_TIMEOUT_MS": "30000"
      }
    }
  }
}

Restart Cursor, open Cursor Settings, go to MCP, and confirm that 8dx-local is enabled.

Try these prompts in Cursor chat:

Call the 8DX health tool.
Use 8DX to get a quote on ethereum from WETH to USDC.

For quote testing, pass exact token identifiers and amount format accepted by the 8DX API.

Published package

After the package is published to npm, use npx instead of the local node path:

{
  "mcpServers": {
    "8dx": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "@8dx/8dx-mcp-server"],
      "env": {
        "EIGHTDX_API_BASE_URL": "https://swap.ggp.gg",
        "EIGHTDX_REQUEST_TIMEOUT_MS": "30000"
      }
    }
  }
}

If Cursor does not show the tools, run npm run build again, restart Cursor, and check that the absolute path in args points to an existing dist/index.js file.

See examples/ for ready-to-copy local MCP config templates.

Development

npm install
npm test
npm run typecheck
npm run build
npm run smoke:stdio
npm run smoke:agent
npm run dev

Safety

This MCP server does not provide financial advice. Agents and users must inspect all swap calldata, permit data, signatures, transaction fields, and order payloads before using them with a wallet or broadcasting anything on-chain. Direct execution tools require confirmedByUser: true; WalletConnect still relies on the user's wallet confirmation UI, and the local signer should only be enabled in a trusted environment.

License

MIT

Available Tools

23 tools
eightdx_cancel_limit_orderCancel 8DX Limit OrderA

Cancels an 8DX limit order using an already signed cancel payload. This tool does not create signatures.

Inputs: maker (required), deadline (required), orderHash (required), signature (required), +1 more.

eightdx_create_limit_orderCreate 8DX Limit OrderA

Submits an already signed 8DX limit order payload. This tool does not create signatures and expects an already signed order.

Inputs: maker (required), params (required), orderType (required), blockchain (required), +3 more.

eightdx_create_swapCreate 8DX Swap CalldataA

Creates swap calldata from a quoted path. This tool does not sign transactions, does not send transactions, and does not custody funds.

Inputs: path (required), blockchain (required), dstAddress (required), permit, +5 more.

eightdx_get_limit_order_historyGet 8DX Limit Order HistoryC

Gets paginated 8DX limit-order history for a maker address.

Inputs: limit (required), maker (required), blockchain (required), sort, +2 more.

eightdx_get_limit_orders_by_makerGet 8DX Limit Orders By MakerA

Gets active 8DX limit orders for a maker address.

Inputs: maker (required), blockchain (required).

eightdx_get_order_statusGet 8DX Order StatusA

Gets an 8DX limit order by hash and returns block explorer links for filled transaction hashes when present.

Inputs: orderHash (required), blockchain (required).

eightdx_get_permit_addressGet 8DX Permit AddressB

Gets the permit contract address for a supported 8DX blockchain.

Inputs: blockchain (required).

eightdx_get_permit_dataGet 8DX Permit DataA

Gets permit typed data for a token approval flow. This tool only returns data to sign; it does not sign anything.

Inputs: amountIn (required), blockchain (required), dstAddress (required), addressTokenIn (required).

eightdx_get_quoteGet 8DX QuoteC

Gets an 8DX swap quote for a token pair and amount. This is a read-only operation.

Inputs: blockchain (required), addressTokenIn (required), addressTokenOut (required), amountIn, +1 more.

eightdx_get_wallet_sessionGet 8DX Wallet SessionA

Returns the current local non-custodial wallet session, if one is set.

Inputs: no named parameters.

eightdx_health8DX API HealthA

Checks whether the configured 8DX REST API is reachable.

Inputs: no named parameters.

eightdx_local_sign_and_send_transactionLocal Sign And Send 8DX TransactionA

Signs and broadcasts a prepared transaction with the opt-in local signer. Requires EIGHTDX_ENABLE_LOCAL_SIGNER=true and explicit user confirmation.

Inputs: to (required), data (required), value (required), blockchain (required), +3 more.

eightdx_local_signer_statusGet 8DX Local Signer StatusA

Shows whether the opt-in local signer is enabled. Local signing is disabled by default and requires explicit environment configuration.

Inputs: no named parameters.

eightdx_login_walletLog In 8DX Wallet SessionB

Stores a non-custodial local wallet session for AI-guided 8DX flows. This records only public wallet metadata and never stores private keys.

Inputs: blockchain (required), walletAddress (required), surface, walletApp.

eightdx_logout_walletLog Out 8DX Wallet SessionA

Clears the current local wallet session. This does not revoke wallet approvals or cancel on-chain permissions.

Inputs: no named parameters.

eightdx_preview_market_swapPreview 8DX Market SwapB

Previews a market swap for an AI-guided flow. Returns quote data, a 30-second refresh hint, selected slippage/deadline metadata, 8DX route link metadata, and external signing guidance.

Inputs: blockchain (required), addressTokenIn (required), addressTokenOut (required), amountIn, +4 more.

eightdx_search_tokensSearch 8DX TokensA

Searches 8DX token metadata so an AI agent can resolve user phrases like BTC, bitcoin, USDC, or a token name before quoting.

Inputs: q, sort, limit, offset, +1 more.

eightdx_walletconnect_create_sessionCreate 8DX WalletConnect SessionA

Creates a WalletConnect session and returns direct MCP connection options: QR/raw URI, copied URI, and mobile deeplink. The wallet, not MCP, signs transaction requests.

Inputs: blockchain (required).

eightdx_walletconnect_disconnectDisconnect 8DX WalletConnect SessionA

Disconnects the current WalletConnect session, if one exists.

Inputs: no named parameters.

eightdx_walletconnect_get_sessionGet 8DX WalletConnect SessionC

Reads the current WalletConnect session and connected wallet account, if any.

Inputs: waitMs.

eightdx_wallet_send_transactionSend 8DX Wallet TransactionA

Requests the connected wallet to sign and broadcast a prepared transaction via WalletConnect eth_sendTransaction. Requires explicit user confirmation.

Inputs: to (required), data (required), value (required), blockchain (required), +3 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 23 tools

    Disambiguation4/5

    Most tools have clearly distinct purposes, but `get_quote` and `preview_market_swap` overlap significantly since both return quote data, with the latter adding metadata. This could cause an agent to select the wrong one. All other tools such as wallet session management, limit orders, and WalletConnect operations are clearly separated.

    Naming Consistency5/5

    All 23 tools share the `eightdx_` prefix and follow a consistent snake_case verb_noun pattern, such as `get_quote`, `create_swap`, and `cancel_limit_order`. Even sub-groups like WalletConnect and local signer use consistent naming, making it easy to predict tool names.

    Tool Count4/5

    With 23 tools, the server is on the heavier side but the count is justified by the broad feature set covering swaps, limit orders, wallet management, WalletConnect, and local signing. No redundant tools seem present beyond the quote/preview pair, and each tool serves a distinct function within those domains.

    Completeness4/5

    The tool surface covers the full lifecycle for swaps (quote, preview, create, send), limit orders (create, cancel, query, history), and wallet sessions (login, logout, get). The inclusion of health check, explorer links, and permit data covers auxiliary needs, though a dedicated 'get supported chains' tool is missing.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables AI agents to perform blockchain operations like wallet management, token info, DeFi swaps, cross-chain bridging, and price checking across Ethereum, BNB Chain, and Solana.
      ISC
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to perform complex crypto operations like cross-chain routing, contract decoding, portfolio management, and anti-rug security checks, returning unsigned transactions for safe signing by the agent.
      MIT
    • A
      license
      Not graded
      quality
      F
      maintenance
      Enables AI agents to query liquidation radar for seven tokens, inspect recorded BTC/ETH order book depth with wall history and aggressor flow, and request Li.Fi cross-chain swap routes that agents sign themselves.
      MIT