Back to Browse

Sodax MCP Server

Developer ToolsModerate6.8MCP RegistryRemote
Free

Server data from the Official MCP Registry

Cross-network DeFi data, SDK docs, and swap tools that quote and track swaps the user's wallet signs

About

Cross-network DeFi data, SDK docs, and swap tools that quote and track swaps the user's wallet signs

Remote endpoints: streamable-http: https://mcp.sodax.com/mcp

Security Report

6.8
Moderate6.8Moderate Risk

The SODAX MCP server is a well-structured remote HTTP/SSE server offering live cross-chain API data, SDK docs proxying, and optional swap tools gated by an x-api-key header. The code shows thoughtful security practices (helmet, rate limiting, body size limits, key forwarding restricted to SODAX endpoints, log redaction of keys), and the network and wallet-related permissions match its stated DeFi developer purpose. Only minor concerns were noted, such as the wide permission surface of swap tools and the truncated portion of the code that could not be fully reviewed. Supply chain analysis found 1 known vulnerability in dependencies (0 critical, 1 high severity).

4 files analyzed · 5 issues found

Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.

Permissions Found in Source Code

Found by scanning the linked source code. This listing connects to a hosted endpoint, so none of this runs on your machine: it describes what the server software does where it is hosted.

HTTP Network Access

Connects to external APIs or services over the internet.

env_vars

Applies to the server that hosts this plugin, not to your machine.

database

Applies to the server that hosts this plugin, not to your machine.

How to Connect

Remote Plugin

No local installation needed. Your AI client connects to the remote endpoint directly.

Add this to your MCP configuration to connect:

{
  "mcpServers": {
    "io-github-gosodax-sodax-mcp": {
      "url": "https://mcp.sodax.com/mcp",
      "headers": {
        "x-api-key": "<YOUR_API_KEY>",
        "x-sodax-profile": "<YOUR_SODAX_PROFILE>",
        "x-sodax-partner-address": "<YOUR_SODAX_PARTNER_ADDRESS>",
        "x-sodax-partner-fee-bps": "<YOUR_SODAX_PARTNER_FEE_BPS>"
      }
    }
  }
}

This server needs these headers. Replace each <YOUR_...> placeholder with your own value:

  • x-api-key (optional): SODAX API key. Optional for the builder tools; required for the swap tools. Forwarded on the server's data API, solver and Swaps API calls
  • x-sodax-profile (optional): Tools to serve: all (default: builder tools, plus swap tools with an API key), builder, or swap (needs x-api-key)
  • x-sodax-partner-address (optional): EVM address that receives your partner fee on swap quotes. Set with x-sodax-partner-fee-bps
  • x-sodax-partner-fee-bps (optional): Partner fee on swap quotes, in basis points from 1 to 100. Set with x-sodax-partner-address

Documentation

View on GitHub

From the project's GitHub README.

SODAX MCP Server

The default one-click config connects without an API key — the builder and documentation tools work immediately. To use the swap tools, add an x-api-key header with your SODAX API key. See API Key below. A .mcp.json at the repo root lets Cursor Directory and Claude Code project config pick up the server entry automatically.

SODAX MCP server for AI coding assistants. Access live cross-network (cross-chain) API data: swap tokens across 20+ networks, query money market rates, look up solver volume, and search intent history. Includes full cross-chain SDK documentation that auto-syncs from SODAX developer docs. Build cross-network DeFi integrations with real-time protocol data directly in your development workflow. With a SODAX API key, it also quotes and tracks swaps that the user's own wallet signs.

One-liner: SODAX MCP server: live cross-network DeFi API data and auto-updating SDK docs for 20+ networks. Query swaps, lending, solver volume, and intent history, and make swaps the user's wallet signs, from your AI coding assistant.

Quick Start

Add the MCP server URL to your AI coding assistant's configuration:

{
  "mcpServers": {
    "sodax": {
      "type": "http",
      "url": "https://mcp.sodax.com/mcp"
    }
  }
}

Works with Claude, Cursor, VS Code, Windsurf, ChatGPT, and other MCP-compatible agents. One connection gives you access to all cross-network API tools and SDK documentation.

SSE Transport (Legacy)

For clients that don't support streamable HTTP (e.g. Gemini CLI), use the SSE endpoint instead:

{
  "mcpServers": {
    "sodax": {
      "type": "sse",
      "url": "https://mcp.sodax.com/sse"
    }
  }
}

API Key

Send your SODAX API key in an x-api-key header. The builder tools work without one; the swap tools need it. An organisation's Owner or Admin creates one in the partner portal, under API keys → Create key. The server forwards it on its calls to the SODAX data API, solver and Swaps API, and nowhere else (not to the relay either). Over stdio, set SODAX_API_KEY instead. A value that isn't a SODAX key (sodax_…) is ignored, except by the swap profile, which refuses it.

Over HTTP the server also checks the key against SODAX's active keys (API_KEY_ENFORCEMENT). The swap profile refuses a key that is mistyped or revoked (HTTP 403, API_KEY_UNKNOWN), whose organisation is suspended (403, ORG_SUSPENDED) or that lacks the swaps:read and swaps:write scopes (403, API_KEY_SCOPE), and answers 503 (KEY_CHECK_UNAVAILABLE) while it can't check keys yet. The default profile serves such a key the builder tools only, with a note saying why. A revoked key stops working about 15 seconds later. An open SSE session that has the swap tools then gets every message refused the same way, until it reconnects.

SSE clients send x-api-key on GET /sse and on every POST /messages: each message runs only with the key it carries, and a session opened with a key refuses a message without that key (HTTP 403). The MCP SDKs' SSE clients already send their headers on both.

{
  "mcpServers": {
    "sodax": {
      "type": "http",
      "url": "https://mcp.sodax.com/mcp",
      "headers": { "x-api-key": "<your key>" }
    }
  }
}

In Claude Code: claude mcp add --transport http sodax https://mcp.sodax.com/mcp --header "x-api-key: <your key>".

Profiles

A connection picks which tools it gets with ?profile=<name> on the URL or the x-sodax-profile header (stdio: --profile <name> or MCP_PROFILE).

ProfileTools
all (default)The builder tools, plus the swap tools when you send an API key
builderThe data, relay and SDK docs tools
swapThe swap tools only. Needs an API key

An unknown profile is refused with HTTP 400; swap without a key with HTTP 403.

Partner fee

A builder can take a fee on the swaps its agent quotes: ?partnerAddress=<EVM address>&partnerFeeBps=<1-100> on the URL, or the x-sodax-partner-address and x-sodax-partner-fee-bps headers (stdio: SODAX_PARTNER_FEE_ADDRESS and SODAX_PARTNER_FEE_BPS). Set both or neither; anything else is refused with HTTP 400. The fee is taken from the amount sent, is part of the quote, and is never a tool input.

Swapping

With the swap profile, or all with a key, an agent swaps for a user like this. The user's wallet signs and sends every transaction; the server never signs.

  1. sodax_swap_price with the chains, tokens and amount: the expectedAmount the user would receive and both sides' USD value. It builds and holds nothing, so an agent shows or watches a price with it. Its prepareNeeds lists the addresses preparing will need.
  2. sodax_swap_prepare, once the user is ready to sign, with the same and the user's fromAddress, plus toAddress unless both chains are EVM (then it defaults to fromAddress; without it otherwise, an INVALID_ADDRESS names it), and optionally slippageBps (default 100, 1%): the result's minimumAmount is the least a solver may deliver. Tighter makes a fill less likely; an unfilled swap is refunded after its deadline. It returns steps (an approve when one is needed, after a reset_approve when the token needs its allowance zeroed first, then the swap), a quoteId, the intentHash the hub will know the swap by, and expiresAt, by which the swap must be mined (track it even after). It holds the quote until then. Both carry quotedAt, when this server got the solver's price. Each approve and reset step carries approves: the token, its symbol, the spender and the amount its own calldata sets. An EVM recipient that is the zero or 0x…dEaD burn address is refused.
  3. The user's wallet, on the source chain (each step's tx carries its chainId), signs and sends each step in order, each confirmed before the next. A wallet that supports EIP-5792 can send the quote's batch in place of the steps its replaces lists, adding calls to its params: those steps' {to, value, data}, in order. A reset_approve still goes first. From a non-EVM chain there is one step, with chainType instead of chainId: its tx is the SODAX SDK's unsigned transaction for that family, as the SDK returns it raw (bigints as decimal strings, bytes as base64), built here from the checked intent; the quote's nextStep says how the family's wallet sends it. Where the SDK reads what the tx calls from the chain, the unsigned tx is checked first: Solana's calls against the packaged programs, Sui's call against the Swaps API's own build's package and the packaged state objects, a cancel against the packaged connection. A Sui tx carries its sender. Before building anything, a quote refuses (SWAP_MISMATCH) a live chain config whose asset manager or connection isn't the SDK's packaged one.
  4. Right after the swap is sent, sodax_swap_submit_and_track with the swap transaction's txHash (from a batch, the hash wallet_getCallsStatus reports, not the batch id), the quoteId and the chain (the quote's nextAction says so, in execute.afterSend). Nothing submits the swap to SODAX until this call, and a first call after expiresAt (within 30 minutes of it) relays the deposit for a refund instead; later than that, the server has dropped the quote and alerts its operators. From Sonic nothing is relayed: the swap tx itself creates the intent on the hub, and one never submitted is refunded there once expired, unless a solver filled it first (expired_awaiting_refund); one the hub no longer holds, filled or cancelled, is intent_closed. Follow each result's nextAction (see Next actions) until it's terminal; its afterSec says when to call again (retryAfterSec is only when the server expects news). A failed result's failure says how the swap service's record ended (cancelled, refunding, abandoned, cancel_to_recover or unknown), and its outcome where the funds are. A tx no node has seen comes with stopAfter, 5 minutes after the deadline, when it becomes source_not_found. It's polled until pollUntil, at most 15 minutes after the first call; after that the agent asks the user whether their wallet sent it instead of polling, and calls again once it did, or once after stopAfter. With its quoteId, such a tx is read from the chain at most once every 10 seconds per API key, however often it's tracked. EVM, Solana and NEAR nodes say when they have a tx not final yet (seenOnChain); Sui, Stellar and Injective nodes know one only once it ran. From any spoke, track reads what the relay signs: the messages the chain's connection emitted when the tx ran. It submits a tx holding exactly one deposit, sent by the asset manager from the quote's sender to their hub wallet with the quote's relay payload (from Solana, its keccak). A NEAR tx that failed after its deposit ran isn't submitted: it's reported as held, and alerts the operators. Nor is a tx whose events can't all be read: it's reported as unverified, which alerts with its quote. A non-EVM tx's hash goes as the wallet shows it.
  5. To cancel a swap that hasn't been filled, sodax_swap_cancel returns the cancel transaction for the wallet to send; then call it again with cancelTxHash. From Sonic the cancel goes through the user's wallet router and needs no relay: the second call confirms it on the hub (cancel_confirmed). A quoted swap from Sonic can be cancelled as soon as its tx is mined, before or after its deadline, without waiting for the swap service to have it. From a non-EVM chain the SDK builds the cancel here. From any spoke it's relayed once the tx ran and its connection emitted the user's message to their hub wallet with the intent's cancel payload (from Solana, its keccak); a cancel tx whose events can't all be read is relayed for the relay to check, as cancel_relayed with unverified. Without its quote, a swap whose tx events can't all be read isn't cancelled here (not_cancellable, unverified). No cancel is built for an intent the hub no longer holds, filled, cancelled or refunded (closed); one that closes after it's built fails when sent (cancel_failed), and the next call says it's closed.

sodax_get_balance reads a wallet's balance when the user isn't sure they hold enough (neither price nor prepare checks), and sodax_resolve_token looks a token up when another swap tool returns UNKNOWN_TOKEN. Swaps start on Sonic (the hub), an EVM spoke, or a non-EVM chain of a family listed in NON_EVM_SOURCE_TYPES (src/services/swap/sources/types.ts), and a price or prepare from another chain returns UNSUPPORTED_SOURCE naming the ones that can; sodax_check_chain_support says for any chain. The destination can be any SODAX swap chain. Bitcoin, Stacks and ICON aren't planned as sources for now. ICON is being retired. SODAX's Bitcoin swaps run through a Bound trading wallet (a 2-of-2 that Bound co-signs and broadcasts, behind a login token that expires in minutes), which an agent's wallet can't drive. A Stacks swap needs the sender's public key and post-conditions the wallet must add itself, and the SDK can't build a Stacks cancel yet (it passes the address where the public key goes). On Sonic the swap calls the intents contract directly, so its approval goes to that contract. A Stellar source whose trustline the SDK says has too little room for the amount is refused: the server doesn't build a changeTrust step. Every result the tools return carries what comes next (nextAction, and nextStep for an agent that reads text, see Next actions), and a requestId for the user to quote when asking for help: the request.id of the call's log records. An input that fails a tool's schema gets the MCP SDK's validation error instead, with no nextAction.

The server only returns transactions, so the agent also needs a wallet tool (or your app's signer) that can:

  • give the user's address on the source chain, for fromAddress;
  • switch to the chain a step's tx.chainId names, then send that tx (to, value, data) and return its hash; from a non-EVM chain, sign and send the family's raw transaction in the step (see step 2 above);
  • tell when a transaction is mined, since each step must be mined before the next;
  • optionally, send an EIP-5792 wallet_sendCalls, to use the quote's batch.

Next actions

Every swap tool result, errors included, carries a machine-readable nextAction, terminal (no tool call can move the result on any more) and, once a sent swap has ended, its outcome: succeeded, cancelled, refunding, failed (nothing was swapped), held (the deposit is safe on chain and SODAX recovers it) or unknown. nextStep says the same in a sentence: both come from one decision, so they don't disagree.

typeWho actsWhat the runtime does
call_toolthe agentcalls tool after afterSec, with args (on top of the last call's arguments when sameArgs); with until or maxAttempts it repeats while the result asks again, counting per retryKey across the workflow (only calls in a row when consecutive), then follows onExhausted
choosethe userpicks one of options, whose args go into next; picking none follows onDecline where there is one
providethe usergives fields, by name, for next; declining follows onDecline where there is one
confirmthe user, or the wallet when by: "wallet"agrees to summary (kind: swap, cancel, amount, or unsent_cancel: that cancel can never land), then next
executethe walletsends the result's steps (or its batch) in order, each receipt a success before the next; once the last is broadcast, makes the afterSend call with its hash. A bounded afterSend is counted before anything is signed, and past its bound nothing is
externalthe user, outside these toolssees reason; next, if there is one, once they say they've done it; if they don't, onDecline where there is one
nonenobodythe workflow is over

What a runtime keeps to:

  • Arguments. A result that found the swap gives complete args; everything else reuses the arguments of the call that returned it (sameArgs), with only the named fields replaced. The server never writes back a value it refused.
  • Sending. Don't start an execute past its expiresAt: prepare and confirm again. Save afterSend's arguments and the hash the moment the last step is broadcast, and make the call even if the quote just expired or the receipt then fails (a NEAR tx can fail after its deposit ran). From a batch, save the batch id at once and track the hash wallet_getCallsStatus reports: a resumed session reads it again and never resends the batch. Save every track call's arguments before making it, so a session resumed after the user corrected a hash or a chain uses theirs, and drop them again if the MCP SDK refuses them: the tool never saw them. A cancel's hash stays pending though, unless the refusal names it: the wallet may have broadcast it, so nothing offers another cancel until a call with that hash and corrected arguments.
  • Bounds. A call goes unbounded only when the server's clock forces a new answer (past a deadline) or it hands over to another tool's bounded actions. A call a person's answer leads back to is bounded too, under a key the answers don't change, so an agent answering for the user still stops: before a send the workflow then ends, after one it goes to the help desk. A workflow is one swap; keep its counts with what was sent.
  • Cancels. A cancel already sent is followed, never sent again. Any cancel call carrying a cancelTxHash (from the wallet, the user or the start, even with the swap already saved) makes it pending, and so does a cancel the wallet sent as a batch, by its batch id until wallet_getCallsStatus has the hash: a resumed session reads it with that hash first (while the batch has none, it tracks the swap, which sends nothing), a confirm of a cancel re-reads it (or waits for the batch's hash), and once it's relayed (cancel_relayed) its own bounded track takes over. A cancel's retries carry its hash. A new cancel replaces a pending one only once the wallet's own record shows it can never land (confirm of unsent_cancel, by: "wallet"): its nonce went to another transaction, or its blockhash expired. An agent's yes isn't that record. One swap gets at most three cancels, however they failed. A cancel the swap service has no record of is retried, then handed to track with the same arguments, which submits nothing in that state: it says what holds the deposit and alerts on it.
  • Handoffs. A person declining ends the loop; the saved hash resumes it later. An unknown type goes to a person. On a terminal external, show it before stopping.
  • No contract. A result with no nextAction came from the MCP SDK refusing the arguments before the tool ran (a text error with no structuredContent), or its output after: fix the arguments only when the message says the input was invalid, otherwise hand off, keeping any hash already sent.

The loop of the reference runtime the tests drive whole swaps with, src/tools/__fixtures__/nextActionRuntime.ts:

export async function run(host: Host, start: { tool: string; args: Args }): Promise<Ending> {
  // What was sent resumes from what was saved: a cancel with its hash (or its track, once relayed), a swap with its
  // hash. Nothing is priced, signed or sent again; a swap batch with no hash yet is handed back until the wallet has
  // one, and while a cancel batch has none the swap is tracked, the cancel still pending. A cancel the user says they
  // sent goes before a saved swap's track; one with refused arguments is called with the start's, given its hash.
  const pending = host.saved.cancel;
  const cancelHash = start.tool === "sodax_swap_cancel" ? start.args.cancelTxHash : undefined;
  const corrects = pending?.refused && cancelHash === pending.cancelTxHash;
  let call: Next | undefined;
  if (pending?.follow) call = await follow(host, {}, pending.follow, {});
  else if (typeof cancelHash === "string" && (!pending || corrects)) call = start;
  else if (pending) call = (await resumeCancel(host)) ?? (await resume(host, pending.args));
  else call = host.saved.swap ? await resume(host) : start;
  if (!call) return { stop: "handoff", result: {} };
  if ("stop" in call) return call;
  for (;;) {
    // Saved before the call: a corrected hash or chain is what a resumed session uses.
    const before = { swap: host.saved.swap, cancel: host.saved.cancel };
    keepSent(host.saved, call);
    const result = await host.call(call.tool, call.args);
    // The SDK refused the arguments: the tool never saw them, so a resume doesn't use them. A cancel hash it didn't
    // refuse was broadcast all the same: it stays pending, so nothing offers another cancel until they're corrected.
    if (typeof result === "string") {
      const sent = host.saved.cancel;
      Object.assign(host.saved, before);
      const kept = sent?.cancelTxHash !== before.cancel?.cancelTxHash && !/ at cancelTxHash$/m.test(result);
      if (sent && kept) host.saved.cancel = { ...sent, refused: true };
      return { stop: "no_contract", result: {} };
    }
    keepCancel(host.saved, result);
    // No nextAction: an older server. Hand it off, keeping what was sent.
    if (!result.nextAction) return { stop: "no_contract", result };
    const next = await follow(host, result, result.nextAction, call.args);
    if ("stop" in next) return next;
    call = next;
  }
}

async function follow(
  host: Host,
  result: ToolResult,
  action: NextAction,
  callArgs: Args,
  answer: Args = {},
): Promise<Next> {
  const go = (next: NextAction, more: Args = answer) => follow(host, result, next, callArgs, more);
  const exhaust = async ({ nextAction, terminal, outcome }: Exhausted) => {
    const ending = await go(nextAction, {});
    return terminal && "stop" in ending ? { ...ending, stop: "terminal" as const, outcome } : ending;
  };
  switch (action.type) {
    case "none":
      return { stop: "terminal", result, outcome: result.outcome };
    case "call_tool": {
      // A bound with nothing to follow once it runs out can't be kept: a person takes over, never an endless loop.
      const bounded = action.until !== undefined || action.maxAttempts !== undefined;
      if (bounded && (!action.onExhausted || (action.maxAttempts !== undefined && !action.retryKey))) {
        return { stop: "handoff", result };
      }
      // Bounded calls stop at `until`, or count per retryKey across the whole workflow.
      if (action.until && host.now() >= Date.parse(action.until) && action.onExhausted) {
        return exhaust(action.onExhausted);
      }
      const ranOut = count(host.saved, action);
      if (ranOut) return exhaust(ranOut);
      host.saved.lastKey = action.retryKey;
      await host.sleep(action.afterSec);
      return { tool: action.tool, args: { ...(action.sameArgs ? callArgs : {}), ...action.args, ...answer } };
    }
    case "execute": {
      // Never start a send past the quote's expiry: prepare and confirm again instead.
      if (action.expiresAt && host.now() >= Date.parse(action.expiresAt)) return { stop: "handoff", result };
      // A bounded afterSend counts sends, before the wallet signs anything: past it, nothing is sent.
      const ranOut = count(host.saved, action.afterSend);
      if (ranOut) return exhaust(ranOut);
      return send(host, result, action);
    }
    case "confirm": {
      // A cancel already sent is followed, never sent twice: one sent as a batch waits for its hash.
      const pending = action.summary.kind === "cancel" ? host.saved.cancel : undefined;
      if (pending?.follow) return go(pending.follow, {});
      if (pending) return (await resumeCancel(host)) ?? { stop: "handoff", result };
      // Only the wallet knows a tx it signed can't land any more: a yes from whoever answers isn't proof.
      const agreed = action.by === "wallet" ? await host.walletShows(action) : await host.ask(action, result);
      if (agreed !== true) return { stop: "declined", result };
      return go(action.next);
    }
    case "choose":
    case "provide": {
      const given = await host.ask(action, result);
      if (typeof given !== "object") return action.onDecline ? exhaust(action.onDecline) : { stop: "declined", result };
      return action.next ? go(action.next, { ...answer, ...given }) : { stop: "handoff", result };
    }
    case "external": {
      // Shown to the user before anything else: on a terminal result, this is the handoff. `next` runs only once the
      // person says they did what it asks.
      const done = await host.ask(action, result);
      if (action.next && done === true) return go(action.next);
      if (done !== true && action.onDecline) return exhaust(action.onDecline);
      return result.terminal ? { stop: "terminal", result, outcome: result.outcome } : { stop: "handoff", result };
    }
    default:
      // A type this runtime doesn't know goes to a person.
      return { stop: "handoff", result };
  }
}

/** Counts a bounded call against its retryKey: its `onExhausted` once the bound has run out. */
function count(saved: Saved, action: CallTool): Exhausted | undefined {
  const { maxAttempts, retryKey, onExhausted } = action;
  if (maxAttempts === undefined || !retryKey || !onExhausted) return undefined;
  saved.attempts ??= {};
  // A consecutive bound starts again after any other call: only failures in a row add up.
  if (action.consecutive && saved.lastKey !== retryKey) saved.attempts[retryKey] = 0;
  const made = saved.attempts[retryKey] ?? 0;
  if (made >= maxAttempts) return onExhausted;
  saved.attempts[retryKey] = made + 1;
  return undefined;
}

A prepared quote's top-level afterSend predates nextAction and will be removed in a later release: read execute.afterSend instead.

Safety

The swap tools never sign or move funds. They also:

  • refuse inputs that look like a private key, seed phrase or API key, and say so without echoing them;
  • trust only their own quote cache and chain data when tracking or cancelling;
  • reject slippage and deadlines outside their bounds instead of clamping them;
  • warn, never block, when a quote is worth more than SODAX_SWAP_USD_WARN USD;
  • refuse a quote whose output is worth under 90% of the amount sent (net of any partner fee) at the oracle's prices, and warn when the oracle can't price both sides;
  • pick canary or production once, at startup (SODAX_ENV), never per request;
  • take no RPC URL and no partner fee as a tool input;
  • keep keys and RPC URLs out of logs, and addresses out of analytics and alerts.

Tools

Network Configuration (9 tools)

ToolDescription
sodax_get_supported_chainsList all blockchain networks supported by SODAX for cross-chain swaps
sodax_check_chain_supportCheck whether SODAX supports a chain by name, ticker, or key (e.g. "Hedera", "HBAR")
sodax_get_swap_tokensGet available tokens for cross-network swapping, optionally filtered by chain
sodax_get_all_configGet full SODAX configuration (chains + tokens) in one call
sodax_get_all_chains_configsDetailed spoke chain configs with contract addresses and RPCs
sodax_get_relay_chain_id_mapChain ID to intent relay chain ID mapping
sodax_get_hub_assetsHub (Sonic) assets representing spoke tokens
sodax_get_money_market_tokensMoney market supported tokens by chain
sodax_get_money_market_reserve_assetsMoney market reserve assets

Intents & Solver (9 tools)

ToolDescription
sodax_get_transactionLook up an intent transaction by hash — status, amounts, and details
sodax_get_intentLook up a specific intent by its intent hash
sodax_get_user_transactionsGet intent/transaction history for a specific wallet address
sodax_get_volumeGet solver volume data (filled intents) with filtering and pagination
sodax_get_volume_statsGet aggregated solver volume statistics
sodax_get_orderbookGet current cross-chain orderbook entries from solver
sodax_get_solver_intentGet solver-side intent details and fill history
sodax_get_solver_oracleGet the solver's oracle prices for every supported (chain, token) pair
sodax_get_solver_quoteGet a swap quote from the solver (exact_input or exact_output)

Intent Relay (3 tools)

ToolDescription
sodax_relay_submit_txSubmit a confirmed spoke-chain tx to the intent relay for cross-chain delivery
sodax_relay_get_transaction_packetsList every cross-chain packet emitted by a source tx
sodax_relay_get_packetFetch a single relay packet by connection serial number

AMM & Liquidity (2 tools)

ToolDescription
sodax_get_amm_positionsGet AMM liquidity provider NFT positions by owner
sodax_get_amm_pool_candlesGet OHLCV candlestick chart data for an AMM pool

Money Market (6 tools)

ToolDescription
sodax_get_money_market_assetsList all lending/borrowing assets and rates
sodax_get_money_market_assetGet detailed info for a specific asset by reserve address
sodax_get_user_positionGet a user's money market position (supply, borrow, health)
sodax_get_asset_borrowersGet borrowers for a specific money market asset
sodax_get_asset_suppliersGet suppliers (lenders) for a specific money market asset
sodax_get_all_borrowersGet all borrowers across all money market assets

Partners & Token (6 tools)

ToolDescription
sodax_get_partnersList SODAX integration partners across networks
sodax_get_partner_summaryGet volume and activity summary for a specific partner
sodax_get_token_supplyGet SODA token supply info (total, circulating, burned)
sodax_get_total_supplyGet SODA total supply as a plain number
sodax_get_circulating_supplyGet SODA circulating supply as a plain number
sodax_refresh_cacheClear cached data to get fresh results (at most once a minute)

Swaps (need an API key)

ToolDescription
sodax_swap_pricePrice a cross-chain swap; builds and holds nothing
sodax_swap_preparePrepare a swap: the transactions for the user's wallet to sign, and its quoteId
sodax_swap_submit_and_trackSubmit and track a swap once the user's wallet has sent it; repeated calls never resubmit
sodax_swap_cancelCancel a submitted swap that hasn't been filled: the cancel transaction to sign, then the relay (none from Sonic)
sodax_get_balanceA wallet's native balance on a chain and, optionally, one token's
sodax_resolve_tokenLook up a token on a chain: address, decimals and hub asset

See Swapping for the order they're called in.

Cross-Chain SDK Documentation (dynamic)

Tools prefixed with docs_ are automatically proxied from the SODAX docs MCP at docs.sodax.com. They update automatically when documentation changes — no manual sync needed.

ToolDescription
docs_search_sodax_docsSearch cross-chain SDK docs, integration guides, and code examples
docs_query_docs_filesystem_sodax_docsRead a full documentation page from the docs filesystem
docs_list_toolsList all available documentation tools
docs_healthCheck SDK docs MCP connection status
docs_refreshRefresh the tools list from the docs MCP

Example Prompts

Once connected, try asking your AI coding assistant:

Cross-Network Swaps & Tokens

  • "What networks does SODAX support for cross-chain swaps?"
  • "Get available swap tokens across chains on Base"
  • "How do I integrate cross-chain swaps with the SODAX SDK?"

Swaps (with an API key)

  • "Swap 10 USDC on Arbitrum for ETH on Base from 0x..."
  • "How much USDC does 0x... hold on Polygon?"
  • "Is my swap done? The tx hash is 0x..."
  • "Cancel that swap"

Solver Volume & Intent History

  • "Show me cross-network solver volume for today"
  • "Look up this intent transaction: 0x..."
  • "Get intent history for this wallet address"
  • "Quote me 100 USDC into SODA on Sonic"
  • "What's the current oracle price the solver has for bnUSD on Avalanche?"

Cross-Chain Relay

  • "Track the relay packets for this source tx: 0x..."
  • "Has packet conn_sn=42 from this tx been executed yet?"

Money Market & Lending

  • "What are the lending rates on SODAX money market?"
  • "Show me borrowing APY rates across assets"
  • "Get my money market position"

SDK Documentation

  • "How do I integrate with the SODAX cross-chain SDK?"
  • "Show me code examples for cross-network token swaps"
  • "What SDK methods are available for intent-based execution?"

Data Sources

SourceTypeCache
SODAX Backend API (api.sodax.com/v1/be)Live cross-network data2 min
SODAX Solver API (api.sodax.com/v1/intent)Oracle prices + swap quotes2 min (oracle); none (quote)
SODAX Intent Relay (api.sodax.com/v1/relay)Cross-chain packet trackingnone
SODAX Swaps API (api.sodax.com/v1/swaps)Swap token list, quotes and transactions (swap tools)2 min for the token list (up to 30 min while the API is down)
SODAX SDK (@sodax/sdk, @sodax/types)Swap tools: wallet balances, source-tx receipts, NEAR / Stellar recipient checks, address encoding, the pinned swap contractsPackaged with the release; balance reads kept 5 s; other chain reads uncached
AggregatorCross-chain swap token data2 min
SODAX Docs MCP (docs.sodax.com)SDK documentationAuto-sync

Local Development

Copy .env.example to .env first: it sets API_KEY_ENFORCEMENT=off, without which a server needs an api-auth verifier token to start.

# Install dependencies
pnpm install

# Run in development mode
pnpm dev

# Build for production
pnpm build

# Start production server
pnpm start

# Run the unit tests
pnpm test

CI & Local Checks

Every pull request, into any branch, runs .github/workflows/ci.yml, which executes the same four checks you can run locally:

CommandWhat it does
pnpm checkTsType-checks the project, and the scripts under scripts/, with tsc --noEmit (no build output).
pnpm lintRuns Biome (biome check .) over the repo. Add :fix to auto-apply safe fixes.
pnpm buildCompiles TypeScript and copies src/public into dist/.
pnpm testRuns the Vitest unit suite (src/** and scripts/**); the live contract tests are pnpm test:contract. With REDIS_TEST_URL set (CI starts a Redis for it), the swap quote store's tests also run against that Redis, on keys under test:<random id>: that they delete. Point it at a throwaway Redis, such as redis-server --port 6391 and REDIS_TEST_URL=redis://127.0.0.1:6391.
pnpm test:contractRuns the swap contract tests against the live Swaps API (production; SODAX_ENV=canary for canary). Quotes only: nothing is signed or sent. The Drift Check runs them against production; its scheduled and push runs go red when they fail.
pnpm e2e:canaryMakes one real 5 USDC swap between Arbitrum and Base through a running server's swap tools, signed by a funded test wallet (see below).

Canary swap E2E

.github/workflows/e2e-canary.yml runs pnpm e2e:canary on demand only (manual dispatch), against a server it starts in the runner with SODAX_ENV=canary. Canary runs on mainnet chains, so it moves real funds: 5 USDC from whichever of Arbitrum and Base holds more to the other, so runs alternate. It never runs on pull requests. A failure posts the failing stage to Discord: setup means the swap never started (install, build or the server start failed, or an env value is missing or malformed); read_wallet means the balance reads failed; balance_floor means the wallet needs a top-up (USDC, or ETH for gas); quote means no ready quote came back, its steps weren't the USDC approve and swap this route needs, or its minimum output was under 97% of the amount. Nothing was signed in any of these. send means the swap wasn't sent, or the node refused it and no node had it (an approve may have been mined): check the logged swap hash, if there is one; track means a swap may be on chain and needs a look; arrival means it was solved but the funds haven't reached the destination yet. The script's output is printed after the run, and the server log after a failure, unless a secret (the API key, the wallet key with or without 0x, an RPC URL's host or path) shows up in either: that fails the run on its own, Discord gets the stage a secret in the logs, and neither is printed.

The secrets live in the canary-e2e GitHub environment, limited to the default branch: E2E_WALLET_PRIVATE_KEY (a wallet used only here), E2E_SODAX_API_KEY (a canary key), DISCORD_WEBHOOK_URL, and optionally SODAX_RPC_URL_42161 / SODAX_RPC_URL_8453, which the workflow passes to the server and the script as their RPC_CONFIG. AMOUNT is at most 20. A manual run with an amount the wallet doesn't hold makes a deliberate red run that sends nothing; a manual dry run only quotes, to check the environment and key before the wallet is funded.

To run it locally, start a server with pnpm build && SODAX_ENV=canary API_KEY_ENFORCEMENT=off node dist/index.js (not pnpm start, which loads .env), then MCP_URL=http://127.0.0.1:3000/mcp?profile=swap SODAX_API_KEY=… pnpm e2e:canary with E2E_WALLET_PRIVATE_KEY exported from read -rs (not typed on the command line, where shell history keeps it). E2E_DRY_RUN=1 stops after the quote and needs no wallet. Don't run it while the workflow runs: both use the same wallet's nonces.

Git hooks (husky + commitlint + lint-staged)

pnpm install installs the hooks automatically via the prepare script:

  • pre-commit — runs pnpm checkTs, pnpm test, then lint-staged (which runs biome check --write on staged files, applying both formatting and safe lint fixes).
  • commit-msg — runs commitlint against the Conventional Commits spec. Messages like feat: add X pass; bad message is rejected.

To skip the hooks in a one-off emergency:

HUSKY=0 git commit -m "your message"

Don't make a habit of it — CI will still enforce the same checks on the PR.

Environment Variables

The server auto-loads a .env file on startup (via Node's --env-file-if-exists flag; the OpenTelemetry SDK that ships the logs needs Node ≥ 22.15.0). Copy .env.example to .env for local development; if no .env exists, every variable falls back to the default below. In production, Coolify injects these directly into the process environment.

Documentation truncated — see the full README on GitHub.

Reviews

No reviews yet

Be the first to review this server!