Claude Code
Give Claude Code a computer by adding the Sai MCP server.
View as MarkdownThe @simular-ai/sai-mcp server exposes Sai as MCP tools. Claude Code starts it over stdio and calls it like any other tool.
Install
claude mcp add sai -e SAI_API_KEY=sapi_... -- npx -y @simular-ai/sai-mcpAdd -s user to make it available in every project. Requires Node.js 22.12 or newer.
Verify
claude mcp listsai should be listed as connected. Then, in a Claude Code session:
Use Sai to open Notepad, type hello, and save it to the desktop as hello.txt.Environment
Tools
usage and sessionUsage are the task's and the session's model tokens and cost so far; see Token usage. decision is approve, approve_for_task or deny. timeout_s defaults to 90 and is capped at 110, under Claude Code's two-minute tool timeout. model is an id from sai_models or auto; it sticks to the session until changed, and the model only calls sai_models when you ask for a specific model.
What the model does
The server's instructions describe the loop, so you do not have to prompt for it:
sai_task_startwith the task.sai_task_waituntilstatusis notrunning.- On
needs_approval:sai_task_approvewhen the approval can be answered, otherwise showapproval_urlto you and wait again. - On
idle: reporttext.
There is no screenshot tool. Sai describes what it sees in text and progress events. To watch the screen yourself, open the watch_url link the agent gives you: see Watch Sai work.
Gotchas
- One conversation per computer. Pass
new_session: trueto start clean. - Files go through
sai_uploadfirst; then pass the returnedfile_idinfile_ids. - A free account's first task of the day can sit in
runningfor about two minutes while the computer starts. - If
sai_task_waittimes out, call it again with the returnedcursor. The task keeps running. sai_task_waitretries a gateway502,503or504on its own, three times with a growing pause, before reporting an error. Other statuses come back at once.
Optional: the sai skill
The package also ships a Claude Code skill that teaches the loop, and falls back to plain HTTP in a session where the MCP server is not loaded. Install it with:
npx -y @simular-ai/sai-mcp init-claude # for you: ~/.claude/skills/sai
npx -y @simular-ai/sai-mcp init-claude --project # for this repo: ./.claude/skills/saiRe-run it after upgrading to refresh the skill. It never overwrites a SKILL.md you edited unless you pass --force.