Agent tools over MCP#
A self-hostable tool interface lets agents discover, quote, simulate, trade and reconcile against any Seesaw stack.
@seesaw/agent-mcp is a Model Context Protocol (MCP) server that you run next to your agent. It
uses @seesaw/core to read and build transactions, connects over stdio, and needs only your own
Solana RPC endpoint. An indexer is optional, and it can be one that you run yourself. No
Seesaw-hosted service is required.
Modes#
| Mode | Key in the server | What the agent can do |
|---|---|---|
read-only (default) | none | Read markets, books, positions and orders; explain terms; quote; plan and simulate |
external-signer | none | All of the above. The agent also submits a transaction that the owner signed outside the server |
operator-policy | the owner's key, loaded at start-up | All of the above. The server also signs plans that the operator policy admits |
program-strategy-limits | the on-chain strategy's delegate | Plan and submit prefunded strategy orders, and reconcile attempts |
The mode, the owner key, the policy and the journal are set when the server starts. No tool can read a key, change the mode, change the policy, or approve a plan.
Workflow#
- Discover.
seesaw_discover_marketsranks markets from the configured Solana RPC and reports eligibility and snapshot consistency. It accepts market kind, settlement mint, and sort filters.seesaw_list_marketsalso lists markets from a configured indexer or a list of known market addresses. Thenseesaw_get_market,seesaw_get_orderbook,seesaw_get_config,seesaw_get_positionsandseesaw_get_open_ordersread and decode the accounts over RPC.seesaw_get_strategyreads a strategy by owner and ID, including its delegate, allowed markets, and capital use. - Inspect terms.
seesaw_explain_termsreports the resolution source, the start and end, the confidence guard, the fees, the settlement mint and its decimals, the market cap, and anything that stops a trade now. Each field says where it was read. - Quote.
seesaw_quoteestimates a fill against the decoded book, with fees included. - Simulate.
seesaw_plan_orderandseesaw_plan_cancelbuild the exact unsigned transaction and simulate it. A plan has aplanId: a SHA-256 over the reviewed action and the exact message bytes. TheplanIdis what the owner approves. A plan whose simulation fails gets noplanId. A plan expires at the earlier of its review deadline and its blockhash. In read-only mode,seesaw_plan_orderaccepts a strategy ID and order group to simulate prefunded placement with the strategy's registered signer. - Authorize. In
external-signermode, the owner signs the unsigned transaction with their own wallet. Inoperator-policymode, the policy admits or refuses the plan. Inprogram-strategy-limitsmode, the server checks the owner-configured on-chain strategy before its registered delegate signs a prefunded placement. - Submit. Call
seesaw_submit_signedwith theplanIdand the signed transaction, or callseesaw_executewith theplanIdin either server-managed signing mode. The server checks that the signed bytes are the planned bytes, records the attempt durably, and only then sends it. - Reconcile.
seesaw_reconcilereads the attempt's status from the chain. - Cancel or recover. Plan and submit a cancel.
seesaw_recoverreconciles every unresolved attempt. While an order attempt on a market is unresolved, the server refuses a new order on that market. A lost response never allows a second order. Bulk cancellations refund the trader ledger. Each plan covers one bounded page. After it lands, read the nonce and cursor withseesaw_get_cancel_session. To continue or abort, submit a fresh plan withsession.operationandsession.nonce.
What protects you#
| Control | Enforced by |
|---|---|
| Per-order bounds: review deadline, maximum debit or minimum proceeds, fee epoch, worst price | Program. The server sets them from the reviewed quote |
| Signed bytes equal planned bytes; only order and cancel routes can be signed or sent | Server process |
| Operator policy: allowed markets and settlement mints, capital per order, a capital budget that only counts up, inventory per market, maximum fee and slippage, expiry, allowed actions, a resting-order lease, a stop file. The rules follow the program-enforced strategy limits that are planned, and are stricter where the server cannot read the program's counters | Server process |
| No duplicate order after a lost response | Server process (durable attempt journal) |
| Funds at risk | The balance of the wallet that the server signs for |
The operator policy is not a program limit. A process that holds the key can sign anything,
so the policy protects you only as long as the server process and its host are not compromised.
Program-enforced strategy limits for agents are planned (roadmap phase 5, see
Strategy limits). Until they exist, use a dedicated wallet that holds only
the capital the agent may lose, and prefer external-signer mode.
No tool withdraws funds, transfers tokens, creates markets, changes referral or builder settings, or takes a fee recipient, creator, builder, referrer or token account from the agent. The server derives every account from chain reads. No tool combines several markets into one position or result.
Limits#
- The server acts for one owner key.
- Market settlement can use classic SPL Token or Token-2022. Outcome shares always use classic SPL Token.
- Simulation shows what the program would do now. It cannot promise a fill.
- An order attempt that cannot be resolved from the chain blocks new orders on its market until
the operator acknowledges it, with the server stopped (
seesaw-agent-mcp journal). It does not block cancels. An unresolved cancel blocks later cancels on its market in the same way.