@simular-ai/sai-mcp 0.2.2 → 0.3.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +85 -11
- package/SKILL.md +1 -1
- package/dist/server.js +693 -6049
- package/package.json +20 -5
package/README.md
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
# @simular-ai/sai-mcp
|
|
2
2
|
|
|
3
3
|
Give your coding agent a computer. This MCP server lets Claude Code, Codex,
|
|
4
|
-
Cursor or any MCP client hand tasks to [Sai](https://
|
|
5
|
-
computer-use agent
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
Cursor or any MCP client hand tasks to [Sai](https://platform.simular.ai),
|
|
5
|
+
Simular's computer-use agent, #1 on OSWorld 2.0 (73%). Sai uses apps and
|
|
6
|
+
websites the way a person does, by seeing the screen, clicking and typing, so
|
|
7
|
+
your agent can get work done where there is no API: web apps behind a login,
|
|
8
|
+
admin consoles, desktop software, forms with no import. Sai runs on a
|
|
9
|
+
cloud computer we host; the free plan includes one.
|
|
10
|
+
|
|
11
|
+
Run a workflow once and Sai can save it as code: later runs replay that code
|
|
12
|
+
and ask the model only where the screen matters, so they are faster and
|
|
13
|
+
cheaper, and the agent takes over when the UI changes.
|
|
8
14
|
|
|
9
15
|
You need Node.js 22.12 or newer and a Sai API key (`sapi_…`). Sign in at
|
|
10
16
|
[platform.simular.ai](https://platform.simular.ai) and create one under
|
|
@@ -12,6 +18,43 @@ You need Node.js 22.12 or newer and a Sai API key (`sapi_…`). Sign in at
|
|
|
12
18
|
|
|
13
19
|
Docs: [platform.simular.ai/documentation](https://platform.simular.ai/documentation)
|
|
14
20
|
|
|
21
|
+
## When to use Sai
|
|
22
|
+
|
|
23
|
+
Use Sai when:
|
|
24
|
+
|
|
25
|
+
- There is no API, or the API doesn't cover the task: vendor portals, admin
|
|
26
|
+
consoles, legacy web apps.
|
|
27
|
+
- The task needs a real browser session with someone's accounts. Sign-ins,
|
|
28
|
+
passwords and phone checks go to the human as an approval link.
|
|
29
|
+
- The work happens in a desktop app, on Windows, macOS or Linux.
|
|
30
|
+
- It is a one-off, and a script would cost more to write and keep working than
|
|
31
|
+
the task itself.
|
|
32
|
+
- You need to see what a real user sees: testing a sign-up flow, reproducing a
|
|
33
|
+
bug report.
|
|
34
|
+
- It is a workflow you will repeat (see below).
|
|
35
|
+
|
|
36
|
+
Write code yourself when a documented API or SDK does the job, the data is
|
|
37
|
+
already local, or you need exact, byte-for-byte output.
|
|
38
|
+
|
|
39
|
+
## Run once, replay as code
|
|
40
|
+
|
|
41
|
+
1. Run the task once with Sai.
|
|
42
|
+
2. Ask: `Save this as a replayable skill named invoice_export, with vendor and month as parameters.`
|
|
43
|
+
3. Next time: `Run invoice_export for vendor Acme, month March.` Sai replays
|
|
44
|
+
the code; when a step breaks because the UI changed, the agent takes over.
|
|
45
|
+
|
|
46
|
+
The research behind it: [Neuro-Symbolic Computer Use](https://arxiv.org/abs/2609.36927)
|
|
47
|
+
(Sep 2026). Learned policies cut per-run cost 15–217× and latency 3.4–5.1×, and
|
|
48
|
+
raised Pass^3 by 3.6–15.8 points over the base agent on OSWorld-Verified and
|
|
49
|
+
ScienceBoard.
|
|
50
|
+
|
|
51
|
+
## Example tasks
|
|
52
|
+
|
|
53
|
+
- `Open our staging site in Chrome, sign up with the test Gmail account, click the verification email, and tell me where the flow breaks.`
|
|
54
|
+
- `Log in to the vendor portal (it has no API) and list last month's invoices with their totals.`
|
|
55
|
+
- `Enter each row of the uploaded CSV into the supplier form at <url>, which has no import, and report the rows that failed validation.`
|
|
56
|
+
- `Follow the steps in this bug report in Chrome on Windows and describe exactly what happens at each step.`
|
|
57
|
+
|
|
15
58
|
## Install
|
|
16
59
|
|
|
17
60
|
Replace `sapi_YOUR_KEY` with your key.
|
|
@@ -44,8 +87,6 @@ Or in `~/.codex/config.toml`:
|
|
|
44
87
|
[mcp_servers.sai]
|
|
45
88
|
command = "npx"
|
|
46
89
|
args = ["-y", "@simular-ai/sai-mcp"]
|
|
47
|
-
# sai_task_wait holds for up to 110 s; Codex's default tool timeout is 60 s.
|
|
48
|
-
tool_timeout_sec = 120
|
|
49
90
|
|
|
50
91
|
[mcp_servers.sai.env]
|
|
51
92
|
SAI_API_KEY = "sapi_YOUR_KEY"
|
|
@@ -113,11 +154,13 @@ the view says so and offers **Watch here**.
|
|
|
113
154
|
|
|
114
155
|
## Environment
|
|
115
156
|
|
|
116
|
-
| Variable | Required | Meaning
|
|
117
|
-
| ---------------- | -------- |
|
|
118
|
-
| `SAI_API_KEY` | yes | Your Sai API key (`sapi_…`).
|
|
119
|
-
| `SAI_PUSH` | no | `1` turns on Claude Code channels (below). Leave it unset otherwise.
|
|
120
|
-
| `SAI_LOCAL_VIEW` | no | `0` turns off the local `watch_url` page.
|
|
157
|
+
| Variable | Required | Meaning |
|
|
158
|
+
| ---------------- | -------- | ------------------------------------------------------------------------- |
|
|
159
|
+
| `SAI_API_KEY` | yes | Your Sai API key (`sapi_…`). |
|
|
160
|
+
| `SAI_PUSH` | no | `1` turns on Claude Code channels (below). Leave it unset otherwise. |
|
|
161
|
+
| `SAI_LOCAL_VIEW` | no | `0` turns off the local `watch_url` page. |
|
|
162
|
+
| `SAI_CONTROL` | no | `0` leaves out the direct control tools (below), which are on by default. |
|
|
163
|
+
| `SAI_OSWORLD` | no | `1` adds the OSWorld tools (below); keeps the direct control tools on. |
|
|
121
164
|
|
|
122
165
|
## Claude Code channels (research preview)
|
|
123
166
|
|
|
@@ -134,6 +177,37 @@ claude --dangerously-load-development-channels server:sai
|
|
|
134
177
|
Only set `SAI_PUSH=1` together with that flag. Without it, pushed results are
|
|
135
178
|
dropped and your agent is told not to poll.
|
|
136
179
|
|
|
180
|
+
## Direct control (research preview)
|
|
181
|
+
|
|
182
|
+
Your agent can also drive the computer itself instead of
|
|
183
|
+
handing Sai a task: `sai_control_open`, then `sai_control_exec` blocks of Simulang
|
|
184
|
+
(JavaScript) that run on the computer, then `sai_control_close`. Each block
|
|
185
|
+
returns its value and console output, plus a screenshot as an image your
|
|
186
|
+
agent's own model sees. The Simulang reference is the MCP resource
|
|
187
|
+
`sai://simulang/reference`. Any account can use it; model calls the code makes
|
|
188
|
+
(`callLLM`, `ground`, `stateSatisfies`) are billed to your account as usual. Set
|
|
189
|
+
`SAI_CONTROL=0` to leave these tools out.
|
|
190
|
+
Docs: [Direct control](https://platform.simular.ai/documentation/concepts/direct-control).
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
claude mcp add sai -e SAI_API_KEY=sapi_YOUR_KEY -- npx -y @simular-ai/sai-mcp
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## OSWorld (research preview)
|
|
197
|
+
|
|
198
|
+
With `SAI_OSWORLD=1`, your agent can run OSWorld V2.1 tasks: `osworld_start`
|
|
199
|
+
sets a task up on a fresh cloud computer and returns its instruction, your agent
|
|
200
|
+
does the task through direct control of that computer, and `osworld_submit` grades
|
|
201
|
+
it (with `outcome: "fail"` when the agent concludes the task cannot be done; some
|
|
202
|
+
tasks are infeasible on purpose). `osworld_ask_user` answers questions for tasks that have a user, and
|
|
203
|
+
`osworld_abandon` ends an attempt without grading so you can start it again.
|
|
204
|
+
Setup and grading run on Simular's side; your agent only sees the instruction
|
|
205
|
+
and the computer. Needs Benchmarks access on your account.
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
claude mcp add sai -e SAI_API_KEY=sapi_YOUR_KEY -e SAI_OSWORLD=1 -- npx -y @simular-ai/sai-mcp
|
|
209
|
+
```
|
|
210
|
+
|
|
137
211
|
## Support
|
|
138
212
|
|
|
139
213
|
[support@simular.ai](mailto:support@simular.ai)
|
package/SKILL.md
CHANGED
|
@@ -39,7 +39,7 @@ A free account's first task of the day can stay in `running` for about two minut
|
|
|
39
39
|
|
|
40
40
|
## Rate limits and errors
|
|
41
41
|
|
|
42
|
-
- `429` on any call: wait 60 seconds and retry once. If it happens again, tell the user the account's hourly limit is reached (
|
|
42
|
+
- `429` on any call: wait 60 seconds and retry once. If it happens again, tell the user the account's hourly limit is reached (600 messages per hour on a paid plan, 60 on free; 1200 polls per hour) and stop. Never poll with `wait=0` in a loop.
|
|
43
43
|
- `400` on start with a `machines` array: several computers exist. Pick the one the user named, or ask with AskUserQuestion.
|
|
44
44
|
- `400 {"error":"unknown_model"}` or `403 {"error":"model_not_allowed_for_plan"}` on start: drop `model` or pick one from the `allowedModels` list in the reply.
|
|
45
45
|
- `403` on start: the `machineId` is not on this account. Call `GET /v1/agents/machines` and use one of the returned ids.
|