8DX MCP Server
OfficialProvides tools for token discovery, quotes, swaps, permit helpers, limit orders, and explorer links on the Ethereum blockchain via the 8DX DEX aggregator.
Enables creation and management of WalletConnect sessions, allowing users to connect their wallet and sign transactions through the WalletConnect protocol.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@8DX MCP Serverget a quote to swap 1 ETH for USDC on ethereum"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 |
| Records a public wallet address, blockchain, optional wallet app, and optional client surface for this MCP run. |
| Reads the current local wallet session, if any. |
| 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 |
| Creates a WalletConnect session and returns QR/raw URI, copied URI, and mobile direct-connection options. |
| Reads the current WalletConnect session and connected account, optionally waiting for a pending approval. |
| Disconnects the active WalletConnect session. |
| Requests |
| Shows whether the opt-in MCP-side signer is enabled and which address/chains are configured. |
| Signs and broadcasts with the opt-in local signer. Requires env configuration and |
Token discovery
Tool | Description |
| Searches 8DX token metadata so agents can resolve prompts like "BTC", "bitcoin", "USDC", or token names. |
Quotes and swaps
Tool | Description |
| Checks whether the 8DX API is reachable and responding normally. |
| Performs a read-only quote lookup for a token pair and |
| Returns quote data plus a 30-second refresh hint, selected slippage/deadline, route-link metadata, and signing guidance. |
| Builds an 8DX web URL and MetaMask Mobile dapp deeplink for wallet handoff. |
| Returns swap calldata for a previously quoted path. This tool does not sign, custody funds, or broadcast by itself. |
Permit helpers
Tool | Description |
| Reads the permit contract address used by the selected blockchain. |
| Returns permit data that a wallet or agent can inspect and sign externally. The server never signs it. |
Limit orders
Tool | Description |
| Submits an order payload that has already been signed outside the MCP server. |
| Reads active limit orders for a maker address. |
| Reads historical limit orders for a maker address. |
| Reads one order by hash and returns scanner links for filled transaction hashes when available. |
| Submits a cancel payload that has already been signed outside the MCP server. |
Explorer links
Tool | Description |
| Builds Etherscan, BscScan, or Arbiscan links for transactions, addresses, and tokens. Explains off-chain order hashes. |
Prompts
The server also exposes MCP prompt templates that help host AI agents turn natural language into safe tool sequences:
Prompt | Purpose |
| General operating instructions for safe 8DX trading flows. |
| Checklist for prompts like "обменяй мне 1 биткоин по рынку". |
| Checklist for limit orders, signed order payloads, status, fills, and history. |
AI trading flow
Recommended WalletConnect-first market-swap flow for an AI client:
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.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
600for 10 minutes, not a Unix timestamp.Call
eightdx_get_wallet_sessionandeightdx_walletconnect_get_session.Call
eightdx_preview_market_swapas soon as the chain, tokens, amount, slippage, and deadline are known. If no wallet is connected yet, omitdstAddress. Show the quote androuteLink.urlas an optional prefilled 8DX web page for users who prefer the 8DX UI; direct MCP execution can continue without opening that page.If WalletConnect is unavailable in the current host, explain that direct wallet confirmation is unavailable there. Call
eightdx_preview_market_swapto generate a fresh quote and route metadata, then offerrouteLink.url,walletLinks.webUrl, orwalletLinks.metamaskMobileDappUrlonly as fallback web handoff links. Do not calleightdx_create_swaporeightdx_wallet_send_transactionin this fallback branch.If WalletConnect is available but not connected and the user wants direct MCP execution, call
eightdx_walletconnect_create_sessionfor the selected chain and show all returnedconnectionOptions, including WalletConnect QR, copied URI, and mobile deeplink choices. Ask the user to connect in their wallet, then calleightdx_walletconnect_get_sessionagain.After WalletConnect connects, call
eightdx_login_walletwith the connected public account, chain, surface, and wallet app when known. For normal self-swaps, this connected account is bothfromAddressanddstAddress.Refresh the quote with
eightdx_preview_market_swapanddstAddressset to the connected wallet and show the quote, route, price impact, slippage, deadline, andrefreshAfterSeconds: 30. Also showrouteLink.urlas an optional prefilled 8DX web page for users who prefer the 8DX UI; direct MCP execution can continue without opening that page.Refresh the preview if the user waits longer than 30 seconds before confirming.
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_swapwith the confirmed quoted path, slippage, deadline,fromAddress, anddstAddress.Show the returned
to,data,value, chain, sender, and recipient. Then calleightdx_wallet_send_transactionwithconfirmedByUser: true; the connected wallet signs and broadcasts only after the user approves in the wallet UI.Use
eightdx_local_sign_and_send_transactiononly wheneightdx_local_signer_statussays enabled and the user explicitly asked the MCP server to sign and send.After a transaction hash is returned, call
eightdx_build_explorer_linkso the terminal or Telegram bot can display a scanner link.
Recommended limit-order flow:
Prepare and sign the limit-order typed data outside this server.
Submit the signed payload with
eightdx_create_limit_order.Poll
eightdx_get_order_statusor readeightdx_get_limit_order_historyfor 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-serverOr run it directly:
npx -y @8dx/8dx-mcp-serverConfiguration
Environment variable | Default | Description |
|
| 8DX REST API base URL. |
|
| Request timeout in milliseconds. |
| 8DX default project | Optional WalletConnect project override. WalletConnect works out of the box. |
| unset | Optional WalletConnect relay override. |
|
| WalletConnect app name shown in wallets. |
|
| WalletConnect app description shown in wallets. |
|
| WalletConnect app URL shown in wallets. |
| unset | Comma-separated icon URLs for WalletConnect metadata. |
|
| Enables MCP-side transaction signing only when set to |
| unset | Private key for the opt-in local signer. Never use this in an untrusted host. |
| unset | Default Ethereum RPC URL for the local signer. |
| unset | Ethereum RPC URL for the local signer. Overrides |
| unset | BNB Smart Chain RPC URL for the local signer. |
| unset | Arbitrum RPC URL for the local signer. |
All outgoing 8DX REST API requests include:
X-Source: 8dx-mcp/0.1.0This 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-serverOpenAI 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 buildThen 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.jsConfirm that Codex can see the server:
codex mcp list
codex mcp get 8dx-localPublished 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-serverCursor
Cursor supports project-level and global MCP configuration:
Project-level: create
.cursor/mcp.jsonin 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 buildThen 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 devSafety
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
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/8DX-io/8dx-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server