Skip to content

Sai MCP

The Sai Model Context Protocol (MCP) server lets your agent read Sai markets and account data, preview a trade, and submit trading intents when a Sai session is available. Your MCP client launches sai mcp serve as a local process and communicates with it over standard input and output.

Install the Sai CLI first. Run the line for your client.

Claude Code
sai mcp install claude
Codex
sai mcp install codex
Cursor
sai mcp install cursor

Registration uses the installed sai executable on your PATH. Restart or reconnect your client after registering it. In Cursor, enable Sai in the MCP settings if prompted. Run sai mcp list to check the registration.

Ask your agent to call mcp_info first and report the network. Then ask it to call market_list and market_prices. This works without a wallet or session.

Use the Sai MCP to check the network and list the markets with their latest indexed oracle prices. Show the price timestamp when available.

Check the Keeper endpoint in mcp_info to identify the network. If the price timestamp is missing or at the Unix epoch, report the block height instead.

TaskToolsWhat You Need
Read markets and pricesmarket_list, market_pricesNo session
Read an accountaccount_overview, account_positions, account_balances, account_historyAn explicit EVM address, or a session to resolve the active account
Preview a tradepreview_open, preview_closepreview_open can estimate without an account. A preview for a specific account requires its session.
Follow an intentintent_waitAn intent key and its account address
Submit an intenttrade_open, trade_closeAn active session for the target account and the preview digest

mcp_info reports whether the server can submit through its session. The client can list trade_* tools while signed out. Those tools check for a valid session before submitting. Use Trading With the CLI and MCP to connect, preview, and confirm.

The MCP server resolves its endpoints at startup. If you change your CLI configuration or MCP launcher, reconnect and call mcp_info again. An important check before any preview is that the Keeper network and the account match what the trader expects.

See the Sai skill MCP reference for per-client configuration and the tool list. AI tools overview