Sera Sera for Agents
v0.4.0 · open MCP · 32 tools live

Multi-currency settlement
for AI agents.

Most agentic payment infrastructure today is single-currency. The world isn't. Sera gives any agent — or any app — the ability to quote, convert, and settle across 40+ stablecoins and 20+ fiat currencies — USD, SGD, MYR, JPY, EUR, GBP, BRL, MXN, IDR, and more.

Build a cross-border payment app, an FX trading dashboard, a prediction market on FX, a treasury rebalancer, an x402-paid API, an AI agent — anything that needs a real FX layer underneath.

Open MCP, every host
External signer by default
Non-custodial settlement
Policy gates built in
Featured integrations
OpenClaw native MCP + plugin Hermes native + skill NanoClaw .mcp.json + Claude · Cursor · ChatGPT · OpenAI Agents · 5 more
Settle in any of these stablecoins
USDC· USDT· EURC· XSGD· JPYC· MYRT· TGBP· BRZ· BRLV· MXNT· IDRT· AUDD· CADC· NZDD· ZARP· CNGN· WARS· WCLP· WCOP· AEDZ·
The problem

Single-currency rails
break at the border.

An agent paying a Singapore vendor in a single dollar-denominated stablecoin pushes FX risk onto the recipient every cycle. An agent settling payroll in Manila that way means someone, somewhere, is converting and absorbing the spread.

The agentic payment stack today assumes one global currency. Real settlement doesn't work that way. Sera is the multi-currency settlement infrastructure underneath agents and apps — quote, convert, and settle in whatever currency the counterparty actually uses.

Choose your path

Four ways to ship a
Sera-powered integration.

Already have an agent stack? Install the MCP. Building one from scratch? Start from a template. Want it ready out of the box? Run the bundled agent. Or skip MCP entirely and call the protocol-level x402 endpoint.

Path A · Install
MCP + CLI

Have an agent (or none)

Adds the Sera MCP to Claude, ChatGPT, Cursor, OpenAI Agents SDK, OpenClaw, Hermes, NanoClaw, or any host that speaks MCP. Same install also ships a sera CLI for cron jobs, CI scripts, and ops debugging — no agent required.

Claude ChatGPT Cursor OpenAI SDK + 7 more
Install instructions →
Path B · Build
3 templates

Build an agent

Copy a starter — terminal chat, browser chat UI, or webhook responder — wired to the MCP. TypeScript, OpenAI Agents SDK by default.

chat-cli web-chat webhook
Use a template →
Path C · Run
One command

Use ours

The Sera Agent: a complete interactive multi-currency settlement assistant. MCP and LLM pre-wired. One npm install, one command.

npm start terminal interactive
Run the bundle →
Path D · Protocol
x402 HTTP

Skip MCP entirely

x402 endpoint. Pay USDC, deliver any of 40+ stablecoins. Standard 402 → pay → 200 flow. Drops Sera into any agent that already speaks x402.

HTTP x402 USDC EIP-3009
See the endpoint →
Build with Sera

A dozen things you can ship
this week.

Sera is FX + settlement infrastructure. An AI agent is one obvious thing to build on top — but not the only one. Each card below is a real product surface with a working tutorial, reference repo, or open issue you can claim.

Compatible hosts

Works with every
serious agent stack.

MCP is an open protocol. Anyone who builds with it gets Sera by adding three lines to their config. Three integrations have their own write-up below; the rest follow the standard MCP stdio pattern.

Agent flows

What agents do
with the toolset.

Six concrete agent behaviors that need more than one currency. Each maps to one or two MCP tool calls. Cost callouts compare typical TradFi rails to Sera execution at the same notional.

Cross-border invoice
$87 $2.50

Settle 5,000 MYR from a USD treasury

Agent identifies the cheapest source asset, generates a quote, signs the Intent, recipient receives exact MYR. Single tool call: sera.pay_invoice.

Treasury rebalance
10 wallets · 1 plan

Maintain a target multi-currency allocation

Agent values balances across wallets in any reporting currency, computes drift, emits suggested swaps. sera.rebalance_plan.

FX deal scanner
scans >25 bps

Surface corridors quoting better than reference

Agent probes corridors in parallel, diffs against multi-source external mid, ranks executable deals. sera.find_deals.

Maker spread calculator
5 → 200 bps ladder

Project earnings at any spread + notional

Returns the full spread ladder for a pair — quote price, delta, earnings — across institutional bps levels. sera.maker_quote_ladder.

Conditional execution
polls until trigger

Execute only when target rate is met

Polls quotes within a budget and surfaces the executable swap when threshold crosses. sera.limit_watcher.

FX integrity monitor
no liquidity needed

Detect pricing-source drift across triangles

Round-trip product across any three currencies should equal 1.0. Deviation surfaces inconsistencies or arbitrage. sera.spread_radar.

Install

Each path, end-to-end.

CLONE, BUILD, REGISTER (Claude Code example)
git clone https://github.com/Josh-sera/sera-mcp
cd sera-mcp && npm install && npm run build

claude mcp add sera --scope user \
  --env SERA_NETWORK=mainnet \
  --env POLICY_PRESET=standard \
  -- node $(pwd)/dist/index.js
VERIFY (in any agent session)
Call sera.doctor

# Returns overall_ok: true with green checks for sera_health,
# network_sanity, tokens_registry, signer_mode, policy.
SAME INSTALL ALSO SHIPS A CLI (for cron / CI / ops, no agent required)
# From the sera-mcp directory:
node dist/cli.js doctor
node dist/cli.js fx USD SGD
node dist/cli.js deals --min-bps 25 --json | jq

# Or after npm link / npm install -g:
sera doctor
sera ladder USDT JPYC 30000
sera spread-radar USD,SGD,MYR,EUR,GBP,JPY

For other hosts (Cursor, ChatGPT, OpenClaw, Hermes, NanoClaw, etc.) see the integrations folder. Run sera --help for the full CLI reference.

PICK A TEMPLATE, COPY, RUN
# Pick chat-cli, web-chat, or webhook-agent
git clone https://github.com/Josh-sera/sera-agents
cp -r sera-agents/templates/web-chat ~/my-sera-agent
cd ~/my-sera-agent && npm install
export OPENAI_API_KEY=sk-...
npm start

# Then customize SYSTEM_PROMPT in agent.ts / server.ts
# Add your own MCPs alongside sera in the mcpServers array
ONE COMMAND
git clone https://github.com/Josh-sera/sera-agents
cd sera-agents/sera-agent && npm install
export OPENAI_API_KEY=sk-...
npm start

# Interactive terminal chat. Try:
> What stablecoins do you support for SGD?
> How much USDC to deliver exactly 5,000 MYR?
> Run sera.doctor
DEMO MODE — NO WALLET REQUIRED
cd sera-agents/x402-service
npm install
npm run demo     # X402_MODE=demo, listens on :8402

# From another terminal:
curl -X POST localhost:8402/x402/swap \
  -H 'Content-Type: application/json' \
  -d '{"from_currency":"USD","to_currency":"MYR",
       "amount":100,"recipient":"0xVendor"}'

# 402 with payment_required + payment_id
# Retry with X-PAYMENT: <id>:demo-auth header → 200
32 tools, organized

Every primitive an
FX-native agent needs.

Each tool is callable from any MCP host, the bundled CLI, or programmatically. Full API reference → with method signatures, params, and response shapes.

Discovery 2 tools — list_currencies · get_markets
Live token registry from Sera's /tokens (40+ stablecoins) and the active trading-pair catalog (780+ pairs). Pair existence ≠ tradeable now — use scan_markets to find what's actually quotable.
Pricing & analytics 4 tools — get_fx_rate · compare_to_external_fx · multi_source_mid · spread_radar
Reference FX rates with bias detection. compare_to_external_fx diffs Sera against Frankfurter (ECB). multi_source_mid takes the median across three free providers. spread_radar flags pair asymmetry and triangular drift across a basket — runs without any liquidity.
Liquidity probing 5 tools — scan_markets · find_deals · probe_depth · round_trip_cost · infer_book
find_deals is the headline: scans markets in parallel, diffs each against external mid, ranks the deals. probe_depth characterizes price impact at a size ladder. round_trip_cost reveals the maker hedge floor. infer_book reconstructs a synthetic order book that isn't published as a primitive.
Quote & execute 7 tools — get_quote · prepare_swap · execute_swap · convert_and_send · quote_recipient_amount · find_cheapest_settlement_path · limit_watcher
Single-use quote + EIP-712 Intent. Pass simulate:true on get_quote to probe with no wallet. execute_swap enforces uuid binding + server-derived USD notional caps. limit_watcher polls until target rate hits — patient quote pattern.
Maker 1 tool — maker_quote_ladder
Spread-ladder calculator. Given a pair + notional + (optional) mid, returns earnings at 5/10/15/25/50/100/200 bps with notes on each tier. Mid auto-fetched from multi-source median by default.
Treasury 5 tools — get_balances · treasury_value · exposure_report · rebalance_plan · pay_invoice
Multi-wallet aggregation, currency exposure breakdown, target-weight rebalance planner, and pay_invoice — "I owe X in currency Y, what's the cheapest source asset?" Requires SERA_API_KEY.
Settlement 1 tool — settlement_status
Query Sera's /orders for trade history or a specific trade. Filter by trade_id, uuid, owner_address. Requires SERA_API_KEY.
History 3 tools — fx_history · fx_volatility · corridor_pnl
OHLC isn't published as a primitive. Set SERA_HISTORY_DB to a SQLite path and the MCP logs every fx_rate + quote call it serves. Over time, your install becomes its own price feed — series, volatility, mark-to-market PnL queryable.
Admin 1 tool — doctor
One-call self-check. API health, network sanity, signer mode, policy summary, persistence state. Run this first whenever something looks off.
Plus 5 MCP resources (browseable catalogs + help) and 4 slash-prompt templates (deal_scan, treasury_brief, invoice_optimizer, fx_integrity_check) hosts surface as commands. Open the full API reference →
x402 endpoint — Path D

Sera as an
x402 endpoint.

A thin HTTP wrapper that exposes the full Sera multi-currency settlement engine as a standard x402 endpoint. The calling agent doesn't need an MCP host, doesn't import a Sera SDK, doesn't sign EIP-712 Intents — it just speaks HTTP 402 → pay → 200. Underneath, every swap routes through Sera Protocol and settles on-chain.

Agent pays USDC
Standard x402 payment authorization, no Sera knowledge required.
Service swaps via Sera
Vault wallet executes the FX swap on Sera Protocol — non-custodial, on-chain.
Recipient gets target currency
MYR, SGD, JPY, EUR — any of 40+ stablecoins delivered to recipient address.

Endpoints

  • POST /x402/swap — main flow (402 → pay → 200)
  • POST /x402/quote — quote-only, no payment
  • GET / — service-discovery JSON
  • GET /health — ops probe

Run modes

  • demo — developer mode
    Mocks the payment verification AND the swap leg. Lets you test the protocol round-trip locally without a wallet or any real Sera transaction. Useful for first integration. Does not actually use Sera.
  • live — production
    Real EIP-3009 USDC payment verification, real Sera Protocol swap from a vault wallet, real on-chain settlement to recipient. Needs SIGNER_PRIVATE_KEY + RPC_URL. Every swap routes through Sera.
FULL FLOW — DEMO MODE
# 1. Run the service
cd sera-agents/x402-service && npm install && npm run demo

# 2. Initial request — get 402 with payment_required
curl -i -X POST localhost:8402/x402/swap \
  -H 'Content-Type: application/json' \
  -d '{"from_currency":"USD","to_currency":"MYR",
       "amount":100,"recipient":"0xVendor"}'

# 3. Retry with X-PAYMENT header
curl -X POST localhost:8402/x402/swap \
  -H 'Content-Type: application/json' \
  -H 'X-PAYMENT: <PAYMENT_ID>:demo-authorization' \
  -d '{"from_currency":"USD","to_currency":"MYR",
       "amount":100,"recipient":"0xVendor"}'

# Response: 200 with delivered + paid + trade_id
Source at x402-service/. Production needs a vault wallet + RPC URL + facilitator integration.
Why Sera

Single-currency rails
vs. a true FX layer.

Single-currency rails Sera for Agents
StablecoinsTypically one40+ across 20+ fiats
FX between currenciesNot supportedAtomic, smart-routed
Recipient settles inIssuer's currency onlyAny supported currency
Agent host coverageHosted SDKOpen MCP, every host
CustodyCentralized issuerNon-custodial, on-chain
Treasury awarenessNoneMulti-wallet, exposure, rebalance
Lock-inVendor railsOpen protocol, open MCP
Sera complements single-currency rails rather than replacing them. Use any stablecoin for inflows. Use Sera for FX. Settle in whichever currency the counterparty actually requires.

Multi-currency settlement,
made native.

32 tools. Every major agent host. The MCP is open source. Sera Protocol charges only on actual swap settlement, on-chain.