Sera Sera for Agents / Docs / API reference
Reference

API reference.

All 32 tools exposed by sera-mcp, organized by category. Every tool is callable from any MCP host (Claude, Cursor, ChatGPT, OpenAI Agents SDK, etc.) and from the bundled sera CLI.

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.

01

Discovery

sera.list_currencies

Live registry of supported stablecoins. Pulled from Sera's /tokens endpoint, cached 5 min.

Params
  • chain_id opt — filter to one chain (default: all)
Returns
{ tokens: [{ symbol, address, decimals, chain_id, fiat_code }] }

sera.get_markets

Catalog of trading pairs (780+ active). Existence ≠ tradeable now — pair with scan_markets for live quotability.

Params
  • base opt — filter to pairs starting with this token
  • quote opt — filter to pairs ending with this token
Returns
{ markets: [{ pair, base, quote, market_id, status }] }
02

Pricing & analytics

sera.get_fx_rate

Sera's reference FX rate for a fiat pair. Cheap, cached, no liquidity required.

Params
  • base req — base fiat (e.g. 'USD')
  • quote req — quote fiat (e.g. 'JPY')
Returns
{ pair, rate, source, fetched_at, change_24h_pct }

sera.compare_to_external_fx

Diffs Sera's reference rate against Frankfurter (ECB) — surfaces bias.

Params
  • base req · quote req
Returns
{ sera_rate, external_rate, deviation_bps, external_source }

sera.multi_source_mid

Median across 3 free FX providers. Use as your truth-source for "what's mid really."

Params
  • base req · quote req
Returns
{ median, sources: [{ name, rate }], spread_bps }

sera.spread_radar

Triangular-arbitrage scan across a fiat basket. Round-trip product across (A,B,C) should equal 1.0; deviation in bps is implied edge. Runs without any liquidity.

Params
  • currencies req — array of 3+ fiat codes
  • min_bps opt — surface only deviations > this (default 50)
Returns
{ triangles: [{ a, b, c, edge_bps, direction }] }
03

Liquidity probing

sera.scan_markets

Probes every market in parallel for executable quotes at a probe size. Surfaces what's actually quotable now.

Params
  • probe_notional opt — default $1,000
  • limit opt — max markets to probe (default 100)

sera.find_deals

The headline analytical tool. Probes markets, diffs each against external mid, ranks the deals.

Params
  • min_bps opt — minimum edge (default 25)
  • notional_usd opt — probe size (default $1k)
Returns
{ deals: [{ pair, edge_bps, sera_rate, external_mid, notional }] }

sera.probe_depth

Characterizes price impact at a size ladder for a single pair.

Params
  • pair req
  • sizes opt — default [1k, 10k, 50k, 100k]

sera.round_trip_cost

Cost of going A→B→A at a given size. Reveals the maker hedge floor for a pair.

sera.infer_book

Reconstructs a synthetic order book that isn't published as a primitive, by binary-searching executable sizes.

04

Quote & execute

sera.get_quote

Single-use quote + EIP-712 typed data ready for the wallet to sign. Pass simulate:true to probe with no wallet.

Params
  • from req — source token symbol
  • to req — target token symbol
  • amount req — in from-token units
  • simulate opt — read-only probe (default false)
Returns
{ uuid, typed_data, expected_out, expiry, route_params }

sera.prepare_swap

Returns the unsigned route_params + signing payload — for advanced flows that want to inspect before signing.

sera.execute_swap

Submits a signed quote. Enforces uuid binding + server-derived USD notional caps.

Params
  • quote_id req — uuid from get_quote
  • signature req — EIP-712 signature
Returns
{ trade_id, tx_hash, delivered, status }

sera.convert_and_send

Quote-sign-execute-transfer in one tool call. Recipient gets the target asset directly.

sera.quote_recipient_amount

"How much source to deliver exactly N of target?" — solves the recipient-amount problem.

sera.find_cheapest_settlement_path

If multiple source assets could fund a target payout, returns the cheapest by all-in cost.

sera.limit_watcher

Patient-quote pattern: polls until target rate hits or budget runs out. Returns a ready-to-execute quote.

Params
  • from · to · amount req
  • trigger_rate req — execute when rate ≥ (or ≤) this
  • max_polls opt · interval_s opt
05

Maker

sera.maker_quote_ladder

Spread-ladder calculator. Returns earnings at 5/10/15/25/50/100/200 bps for a pair + size. Mid auto-fetched from multi-source median by default.

Params
  • pair req
  • notional_usd req
  • mid opt — override the mid
06

Treasury

Requires SERA_API_KEY

sera.get_balances

Token balances across N wallets, in raw units.

sera.treasury_value

Total value across wallets in any reporting currency. Uses Sera's reference rate for FX conversions.

sera.exposure_report

Currency exposure breakdown. Shows what % of treasury sits in each fiat denomination.

sera.rebalance_plan

Computes drift from target weights, emits the swap plan that brings drift to zero. Read-only — does not execute.

Params
  • wallets req — array of addresses
  • targets req{ USDC: 0.5, EURC: 0.3, ... }
  • reporting_currency opt — default USD

sera.pay_invoice

"I owe X in currency Y, what's the cheapest source asset?" Identifies cheapest source, generates quote, returns ready-to-sign Intent.

07

Settlement

Requires SERA_API_KEY

sera.settlement_status

Query Sera's /orders for trade history or a specific trade. Filter by trade_id, uuid, or owner_address.

08

History

Requires SERA_HISTORY_DB

sera.fx_history

Time-series of fx_rate / quote results that this MCP install has logged. OHLC isn't published as a primitive; this turns your install into its own price feed.

sera.fx_volatility

Annualized volatility computed over a window from logged history.

sera.corridor_pnl

Mark-to-market PnL on a notional position in a pair, using logged history as the price series.

09

Admin

sera.doctor

One-call self-check. API health, network sanity, signer mode, policy summary, persistence state. Run this first whenever something looks off.

Returns
{
  overall_ok: boolean,
  checks: { sera_health, network_sanity, tokens_registry, signer_mode, policy },
  policy: { preset, daily_volume_cap_usd, dry_run },
  persistence: { history_db_present, path }
}
10

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 stablecoins
  • sera://catalog/markets — all trading pairs
  • sera://policy/current — active policy preset + caps
  • sera://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/Josh-sera/sera-mcp. Schema-validated against the running MCP. Last sync: v0.4.0.