API reference.
Complete reference for all 55 registered tools in sera-mcp, organized by category. Under the default external-signer mode, 54 tools are exposed via tools/list because sera.convert_and_send is local-signer only. The Sera MCP can be used from standard MCP hosts such as Claude, Cursor, ChatGPT, and OpenAI Agents SDK, with tool availability determined by server configuration.
Schema source-of-truth: sera-mcp/dist/index.js — these signatures are kept in sync with the running MCP. For Sera Protocol's underlying REST endpoints, see docs.sera.cx.
Discovery (6)
sera.list_currencies
List supported stablecoins from Sera's live token registry — symbols, fiat tags, addresses, decimals. Use before any swap. Cached 5 min server-side.
fiat— optional 3-letter fiat code filter (e.g.'SGD')
{ count, policy_allowed_symbols, tokens: [{ symbol, fiat_currency, address, decimals, policy_allowed }] }sera.get_markets
List the active trading-pair catalog from /markets. Pair existence ≠ tradeable now — pair with scan_markets for live quotability. Cached 10 min.
- None
{ count, markets: [{ pair, base, quote, ... }] }sera.doctor
One-call self-check: API health, executor_id, network sanity, contract addresses, VL batch limits, signer mode, policy summary, persistence state.
- None
{ network_label, base_url, overall_ok, checks: [{ name, ok, detail }] }sera.search_coins
Fuzzy-find stablecoins in Sera's live /tokens registry by case-insensitive substring match on symbol, name, or fiat tag (e.g. query='sgd'). Cached ~1 min server-side.
queryreq — substring matched against token symbol, name, or fiat tag (e.g.'sgd','usd','xsg')
{ query, count, matches: [{ symbol, name, fiat, address, decimals }] }sera.get_coin_metadata
Full registry metadata (symbol, name, fiat, address, decimals) for a single stablecoin by symbol from Sera's /tokens registry. Case-insensitive; returns an honest not-found object if the symbol is unknown.
symbolreq — token symbol to look up (e.g.'USDC','XSGD')
{ found, symbol, name, fiat, address, decimals }sera.get_coin_history
Historical FX observations for a coin's implied fiat pair (e.g. XSGD → SGD/USD). Replays locally logged /fx/rate points and requires SERA_HISTORY_DB — returns an honest disabled/empty response otherwise.
symbolreq — token symbol whose implied fiat pair to pull history for (e.g.'XSGD')days— lookback window in days (default 7, max 365)
{ found, symbol, pair, enabled, note?, observations: [{ timestamp, rate, source }] }Pricing & analytics
sera.get_fx_rate
Sera's reference FX rate between two ISO currency codes. Has bid/ask asymmetry — for execution price use get_quote. Cached 60s.
basereq — base ISO fiat (e.g.'GBP')quotereq — quote ISO fiat (e.g.'USD')
{ pair, rate, as_of, rate_24h_ago, change_pct }sera.compare_to_external_fx
Diff Sera's /fx/rate against Frankfurter (ECB published mid) to surface systematic pricing bias. Accepts ISO fiat or Sera token symbols.
basereq — ISO fiat or token symbolquotereq — ISO fiat or token symbol
{ pair, sera_rate, external: { source, rate, as_of }, deviation_bps, direction, ... }sera.multi_source_mid
Median FX mid across 3 free external sources (Frankfurter / open.er-api / exchangerate.host). Resilient to a single source being down.
basereq — ISO fiat or token symbolquotereq — ISO fiat or token symbol
{ base, quote, sources: [{ source, rate, as_of }], median, range_bps }sera.spread_radar
Liquidity-free FX consistency monitor across a currency basket. Flags forward/reverse pair asymmetry and triangular drift. Defaults: 150bps thresholds, USD/SGD/MYR/EUR/GBP/JPY basket.
currencies— array of ISO fiat codes (default USD/SGD/MYR/EUR/GBP/JPY)spread_alert_bps— flag forward×reverse deviation ≥ this (default 50)triangular_alert_bps— flag triangle round-trip deviation ≥ this (default 50)include_triangles— skip triangular checks when false (default true)
{ currencies, thresholds, summary, spreads, triangles, alerts, errors }Liquidity probing
sera.scan_markets
Fan out parallel /swap/quote probes across many pairs — the deal-scanner pattern in one call. Default: 50 pairs, 8 concurrent, $100 notional.
pairs— explicit[{ base, quote }]; else enumerated from/marketsnotional_per_quote— probe size infromunits (default 100)max_pairs— cap when enumerating (default 50)max_concurrency— bounded parallelism (default 8)only_policy_allowed— restrict to POLICY_ALLOWED_SYMBOLS (default true)gas_mode—receive_less|pay_more
{ summary: { pairs_tried, quotable_count, skipped_count, ... }, quotable, skipped }sera.find_deals
End-to-end deal scanner: scan_markets + per-pair external mid comparison, filtered ≥ min_deviation_bps. Returns ranked good_sell / good_buy / fair lists.
pairs— explicit pair list; else enumerated from/marketsnotional_per_quote·max_pairs·max_concurrencyonly_policy_allowed— restrict to allowed symbolsmin_deviation_bps— minimum edge to count as a deal (default 25)use_multi_source— benchmark = median of 3 sources (default true)gas_mode—receive_less|pay_more
{ summary, good_sell: [...], good_buy: [...], fair: [...], skipped, note }sera.maker_quote_ladder
Spread-ladder calculator for makers. Returns earnings at 5/10/15/25/50/100/200 bps for a pair + notional. Mid auto-fetched from multi-source median by default.
basereq ·quotereqnotionalreq — amount in the SELL legrole—maker_sell_base|maker_buy_base(default sell)mid— override the midmid_source—multi_source(default) |seraspreads_bps— spreads to ladder (default [5,10,15,25,50,100,200])
{ pair, base_fiat, quote_fiat, role, notional, mid, mid_source, ladder: [{ spread_bps, quote_price, earned, ... }], reference, interpretation }sera.probe_depth
Quote one corridor at a ladder of sizes to characterize price impact (bps relative to the smallest probe). Default sizes [100, 1000, 10000, 100000].
fromreq ·toreqsizes— human sizes to probe (default [100, 1k, 10k, 100k])gas_mode·max_concurrency
{ pair, gas_mode, quotes: [{ size, output, rate }], price_impact: [{ size, impact_bps }], notes }sera.round_trip_cost
Cost of A→B→A in bps — the spread floor a maker needs to cover their hedge. Returns absolute loss + bps interpretation.
fromreq ·toreqamountreq — human amount infromunitsgas_mode—receive_less|pay_more
{ pair, gas_mode, outbound, return, round_trip_loss_human, round_trip_loss_bps, interpretation }sera.infer_book
Synthetic order book for a pair Sera doesn't publish a book for. Probes both directions at log-spaced sizes to construct bid/ask ladders. For visualizing depth, not execution.
basereq ·quotereqsizes— probe sizes (default log-spaced 100→1M)gas_mode—receive_less|pay_more
{ pair, best_bid, best_ask, spread_bps, bids: [...], asks: [...], notes }sera.market_health
Quick yes/no on whether a corridor is quotable right now. Fires a single $1 simulate quote — cheaper than burning a full quote for pre-flight gating.
fromreq ·toreqgas_mode—receive_less|pay_more
{ pair, status: 'quotable' | 'no_liquidity' | 'unknown_pair' | 'error', detail }sera.fx_quote_diff
Compare Sera's reference /fx/rate against the executable rate from a real quote at a chosen notional. Returns deviation in bps.
fromreq ·toreqnotional— amount for the executable probe (default 100)gas_mode—receive_less|pay_more
{ pair, fiat_pair, notional, reference_rate, executable_rate, executable_output, deviation_bps, gas_mode, interpretation }sera.compare_corridors
Given a target output (currency + amount), rank candidate source currencies by USD-equivalent cost. "I need 5,000 SGD — which source does it cheapest?"
targetreq — output currency or token to delivertarget_amountreq — exact amount oftargetsourcesreq — candidate source token symbolsmax_concurrency·gas_mode
{ target, gas_mode, ranked, failed, cheapest, summary }Quote & plan
sera.get_quote
Single-use Sera swap quote. Returns route_params (EIP-712 Intent) to sign + uuid + fee breakdown. Pass simulate:true to probe with the burn address (no execution).
fromreq — source symbol, address, or fiattoreq — target symbol, address, or fiatamountreq — human amount infromunitsowner_address— funding wallet (required unless simulate=true)recipient— where output lands (defaults to owner_address)gas_mode—receive_less(default) |pay_moreexpiration_seconds— quote validity windowsimulate— read-only probe with burn address (default false)
{ uuid, route_params, fee_breakdown, expires_at, permit, from, to, human, estimated_usd_notional, ... }sera.prepare_swap
Alias of get_quote intended for execution-track flows. Same params and policy gates — use this name when intent is clearly "about to execute."
fromreq ·toreq ·amountreqowner_address·recipient·gas_mode·expiration_seconds·simulate
{ uuid, route_params, fee_breakdown, expires_at, permit, from, to, human, estimated_usd_notional, ... }sera.quote_recipient_amount
Inverse quote: "I want them to receive exactly X of currency B — what do I send of A?" Uses /fx/rate then two real quotes to tighten. Does NOT execute.
fromreq — token you're paying withtoreq — currency the recipient receivesrecipient_amountreq — amount recipient ends up withowner_addressreqrecipient— destination address
{ estimated_input_human, quote, target_recipient_amount }sera.find_cheapest_settlement_path
Compare gas-mode candidates (receive_less vs pay_more) for one A→B and rank by min_output. For planning; each candidate consumes its own UUID.
fromreq ·toreqamountreqowner_addressreq
{ ranked: [{ label, uuid, input, min_output, fee_breakdown }] }sera.batch_quote
Submit 1–50 quote requests in one round-trip via Sera's POST /swap/quote/batch. Each gets its own uuid and signed Intent; per-item errors don't fail the batch.
quotesreq — array of 1–50{ from, to, amount, owner_address?, recipient?, gas_mode?, expiration_seconds?, simulate? }
{ items: [{ ok, quote, error }] }sera.limit_watcher
Patient quote: poll /swap/quote on a fixed budget until target_rate hits (or budget exhausted). Default 5 attempts × 6s ≈ 30s blocking.
fromreq ·toreq ·amountreqtarget_ratereq — output_per_input threshold to fire atsidereq —sell_from(rate ≥ target) |buy_from(rate ≤ target)max_attempts— default 5, capped 30interval_seconds— default 6, capped 60gas_mode—receive_less|pay_more
{ pair, side, target_rate, amount, attempts, hit, last_rate, hit_probe, probes, next_step }Execution
sera.execute_swap
Submit a signed swap quote (uuid + EIP-712 signature) to Sera. Destructive — money moves. Quotes are single-use; re-quote on QUOTE_STALE/410. Gated by POLICY_DRY_RUN + daily cap.
uuidreq — quote UUID from get_quote / prepare_swapsignature— EIP-712 sig over route_params (required in external signer mode)route_params— optional; must exactly match what was returned for the uuidpermit_signature— EIP-2612 permit sig (required if quote carried a permit envelope)permit_deadline— permit deadline (required iff permit_signature given)
{ success, trade_id, server_estimated_usd_notional, ...upstream Sera /swap response }sera.convert_and_send
High-level: quote A→B and deliver to recipient in one call. Destructive — requires SERA_SIGNER_MODE=local. For external signer, use get_quote → sign → execute_swap.
fromreq ·toreq ·amountreqowner_addressreqrecipientreq — final destination for the output tokengas_mode—receive_less(default) |pay_more
{ quote, execution }Maker & orders
sera.place_order
Submit a signed limit order. Destructive — agent-signed. Agent picks order_id (UUID4), signs the Order struct under the Sera EIP-712 domain. Idempotent on order_id.
owner_addressreqsidereq —bid|askamountreq — quantity in base-token unitspricereq — quote per baseorder_typereq —'limit'from_addressreq — market BASE token addressto_addressreq — market QUOTE token addressorder_idreq — client-picked UUID4uuid_intreq ·signaturereq ·expirationreq
{ order_id }sera.cancel_order
Cancel an order by signing a CancelOrder struct (owner + uuid_int). Destructive. 5-min per-order cooldown (repeat → 429). In-flight fills may still settle.
owner_addressreqorder_idrequuid_intreqsignaturereq
{ status }sera.cancel_all_orders
Bulk-cancel every open order for the authenticated wallet. Destructive. Kill-switch / pause-trading workflow. Requires SERA_API_KEY.
owner_addressreq — must match the authenticated API-key owner
{ cancelled: [...], failed: [...], skipped_cooldown: [...], total }sera.place_vl_batch
Submit 2–50 signed limit orders sharing one collateral pool. Destructive. Engine freezes only the largest single-leg cost. Siblings share owner_address, fromToken, and a VL group_id.
ordersreq — array of 2–50 signed orders (same owner_address + fromToken; shared VL group_id; sequential leg_id 0,1,2…)
{ order_ids, amendments, cancelled, fills, vl_group }sera.cancel_vl_batch
Cancel an entire Virtual Liquidity batch by signing a CancelVLBatch struct against the batch's vl_batch_id. Destructive.
owner_addressreqvl_batch_idreq — primary_id of the first legsignaturereq
{ status }sera.get_order
Full order record including settlement_summary (per-fill aggregation) and settlement_economics. Use to track fills or recover a lost uuid_int. Requires SERA_API_KEY.
order_idreq
{ ...upstream Sera GET /orders/{order_id} record }sera.list_orders
Rich filtering over the wallet's order history: status, type, symbol, side, price/amount/notional ranges, time bounds, sort. Filters apply before pagination. Requires SERA_API_KEY.
owner_addressreqstatus·type·symbol·side— filtersfrom_token·to_token·base_token·quote_token·has_errorcreated_after·created_before·sort_by·orderlimit(max 500) ·offset
{ total, orders: [...] }sera.get_fills
Per-fill list (maker/taker order ids, quantity, price, settlement_status, tx_hash, settlement_economics) filterable by order_status / settlement_status. Requires SERA_API_KEY.
owner_addressreqorder_status·settlement_status— filterslimit(max 500) ·offset
{ fills: [{ maker_order_id, taker_order_id, quantity, price, settlement_status, tx_hash, settlement_economics }] }sera.get_fills_for_order
All fills against a specific order_id with per-fill settlement_economics. Requires SERA_API_KEY.
order_idreqlimit(max 500) ·offset
{ fills: [{ quantity, price, settlement_status, settlement_economics }] }Treasury
Requires SERA_API_KEYsera.get_balances
Wallet + Vault balances for a wallet, normalized to human amounts. Requires SERA_API_KEY / SERA_API_SECRET.
owner_addressreq — wallet to query
{ owner_address, balances: [{ symbol, wallet, vault_available, vault_frozen, raw }] }sera.treasury_value
Aggregate balances across one or more wallets and value the portfolio in target_currency. Returns per-wallet rows + currency exposure breakdown.
owner_addressesreq — one or more 0x… walletstarget_currency— ISO fiat to value in (default USD)include_zero— include zero-balance lines (default false)
{ target_currency, total_value, wallets: [...], exposure_breakdown: [...] }sera.exposure_report
Slimmer cousin of treasury_value: just the currency mix and total. Use pre-trade ("am I over-exposed to MYR?").
owner_addressesreqtarget_currency— ISO fiat to value in (default USD)
{ target_currency, total_value, exposure: [{ fiat, value_in_target, pct }] }sera.rebalance_plan
Given target weights (by fiat code) and current balances, emit suggested swaps to rebalance. Pure planner — does not execute. Feed each trade into get_quote.
owner_addressesreqtarget_weightsreq —{ USD: 50, SGD: 30, MYR: 20 }(normalized)target_currency— default USDmin_trade_value— skip trades below this (default 10)
{ target_currency, total_value, target_weights_normalized, drift, trades: [{ from_fiat, to_fiat, value_in_target, note }], next_step }sera.pay_invoice
"I owe X of currency Y to address Z — given my source assets, what's the cheapest path?" Fans out across each candidate source and ranks by USD-equivalent cost.
owner_addressreq ·recipientreqamountreq — recipient receives this in target_currency unitstarget_currencyreq — ISO fiat the recipient wantssource_symbolsreq — stablecoins available to spendtarget_symbol— specific output token
{ invoice, ranked, failed, cheapest }sera.settlement_status
Query Sera /orders for trade history or a specific trade. Filter by trade_id, uuid, owner_address, status, limit. Requires SERA_API_KEY / SERA_API_SECRET.
trade_id·uuid·owner_address·status·limit— all optional filters
{ filters_used, result, note }Account & funds
Requires SERA_API_KEYsera.build_approve
Build an unsigned EIP-1559 ERC-20 approve() tx. Sign locally with the owner wallet, then broadcast via send_tx. Spender must be the live vault_address or sor_address.
tokenreq — ERC-20 token addressownerreq — owner wallet (matches API-key owner)spenderreq — vault or SOR addressamountreq — raw uint256 allowance
{ tx }sera.build_deposit
Build an unsigned deposit tx. Omit permit_* for the standard depositFund flow (needs prior approve); include them to combine approval + deposit via depositFundWithPermit.
tokenreq ·ownerreqamountreq — raw uint256 deposit amountpermit_signature·permit_deadline·permit_amount— optional EIP-2612 permit
{ tx }sera.build_transfer
Build an unsigned ERC-20 transfer() tx. Sign locally, broadcast via send_transfer.
tokenreqtoreq — recipient addressamountreq — raw uint256 amountfrom_addressreq — sender wallet
{ tx }sera.send_tx
Broadcast a locally-signed raw_tx from build_approve or build_deposit. Destructive. Sera validates the selector-to-target pairing.
raw_txreq — locally-signed raw transaction hex
{ tx_hash }sera.send_transfer
Broadcast a locally-signed raw_tx from build_transfer. Destructive.
raw_txreq — locally-signed raw transaction hex
{ tx_hash }Withdraw
Dual-signature flowsera.withdraw_request
Step 1 of the dual-signature instant-withdrawal flow. User pre-signs a WithdrawIntent under the Sera EIP-712 domain; returns the executor co-signature.
intentreq — WithdrawIntent{ user, tokens[], amounts[], recipient, deadline, uuid }user_signaturereq — EIP-712 sig over the intent
{ success, executor_address, executor_signature, error }sera.withdraw_build
Step 2 of dual-sig withdraw. Given the WithdrawIntent + user signature + executor co-signature, returns the unsigned executeInstantWithdrawDualSig transaction.
intentreq ·user_signaturereqexecutorreq — co-signing executor addressexecutor_signaturereq
{ tx }sera.withdraw_send
Step 4 of dual-sig withdraw. Broadcast the locally-signed executeInstantWithdrawDualSig raw_tx. Destructive. Only accepts calls targeting the live Sera contract.
raw_txreq — locally-signed raw transaction hex
{ tx_hash }History
Requires SERA_HISTORY_DBsera.fx_history
Sera /fx/rate observations logged by THIS MCP since since_hours_ago. Sera doesn't publish OHLC — over time the MCP becomes its own price feed.
basereq ·quotereqsince_hours_ago— lookback window (default 24)
{ enabled, pair, since_hours_ago, observation_count, observations }sera.fx_volatility
Stats over the fx_history window: mean, stdev, range_bps, annualized vol estimate.
basereq ·quotereqsince_hours_ago— lookback window (default 24)
{ enabled, pair, window_hours, observation_count, stats: { mean, stdev, min, max, range_bps, annualized_volatility_estimate }, note }sera.corridor_pnl
What would holding the long side of this pair have realized over the window? Mark-to-market on logged /fx/rate; excludes swap costs.
basereq ·quotereqsince_hours_ago— lookback window (default 24)
{ enabled, pair, window_hours, first_rate, last_rate, drift_absolute, drift_bps, quote_observation_count, ... }Signing & debug
sera.verify_signature
Round-trip a signed payload through Sera's /verify-signature endpoint — diagnose wallet-side signing issues (wrong domain, malformed typed-data, mismatched uuid_int) before burning a quote.
owner_addressreq ·sidereq (bid|ask)amountreq ·pricereqfrom_addressreq — base token ·to_addressreq — quote tokenorder_idreq ·uuid_intreqsignaturereq ·expirationreq
{ valid, recovered_address, expected_address, error }sera.permit_metadata
Whether a token supports EIP-2612 (permit_supported), the current owner→spender allowance, and — if supported — the EIP-2612 domain + next nonce.
tokenreq — ERC-20 to checkownerreq — wallet that may sign permitspenderreq — allowance target (vault/sor)amount— raw amount to compare against allowance (addsrequired)
{ permit_supported, token, owner, spender, current_allowance_raw, nonce?, domain? }MCP resources & prompts
Resources (5)
Browseable static catalogs the host can show.
sera://help/tools— full tool reference (this page, machine-readable)sera://catalog/currencies— all supported stablecoinssera://catalog/markets— all trading pairssera://policy/current— active policy preset + capssera://network/status— chain + indexer status
Slash prompts (4)
Pre-templated prompts that hosts surface as commands. Type /deal_scan in Claude Code, etc.
/deal_scan— find FX deals across all pairs above an edge threshold/treasury_brief— multi-currency exposure report + drift/invoice_optimizer— cheapest source for a given target payout/fx_integrity_check— triangular-arb scan across a fiat basket
Source: github.com/sera-cx/sera-mcp. Schema-validated against the running MCP. Last sync: v0.8.3.