Skip to main content
The SODAX MCP is a hosted Model Context Protocol server. Point an MCP-capable agent at it and the agent stops guessing: it can read the live chain and token lists, pull a real quote, look up an intent, and search these docs while it writes your integration. With a SODAX API key it can also make a swap for the user it is helping, without writing code, and the server checks each swap before the user’s wallet signs it.
The data and docs tools need no API key; the swap tools need one (API keys). Landing page and per-client notes: mcp.sodax.com.
The MCP never holds a wallet key and never signs: every tool that touches a transaction either returns it unsigned for the user’s wallet or takes the hash of one the wallet has already sent.

Add it to your agent

Most clients take the same JSON:
VS Code keys servers under servers instead:
For the swap tools, send your key in an x-api-key header, so they need a client that can set one (VS Code takes the same headers under servers):
In Claude Code: claude mcp add --transport http --scope user sodax https://mcp.sodax.com/mcp --header "x-api-key: <your SODAX API key>". The key is a secret: put it in your own client’s user-level config, never in a project file you commit or a config you hand to your users. The server sends it only on its own calls to the SODAX data, solver and Swaps APIs. An SSE endpoint is available at https://mcp.sodax.com/sse, with "type": "sse", for clients that do not speak streamable HTTP. SSE clients send x-api-key on the stream and on every message. Requests are rate limited per client IP (HTTP 429 with Retry-After), and every MCP response carries an X-Request-Id header to quote when you report a problem; the server’s README has the limits.

What it gives the agent

The landing page at mcp.sodax.com lists every tool, and https://mcp.sodax.com/api returns the running server’s list as JSON. Live-system tools: network and asset configuration (supported chains, chain configs, swap tokens, hub assets, relay chain-id map), intents and solver reads (quotes, orderbook, intent lookup, oracle prices), intent relay (submit and inspect packets), AMM pools and candles, money market reserves with their supply and borrow rates, user positions, partner receivers and fee summaries, and SODA supply. They cover the same public data as the HTTP API, so the agent works from today’s values rather than its training data. The lookups filtered by chain (swap tokens, hub assets, money market tokens, chain support) take a chain as the user names it: a name, ticker, key or EVM chain id. An ambiguous id is refused with the keys to pass instead. A tool with a format input answers in Markdown, or with format: "json" the data alone. Documentation tools: search and full-page reads over docs.sodax.com, plus tools to list, check and refresh them. Swap tools: resolve a token on a chain, read a wallet’s balance, price a swap and prepare it, then submit and track it, or cancel it.

Swaps

A swap moves real funds on mainnet, so test with a wallet holding only what you mean to swap.
The swap tools let the agent make a swap the user asks for. The agent also needs a wallet tool that can switch chains, send the prepared transactions from the user’s wallet (from a non-EVM chain, sign and send that family’s raw transaction), and tell when each is confirmed; the server’s README lists what that tool must do.

What the server checks before the user signs

Before sodax_swap_prepare hands the wallet anything to sign, the server checks that it is the swap the user asked for, and refuses a mismatch (SWAP_MISMATCH) instead of passing it on:
  • The intent matches the request field by field (amounts, deadline, chains, tokens, sender, recipient, partner fee) and comes from the user’s own hub wallet.
  • On an EVM chain, the swap transaction matches, byte for byte, the one the SODAX SDK builds, and an approve lets the swap contract spend only the swap’s amount. From a non-EVM chain, the SDK builds the transaction on the server.
An all-zero address, or an EVM recipient of 0x…dEaD, is refused as an invalid address. After the user sends, sodax_swap_submit_and_track submits only a transaction whose on-chain events show the prepared swap. The server’s README lists its other safety rules.

Make a swap

1

Price

sodax_swap_price takes each side as the user names it (a chain plus a symbol, a token address or native) and the amount, and returns what the user would receive. It builds and holds nothing, so the agent uses it to show or watch a price.
2

Prepare

Once the user is ready to sign, sodax_swap_prepare takes the same plus the user’s wallet as fromAddress (and toAddress unless both chains are EVM), and optionally the slippage and deadline. It returns the transactions to send: an approve when one is needed, with what it lets the swap contract spend, after a reset to zero for tokens that require it, then the swap. From a non-EVM chain there is one step: that chain family’s unsigned transaction. It also returns the least the user will receive: a tighter slippage makes a fill less likely, and an unfilled swap is refunded after its deadline. It holds the quote until its expiresAt.
3

Confirm and send

The agent shows the user the amounts. Once they confirm, the user’s wallet signs and sends each transaction in order, each confirmed before the next.
4

Submit and track

sodax_swap_submit_and_track takes the prepared quote’s quoteId (or, without it, the source chain) and the swap transaction’s hash. It checks the transaction on chain, submits the swap, and reports its progress. The agent makes it right after sending, before the quote’s expiresAt, and again while the result asks it to: from any chain but Sonic nothing submits the swap until this call, and a first call after expiresAt starts the deposit’s refund instead, within a window the server’s README gives. From Sonic the swap transaction itself creates the intent on the hub, where a solver can fill it before this call, and an expired one is refunded there.
  • Chains: a swap can start on Sonic, another EVM chain, Solana, Sui, Stellar, NEAR or Injective, and end on any SODAX swap chain. Bitcoin, Stacks and ICON can’t start one; a price from them names the chains that can.
  • Tokens: when the price or prepare tool can’t match a token, sodax_resolve_token looks it up and returns the match, or the candidates for the user to pick. The agent never guesses a token or an address.
  • Balances: neither tool checks them, so sodax_get_balance reads a wallet’s balance when the user isn’t sure they hold enough.
  • Cancel: sodax_swap_cancel cancels a swap that hasn’t been filled, once it’s submitted (from Sonic, as soon as its transaction is mined). The first call returns the cancel transaction for the user’s wallet; a second call with its hash relays it, or, from Sonic, confirms it on the hub.
  • Next step and help: every swap tool result carries a nextStep that tells the agent what to do next, and a requestId. When a swap needs help, the user gives the requestId and the transaction hashes to the SODAX team on Discord.

Profiles

A connection picks its tools with ?profile=<name> on the URL or the x-sodax-profile header. The server’s README has the stdio settings and the errors a bad setting returns.

Partner fee

A builder can take a fee on the swaps its agent quotes: add ?partnerAddress=<EVM address>&partnerFeeBps=<basis points> to the URL, or send the x-sodax-partner-address and x-sodax-partner-fee-bps headers. Set both or neither; the server’s README has the allowed range and the error a bad value gets. The fee is taken from the amount the user sends and is part of the quote. It is never a tool input, so the agent can’t change it.

MCP or @sodax/skills?

They solve different halves of the same problem, and they compose. Install both. Skills keep the generated code correct; the MCP keeps the values in it real. A swap the user wants made now is the MCP’s job; swaps inside your own app are the SDK’s, written with the skills.

Try it

Once it is wired, ask in plain language:
“Which networks does SODAX support, and what can I swap into on Solana today?”
“Look up intent 0x… and tell me which step it failed at.”
“Swap 5 USDC on Arbitrum to USDC on Base. My wallet is 0x….”
The last one needs an API key and a wallet tool (see Swaps). The agent shows the price and asks you to confirm, your wallet signs each transaction, and the agent tracks the swap until it’s filled. Follow up with “Is my swap done?” or “Cancel that swap”. The solver quote tool prices a pair without a key, with one wrinkle worth knowing: it quotes hub-chain (Sonic) assets, so the agent resolves the pair through the oracle tool first rather than passing a Solana or Base token address straight in. The swap tools take tokens as the user names them.

Next

AI coding agents

Install @sodax/skills so agents write v2-correct code.

Your first swap

Install → quote → execute on mainnet.

HTTP API

The same public data, callable directly.

Talk to the team

Missing a tool? Tell us what you needed.