StrataDocs

Strata MCP

Give a compatible AI client a direct, capability-gated connection to Strata discovery, Sonar quotes, and externally signed execution. The official MCP server uses the same strict SDK and live capability policy as every other public client.

Connect

Use the hosted endpoint from any client that supports Streamable HTTP:

Terminal
https://api.stratabook.app/mcp

Or run the same client-neutral server locally over stdio:

Terminal
npx -y @stratabook/mcp

Add it to your MCP client:

Terminal
{
  "mcpServers": {
    "strata": {
      "command": "npx",
      "args": ["-y", "@stratabook/mcp"]
    }
  }
}

That is the complete read-only setup. Market discovery, books, marks, candles, trades, quotes, public portfolios, maker status, and reputation work without a wallet, session key, autonomy setting, or environment variable. The Agents page shows the hosted URL, the universal local server command, and a generic configuration accepted by MCP clients.

Trading remains optional. When the user asks the local MCP to sign writes, run:

Terminal
npx -y @stratabook/mcp connect

The MCP generates the secret on the agent's computer and opens the Agents page with only its public key. The owner chooses on-chain limits and signs once; the loopback saves the credential privately and returns to the live Control Center. Run the same command again to replace the old key atomically. Nothing is pasted into chat or an environment-variable screen. npx -y @stratabook/mcp disconnect opens the exact session for an owner-signed revocation and removes the local credential.

Put an agent to work

Try prompts with an actual objective:

  • “Find the live Strata market for SOL/USDC, then quote selling 0.25 SOL. Return exact atomic output, both labelled fees, minimum output, price impact, and milliseconds until expiry.”
  • “Compare Sonar sell quotes for 0.1, 1, and 10 SOL. Show effective output per SOL and flag any quote that expires before the comparison is complete.”
  • “For every quote-ready USDC market, quote selling one whole base token using its discovered decimals. Rank the results by price impact and keep unlike output assets clearly separated.”
  • “Request a fresh quote for my saved market and amount. Stop if the capability is disabled, the market is paused, or the quote expires.”

On initialization, the server supplies the compact Strata Agent Harness. Clients that support MCP resources and prompts can also use:

  • strata://agent-router/v1 — the lean root intent tree. Select one leaf

before loading detailed context.

  • strata://agent-kernel/v1 — immutable authority, exact-money, stop, and

secret-handling rules loaded once and bound to branches by digest.

  • strata://agent-branch/{leaf}/v1 — only the owned tools, explicit shared

dependencies, capabilities, and workflow steps for the selected leaf.

  • strata://agent-tool-registry/v1 — the canonical implemented-tool registry:

one primary domain per tool, explicit dependency profiles, mode, and risk.

  • strata://agent-harness/v1 — the complete versioned workflow, stop

conditions, entrypoints, and safety rules for audit or broad integration.

  • strata://action-graph/v1 — live operation nodes, edges, capability gates,

and external signing boundaries.

  • strata://platform-graph/v2 — the complete customer-safe entity,

relationship, module, operation, and workflow graph with live gates.

  • strata_start — apply either the lean root router or one explicit branch to

a concrete user objective.

Use a connection-scoped profile to enforce the selected branch. Local clients pass --profile points or set STRATA_MCP_PROFILE=points; hosted clients use https://api.stratabook.app/mcp?profile=points. Unrelated tools are then absent from tools/list and rejected even if guessed. simple and advanced remain orthogonal interface modes; for example, local --mode advanced --profile limit_orders or hosted ?mode=advanced&profile=limit_orders exposes the full order lifecycle without importing TWAP or maker controls.

Available tools

  • strata_capabilities — inspect the current public contract and policy.
  • strata_action_graph — inspect the executable topology and live nodes.
  • strata_platform_graph — inspect every mapped public operation and workflow.
  • strata_status — read product readiness and the live mapped-operation count.
  • strata_markets — list markets currently visible to agents; each carries its opaque market_id and asset ids — the marketId every by-market tool takes.
  • strata_book — read the executable order book by opaque market ID (bids and asks, one size per price level).
  • strata_bbo — read the current best bid and best ask by opaque market ID.
  • strata_trades — read recent anonymized prints by opaque market ID (price, size, side, time).
  • strata_marks — read a sanitized current mark by opaque market ID.
  • strata_candles — read bounded OHLC history by opaque market ID.
  • strata_twaps — read sanitized wallet TWAP progress and receipts.
  • strata_twap_challenge — request exact external-signing bytes for a bounded TWAP.
  • strata_twap_cancel — request exact external-signing bytes for one owned cancellation.
  • strata_twap_prepare — prepare the canonical transaction from the TWAP action itself (one signature: sign only the returned transaction) or from a signed challenge.
  • strata_twap_submit — submit the externally verified and signed transaction idempotently.
  • strata_portfolio — the whole account in one public read, by wallet address: balances (total / available / locked, exact USD), positions, open orders, and recent fills across every live market. No signature, no market selection.
  • strata_portfolio_history — read genuine stored equity history in exact USD micros.
  • strata_market_making_status — a maker's products, live exposure, health, and kill state in one market — public by wallet address, no signature.
  • strata_market_making_reputation — a maker's reliability, tier, and signed-quote eligibility record — public by wallet address, no signature.
  • strata_market_making_prepare — start or stop a Strand/Current from a market label, spread, decimal base size, and duration; Strata resolves IDs, atoms, arrays, mark/tick math, expiry, and safety defaults.
  • strata_market_making_submit_and_wait — submit the externally signed quickstart transaction idempotently and return only after matching chain-derived maker state is observed.
  • strata_market_making_strand_prepare — prepare an externally signed Strand upsert, recenter, enable/disable, or cancellation.
  • strata_market_making_strand_submit — idempotently submit the exact maker-signed Strand transaction.
  • strata_market_making_current_prepare — prepare an externally signed Current upsert or cancellation; Current follows Strata's live mark and needs no separate publisher transaction.
  • strata_market_making_current_submit — idempotently submit the exact maker-signed Current transaction.
  • strata_market_making_intent_prepare — prepare a sponsored Vault-session post or permanent revoke for an existing curated IntentBook seat.
  • strata_market_making_intent_submit — submit that exact session-signed packet; exact retries return the original confirmed signature.
  • strata_vault_status — read sealed owner and external-session readiness state.
  • strata_vault_setup — one-signature onboarding: register an external session key for a wallet (only the wallet and the key are required; policy is optional). A first strata_vault_deposit that names the session key does the same in its own transaction.
  • strata_vault_deposit — prepare an exact owner-funded deposit by opaque market and asset ID.
  • strata_vault_withdraw — prepare an exact destination-bound owner withdrawal.
  • strata_vault_delegate — prepare owner-authorized revocation of one external session.
  • strata_vault_policy — prepare blocked or restricted withdrawal access for owner signing.
  • strata_vault_pause — prepare an owner-verified pause or resume transaction.
  • strata_vault_submit — submit an owner-signed prepared Vault transaction; Strata pays the fee (and any rent) when the preparation was sponsored and broadcasts it. Idempotent.
  • strata_vault_submission — read the durable outcome of a submission (submitted, confirmed, failed).
  • strata_points — the complete fleet-wide Points source of truth in one read: Season/epoch timing, weekly budget and lane weights, optional owner balance/breakdown, rank, standings, and finalization time. Available in default simple mode.
  • strata_rewards — read the current rewards season, standings, and optional owner score.
  • strata_referrals — read an owner's referral state and exact claimable reward atoms.
  • strata_referral_link — obtain externally signable link consent, then submit it.
  • strata_referral_claim — obtain externally signable payout consent, then request a claim.
  • strata_bugs — read an owner's redacted report states and confirmed bug points.
  • strata_bug_submit — obtain externally signable report bytes, then submit the signed report.
  • strata_quote — request a short-lived Sonar quote for an exact input.
  • strata_exact_output_quote — request a quote that delivers at least an exact output ("buy 1 SOL"); Strata resolves the input to spend.
  • strata_swap_quote — request a short-lived exact-input quote between catalog asset IDs.
  • strata_execution_challenge — request canonical external-signing bytes.
  • strata_execution_prepare — prepare the quote-bound transaction from the quote binding itself (one signature) or from a signed challenge.
  • strata_execution_submit — submit the externally signed transaction idempotently.
  • strata_execution_status — recover a restart-durable confirmed receipt.
  • strata_autonomy — read-only: the session autonomy level (ask / limits / instant), any USD ceilings, today's remaining budget, and how to change it. The agent may show this and offer to change it; nothing an agent calls can raise its own autonomy.
  • strata_execute_quote — one-shot instant swap: quote → verify → sign with the configured session key → submit, within the autonomy slider. Present only when a session key is configured.
  • strata_order_execute — one-shot instant order control (place/cancel/replace/batch), signed with the session key within the slider. Present only when a session key is configured.
  • strata_twap_execute — one-shot instant TWAP (schedule/cancel), signed with the session key within the slider. Present only when a session key is configured.
  • strata_market_making_intent_execute — one-shot IntentBook post or permanent revoke, verified and signed by the configured Vault session within the slider. Present only when a session key is configured.

Autonomy — the user's safety slider

By default this server never signs a trade. A user who wants unattended, popup-free trading opts in out-of-band — never through chat — with strata-mcp connect. The command owns the Vault session secret locally and defaults to instant, while the on-chain policy remains the hard ceiling.

Managed deployments can still use explicit environment configuration:

  • STRATA_SESSION_SECRET_KEY (+ STRATA_OWNER_WALLET) — a capped, revocable

session key registered on the Agents page (https://stratabook.app/agents).

  • STRATA_AUTONOMY = ask (default) · limits · instant.
  • STRATA_AUTONOMY_MAX_USD_PER_TRADE, STRATA_AUTONOMY_MAX_USD_PER_DAY,

STRATA_AUTONOMY_MARKETS — the extra limits ceiling.

ask prepares only; limits signs instantly up to the ceiling then stops and asks; instant signs within the on-chain session caps. Vault withdrawal, policy, session rotation, and pause always need the owner's wallet; the IntentBook seat's session-authorized revoke is its permanent risk exit. The host's own permission prompt (allow-list / always-allow) is the per-action gate on top.

An agent may read the level with strata_autonomy and offer the user a safety slider ("I'm on ask — I can prepare this but you'll sign it; raise the slider to trade instantly up to a cap you set"), but no tool an agent calls can raise its own autonomy. The only knob is the human's.

The tool list follows Strata's live public policy. An operator pause takes effect without waiting for an MCP or SDK update.

For normal maker operation, call strata_market_making_prepare, sign only its prepared.transaction_base64 externally, then pass its unchanged preparationToken to strata_market_making_submit_and_wait. The token contains no signing authority and keeps the pair restart-safe across stateless HTTP requests. Use the product-specific maker tools only when the strategy deliberately manages every low-level array and safety field.

For maker funding, initialize the market Vault if needed, activate the Strand or Current, then use strata_vault_deposit. Available collateral stays in that market while at least one control is live and returns to the canonical Vault balance after the last control is disabled, exhausted, expired, or cancelled.

The public machine-readable manifest is also available at https://api.stratabook.app/.well-known/strata-agent.json. The graph is discoverable at https://api.stratabook.app/.well-known/strata-action-graph.json and its live availability is returned by https://api.stratabook.app/sonar/action-graph. The complete live-gated platform graph is returned by https://api.stratabook.app/v2/action-graph.

Tolerance is not price impact

Two numbers on every quote are easy to mix up and are unrelated:

  • price_impact_pct is measured: how far the quoted fills' average price

sits from reference_price, the best price before your order. It comes from the book. It is not a setting.

  • maximum_tolerance_bps is yours: the most you accept below the quoted

output, 0 by default (the quoted output exactly). It is applied in minimum_output_atoms and echoed back on the quote.

A quote can show 0 impact with 25 bps of tolerance, or 40 bps of impact with 0 tolerance. Choosing a tolerance never changes the fills; it only sets the floor below which execution fails closed.

Both quote tools take maximumToleranceBps; most read-only calls omit it. The tool result states both numbers side by side.

Safe by design

Every MCP result is checked against the official Strata contract. The external agent owner controls permission and signer authority. Strata accepts only public keys, detached signatures, and signed transactions; it never requests private keys, seed phrases, or wallet secrets.