The 1inch MCP server provides nine tools. Five execution tools require authentication; four public tools work without it. For the conceptual overview, see the MCP server page.
Tool schemas describe parameters, not workflows. For single-step calls the schemas are enough, but several tools are one step of a multi-call flow (sign-then-resubmit, approvals, pairing) or accept raw paths the agent has to know. The AI Skills close that gap — each tool below notes what its skill adds and when the tool alone falls short. The reverse also holds: a skill is static context and executes nothing by itself; it always needs this MCP connection, plus authentication for the execution tools.
Authenticated tools (API key or OAuth)
These tools require authentication. Authenticate via an API key header or OAuth — see Authentication setup.
swap
Execute token swaps via 1inch. The server automatically finds the best rate across all available routes, handles token resolution, allowance checks, and transaction building — the agent only signs transactions where required. Supports same-chain and cross-chain swaps.
When the tool alone is enough — and when it isn't: a single quote (quoteOnly: true) or a classic swap is self-contained. Intent and cross-chain execution is a two-call flow — sign the returned typed data, then call swap again with signedOrder — and agents without guidance commonly stop after the first call or pick the wrong mode. 1inch-swap carries the per-mode signing guides and the quote-first comparison flow.
| Parameter | Type | Required | Description |
|---|---|---|---|
src |
string | Yes | Source token (symbol or address) |
dst |
string | Yes | Destination token (symbol or address) |
amount |
string | Yes | Amount in smallest units |
chain |
number | Yes | Chain ID |
from |
string | Yes | Sender wallet address |
quoteOnly |
boolean | No | If true, returns quotes without building a transaction |
preferredType |
string | No | "classic", "fusion", or "crosschain" (omit to auto-route) |
dstChain |
number | No | Destination chain ID (triggers cross-chain mode) |
slippage |
number | No | Slippage tolerance in percent (default 0.5) |
signedOrder |
string | No | Submit a previously signed Fusion/cross-chain order |
orderHash |
string | No | Order hash for submission |
Typical flow:
- Call
swapwith source/destination tokens and amount — the server finds the best rate automatically - Sign the returned transaction (
eth_sendTransaction) or typed data (eth_signTypedData_v4) - For Fusion/cross-chain: call
swapagain with thesignedOrderto submit
orderbook
Manage limit orders via the 1inch Orderbook API (v4.1). The server builds orders server-side using the Limit Order SDK — no SDK installation needed on the client.
When the tool alone is enough — and when it isn't: list queries are self-contained. Placing an order is a sequence the schema does not convey — build, then a possible approve transaction, then an eth_signTypedData_v4 signature, then create — and cancellation happens on-chain rather than through an API call. 1inch-orderbook walks the agent through that ordering and the approval handling.
Actions:
| Action | Description |
|---|---|
build |
Server-side order construction. Returns EIP-712 typed data for signing |
create |
Submit a signed order to the orderbook |
list |
Query orders by maker address, order hash, or browse all with pagination |
cancel |
Load order state and return on-chain cancellation guidance |
Build parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
action |
string | Yes | "build" |
chain |
number | Yes | Chain ID |
makerAsset |
string | Yes | Token to sell (symbol or address) |
takerAsset |
string | Yes | Token to receive (symbol or address) |
makingAmount |
string | Yes | Amount to sell (smallest units) |
takingAmount |
string | Yes | Amount to receive (smallest units) |
maker |
string | Yes | Maker wallet address |
expirationSeconds |
number | No | Expiration in seconds (default 600) |
Typical flow:
- Call
orderbookwithaction: "build"and your order parameters - Approve the maker asset for the Limit Order Protocol contract (address provided in the response)
- Sign the returned
typedDatawitheth_signTypedData_v4 - Call
orderbookwithaction: "create", passingorderHash,signature, andorderDatafrom the build response
product_api
Call any 1inch Business product API endpoint using your authenticated session. This single tool provides access to all 1inch APIs: Portfolio, Spot Price, Token, Gas Price, Web3 RPC, Balance, NFT, Charts, Transaction Gateway, and every other endpoint available in the 1inch Business platform.
For Portfolio v5.0 through this gateway, use paths starting with /portfolio/portfolio/v5.0/... (the first /portfolio segment is stripped when routing to the Portfolio service).
When the tool alone is enough — and when it isn't: the tool is a raw gateway — it accepts any path but does not tell the agent which endpoint or version answers a given question. If you already know the exact path, it is fully usable on its own; unguided agents instead tend to invent paths (404s) or misread units — Spot Price, for example, returns native token WEI unless currency is set. Three skills carry the exact call recipes: 1inch-wallet-data (portfolio, balances, history, NFTs, tokens), 1inch-market-data (spot prices, gas, charts), and 1inch-infrastructure (Web3 RPC, tx gateway, domains). When no recipe matches, the agent should confirm paths via the search tool rather than guessing.
| Parameter | Type | Required | Description |
|---|---|---|---|
method |
string | No | "GET" or "POST" (default "GET") |
path |
string | Yes | API path (e.g. /portfolio/portfolio/v5.0/general/current_value) |
query |
object | No | Query parameters as key-value pairs |
body |
object | No | Request body for POST requests |
walletconnect
Pair a non-custodial wallet with the MCP session via WalletConnect v2 so the assistant can request signatures and submit on-chain transactions for the user. Supports EVM and Solana namespaces (depending on the wallet). The MCP server never sees private keys — the wallet app shows every signature / transaction request and the user approves it directly.
When to use it: any flow that needs a real signature or eth_sendTransaction driven by the assistant — for example completing a swap, sending an order on-chain, or confirming an Aqua create_position / close_position — instead of pasting transaction data back into a wallet manually.
When the tool alone is enough — and when it isn't: the individual actions are simple, but the pairing flow has sharp edges the schema does not encode — pending status is a success state to keep polling (not an error), many mobile wallets reject EVM and Solana proposed together, and the QR expires after about 10 minutes. Agents without that context restart pairings or give up mid-flow. 1inch-walletconnect encodes those rules and the session handling.
| Parameter | Type | Required | Description |
|---|---|---|---|
action |
string | Yes | One of: "connect", "status", "sign", "send_transaction", "accept_terms", "disconnect" |
pairingTarget |
string | No (only with connect) |
What to advertise in the pairing proposal: "eth" (default, EVM only), "solana", or "both". Many mobile wallets fail when EVM and Solana are proposed together |
sessionTtlDays |
number | No (only with connect) |
How long to persist the WalletConnect session (days). Server clamps to a per-deployment maximum (default 30, max 365) |
method |
string | Yes (only with sign) |
"personal_sign", "eth_signTypedData_v4", "solana_signMessage", or "solana_signTransaction" |
params |
array | Yes (only with sign) |
Exactly two items, shape depends on method (see below) |
chainId |
number | No (only with sign/personal_sign) |
EVM numeric chain id when signing |
solanaChainId |
string | No (only with sign Solana methods) |
CAIP-2 chain id, e.g. "solana:5eykt4UsFv8P8NJdT7ipf5EZiJUfk8tXwnUS2esLgDU". When omitted, the first Solana chain on the session is used |
tx |
object | Yes (only with send_transaction) |
EVM: { to, chainId, data?, value?, from? }. Solana: { chainId: "solana:…", serializedTransaction: "<base64>", from? } |
address |
string | No (only with accept_terms) |
EVM address that signs the 1inch Terms of Use. Must belong to the active session. When omitted, the session's primary EVM account is used |
sign params by method:
| Method | params shape |
|---|---|
personal_sign |
[message: string, signerAddress: "0x…"] |
eth_signTypedData_v4 |
[signerAddress: "0x…", typedDataJsonString] |
solana_signMessage |
[message: string, signerPubkey: base58] |
solana_signTransaction |
[serializedTransactionBase64, signerPubkey] |
Typical flow:
connect— call withaction: "connect"(optionallypairingTarget: "solana"or"both"). The response contains a pairing QR (PNG resource link) and awc:URI. Desktop / scan UX: the assistant fetches the QR via MCPresources/readand renders or opens the PNG. Mobile UX: the response includesmobileDeeplinksfor curated wallets — tap one to open the wallet directly without scanning.- User approves in the wallet. The wallet shows the connection request; the user picks accounts/chains and approves.
status— call withaction: "status"untilkind: "session"is returned (or a clear error).kind: "pending"is a success state — keep polling.accept_terms— for anonymous Aqua writes, the connected wallet signs the 1inch Terms of Use once (personal_sign, no gas). Idempotent if already accepted. Required beforecreate_position/close_positionon an unauthenticated session.sign/send_transaction— drive the user's wallet for individual signatures or transactions. The user approves each request in their wallet app.disconnect— call withaction: "disconnect"to end the session and clear server-side pairing state.
Idempotent connect: calling connect again while a pairing is still in progress with the same pairingTarget returns the same wc: URI. Changing pairingTarget starts a new proposal and invalidates the previous QR.
Supported wallets
The connect response includes mobileDeeplinks for these curated wallets so users on mobile can pair with one tap. Any WalletConnect v2-compatible wallet can also pair by scanning the QR or pasting the wc: URI:
| Wallet | Chains |
|---|---|
| MetaMask | EVM |
| 1inch Wallet | EVM, Solana |
| Coinbase Wallet | EVM, Solana |
| Trust Wallet | EVM, Solana |
| Phantom | EVM, Solana |
| Solflare | Solana |
Error states
The tool returns a structured JSON error with kind: "error" and a code so the assistant can react:
code |
Meaning |
|---|---|
not_connected |
No active WalletConnect session — call connect first |
invalid_request |
Malformed input or wrong field for the chosen action (e.g. chainId on a Solana sign) |
solana_namespace_not_available |
Active session does not include Solana — reconnect with pairingTarget: "solana" or "both" and approve Solana in the wallet |
relay_* |
Transient WalletConnect relay error — retry, or guide the user to reconnect |
debug
Debug production issues by looking up request logs. Provide a correlation id (x-request-id from any API response) to trace a specific request, or specify a time window to retrieve all logs for your account.
When the tool alone is enough — and when it isn't: if you already have an x-request-id, the tool is self-contained. Without one, the agent needs to know the time-window mode's required parameters and that results are scoped to the authenticated organization and capped by your plan's log retention. 1inch-debug covers the mode selection and those scoping rules.
| Parameter | Type | Required | Description |
|---|---|---|---|
requestId |
string | No* | x-request-id (or correlation id) from API responses. When set, searches logs for this value; optional startTime / endTime narrow the window (defaults to the last 24 hours ending at endTime or now). |
startTime |
string | No* | RFC3339 start of the query window (required with endTime when requestId is omitted). |
endTime |
string | No | RFC3339 end of the query window. |
logLevel |
string | No | Filter by log level: "info", "warn", or "error". Omit to return all levels. Only applies to time-window mode (ignored when requestId is set). |
limit |
number | No | Max log lines (1–100, default 50). |
*Provide requestId, or both startTime and endTime, to list all logs in that window (when requestId is omitted).
Log retention: the time window you can query depends on the log retention period of your subscription plan.
Response shape: JSON with mode (request_id or logs), timeRange (start / end in RFC3339), count, and logs (array of entries). Each entry includes timestamp, message, and optional level and HTTP status code.
Public and mixed-access tools
The tools in this section are usable without authentication. The aqua tool is public: analytics and maker writes (create_position, close_position) work without an API key (pair WalletConnect and sign the 1inch Terms of Use). Taker actions (quote, build_swap) need an API key / OAuth session.
aqua
Analytics for 1inch Aqua, the programmable shared-liquidity layer, plus optional maker writes that preview, create, and close XYC AMM positions. A position is full range by default, or concentrated when you pass a price range. Query maker performance, browse positions, and pull per-position state, on-chain events, and volume series without installing the Aqua SDK. Analytics need no authentication. Writes are non-custodial: the user's wallet signs. Maker writes work without an API key: pair WalletConnect and sign the 1inch Terms of Use. An API key or OAuth session is optional.
For these actions in sequence, see the Aqua walkthrough, which opens a maker position from an AI client.
When the tool alone is enough — and when it isn't: list_opened and maker_stats work with nothing more than an address. The strategy_* actions need the full identifier tuple (chainId, maker, app, strategyHash), which only comes from earlier calls — agents that call them blind get 404s. Creating a position is two calls to create_position: the first (without confirmed) returns a preview and a short-lived previewRef; the second repeats the parameters with the returned openingPrice, the previewRef, and confirmed: true. Anonymous makers must pair WalletConnect and call accept_terms first. 1inch-aqua teaches the drill-down order, the preview-then-confirm flow, and the raw-path fallback for endpoints the tool does not cover.
Actions:
| Action | Description |
|---|---|
maker_stats |
Aggregated TVL, fees, APY, and strategy counts for one maker |
list_maker_strategies |
Paginated list of a maker's strategies, filterable by chain and lifecycle status |
strategy_overview |
Current state, performance, and token balances of a single strategy |
strategy_activity |
Paginated on-chain events (opens, closes, swaps) for a single strategy |
strategy_volume |
Time-bucketed volume series for a single strategy |
list_opened |
Cross-chain feed of currently open positions, optionally filtered by app contract |
create_position |
Two-phase: without confirmed returns a preview (market price, opening price, range, fee, amounts, advisories) and a previewRef; with confirmed: true + previewRef encodes (and optionally sends) the position |
close_position |
Permanently close a position (confirmed: true); tokens stay in the wallet |
quote |
SwapVM quote simulation calldata (authenticated B2B) |
build_swap |
Taker swap against a position (authenticated B2B only) |
Required parameters per action:
| Action | Required |
|---|---|
maker_stats |
address |
list_maker_strategies |
address |
strategy_overview |
chainId, maker, app, strategyHash |
strategy_activity |
chainId, maker, app, strategyHash |
strategy_volume |
chainId, maker, app, strategyHash |
list_opened |
none |
create_position (preview) |
chainId, maker, tokens |
create_position (confirm) |
chainId, maker, tokens, openingPrice, previewRef, confirmed: true |
close_position |
chainId, tokens, confirmed, plus strategy or strategyHash |
quote / build_swap |
chainId, strategy, tokenIn, tokenOut, amount |
Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
action |
string | Yes | One of the ten actions above |
address |
string | No* | Maker EVM address (maker_stats, list_maker_strategies) |
chainId |
number or array | No* | Single chain ID for the strategy_* actions and every write action. An array of chain IDs filters maker_stats, list_maker_strategies, and list_opened — omit it to include all supported chains |
maker |
string | No* | Maker EVM address (strategy_* actions, create_position) |
app |
string | No* | App contract address. Required by the strategy_* actions; optional filter for list_opened; optional on close_position (defaults to the chain's AquaSwapVMRouter) |
strategyHash |
string | No* | Strategy hash, 0x-prefixed 32 bytes (strategy_* actions; close_position accepts it instead of strategy) |
status |
array | No | Lifecycle filter for list_maker_strategies: ["open"], ["closed"], or both. Default ["open"] |
limit |
number | No | Page size. Max 500 for list_maker_strategies and strategy_activity (default 100), 100 for strategy_volume (default 10), 1000 for list_opened (default 100) |
cursor |
string | No | Opaque pagination cursor returned by a previous response |
sort |
string | No | "asc" or "desc" (default "desc") for strategy_activity, strategy_volume, and list_opened |
granularity |
string | No | Volume bucket size for strategy_volume: "1h", "1d" (default), "1m", or "1y" |
tokens |
array | No* | create_position: exactly two ERC-20 legs [{ "token", "amount" }, { "token", "amount" }], amounts in the token's smallest units as strings; native gas tokens are rejected. close_position: array of token addresses to withdraw |
openingPrice |
string | No* | Positive decimal, token1 per token0 in whole units. Derived from the leg amounts when the preview knows both tokens' decimals; a value you pass must agree with the legs. Required on the confirm call — echo the value the preview returned |
priceRange |
object | No | create_position: { "rawPriceMin", "rawPriceMax" } raw Swap VM prices (tokenGt / tokenLt in 1e18 fixed point) for a concentrated position. Omit for a full-range XYC AMM |
feeBpsIn |
number | No | create_position: taker fee in integer basis points, 1–500 (0.01%–5%). Default 30 |
previewRef |
string | No* | Opaque single-use reference returned by the create_position preview call; valid for about two minutes. Required together with confirmed: true on the confirm call |
confirmed |
boolean | No* | create_position: omit to preview, true (with previewRef) to encode. close_position: must be true — closing is permanent |
strategy |
string | No* | Encoded strategy bytes returned by create_position (close_position accepts strategy or strategyHash; required by quote and build_swap) |
tokenIn, tokenOut |
string | No* | Input / output token addresses for quote and build_swap |
amount |
string | No* | quote / build_swap: swap amount in smallest units of tokenIn (exactIn, default) or tokenOut |
exactIn |
boolean | No | quote / build_swap: true (default) when amount is the exact input |
threshold |
string | No | quote / build_swap: minimum output (exactIn) or maximum input, smallest units. Default 0 |
taker, deadline |
string, number | No | build_swap: taker wallet and optional Unix deadline in seconds |
execute |
boolean | No | Write actions with an active WalletConnect session: defaults to sending the transaction through the wallet; false returns calldata only (authenticated sessions only) |
walletSessionToken |
string | No | Durable WalletConnect token from walletconnect connect; pass it on anonymous writes after the MCP session rotates |
*Required for the actions named in the description — see the table above.
Typical flow:
- Get your bearings with
list_opened(system-wide) ormaker_stats(a single maker) - Call
list_maker_strategiesto obtain thechainId/maker/app/strategyHashcombination that identifies each strategy - Drill into one strategy with
strategy_overview(state),strategy_activity(events), orstrategy_volume(series) - Page through large result sets by passing the returned
cursorback in the next call - To open a position:
create_positionwithoutconfirmed→ review the advisories →create_positionagain with the same parameters, the returnedopeningPrice, thepreviewRef, andconfirmed: true. ThepreviewRefis single-use and expires after about two minutes; a stale one is refused and you preview again. Closing is permanent — passconfirmed: true.
Manage a position (maker writes)
- Pair WalletConnect (
connect→ approve →status) and callaccept_terms. An API key or OAuth session is optional - Call
create_positionwithoutconfirmed(two ERC-20 legs, optionalpriceRange/feeBpsIn) - Show the user the preview (opening price vs market, range, fee, advisories, suggested pairs from wallet balances). Adjust and preview again if needed
- Call
create_positionagain with the same parameters, the returnedopeningPrice,previewRef, andconfirmed: true. Approve tokens and sign in the wallet - Monitor with
strategy_overview/strategy_activityusing the fullchainId/maker/app/strategyHashtuple - To exit:
close_positionwithconfirmed: trueandstrategyorstrategyHash. Closing cannot be undone
Concentrated price ranges
priceRange bounds are raw Swap VM prices, not human-readable ones: P = tokenGt / tokenLt in 1e18 fixed point, where tokenGt is whichever of the two tokens has the higher address value. Compare the lowercase hex; symbol order is irrelevant. To convert a price the user states in their own units:
- Order the two tokens by address. The higher one is
tokenGt - Express the price as
tokenGtunits pertokenLtunit, inverting it if necessary - Scale for decimals:
rawP = humanPrice × 10^(18 + decimals(tokenGt) − decimals(tokenLt)) - Pass
rawPriceMinandrawPriceMaxas decimal strings
Show the user the conversion before confirming. If the price implied by the leg amounts falls outside the band, the position opens one-sided, snapped to the nearer bound; the preview reports oneSided and snapped and does not block it. A range cannot be edited in place — close the position and open a new one to move a band.
Availability
The full Aqua tool is available for B2C without a 1inch Business Portal account. Analytics need no authentication. For create_position / close_position, pair WalletConnect and sign the 1inch Terms of Use. Anonymous writes from restricted regions are blocked.
search
Search across all 1inch documentation, API references, and SDK guides. Returns matching results with titles, snippets, and links.
| Parameter | Type | Required | Description |
|---|---|---|---|
query |
string | Yes | Search query |
limit |
number | No | Results per page (1–100) |
page |
number | No | Page number (1-based) |
include_body |
boolean | No | Include full document body in results |
list_examples
List all available SDK code examples. Returns example names that can be used with the get_example tool. No parameters required.
Currently available examples:
- @1inch-examples/intent-swap — Intent/Fusion swaps for EVM and Solana
- @1inch-examples/limit-order — Limit orders for EVM chains
- @1inch-examples/cross-chain-swap — Cross-chain swaps (Fusion+)
get_example
Retrieve the full source code of an SDK example.
| Parameter | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Example name from list_examples |
file |
string | No | Specific file path (omit to get all files) |