You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+51-26Lines changed: 51 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,12 @@
8
8
Teach your AI a website once. After that, it replays the same backend requests directly — no browser needed.
9
9
</p>
10
10
11
-
Schrute watches real browser traffic, turns repeatable actions into MCP tools, and reuses browser auth when needed. No hand-written API integration, and often no API keys, because Schrute learns from the requests your browser already knows how to make.
11
+
Schrute watches real browser traffic, learns the underlying API patterns, and turns them into replayable skills you can call via **MCP**, **REST API**, or **CLI**. No hand-written API integration, and often no API keys, because Schrute learns from the requests your browser already knows how to make.
12
12
13
-
- Faster repeated tasks
13
+
- Faster repeated tasks — browser once, direct HTTP after
14
14
- Less brittle than selector-only browser automation
15
-
- No hand-written API integration for every site
15
+
- Works through Cloudflare-protected sites via real-Chrome fallback
16
+
-**MCP** · **REST API** · **CLI** — use from AI agents, any language, or your terminal
16
17
17
18
Measured on repeated runs of tested workflows:
18
19
@@ -44,7 +45,9 @@ npm install -g schrute
44
45
schrute setup
45
46
```
46
47
47
-
Add to your MCP client config (Claude Code, Cursor, Windsurf, Cline, or any MCP client):
48
+
### MCP (AI agents)
49
+
50
+
Add to your MCP client config (Claude Code, Cursor, Windsurf, Cline):
48
51
49
52
```json
50
53
{
@@ -57,7 +60,23 @@ Add to your MCP client config (Claude Code, Cursor, Windsurf, Cline, or any MCP
57
60
}
58
61
```
59
62
60
-
Your AI agent now has `schrute_explore`, `schrute_record`, and 40+ other tools.
schrute explore https://example.com # Open browser, record traffic
69
+
schrute record --name my-action # Mark an action
70
+
schrute stop # Generate skills
71
+
schrute execute my_skill.v1 # Replay the learned API call
72
+
```
73
+
74
+
### REST API
75
+
76
+
```bash
77
+
schrute serve --http --port 3000 # Start HTTP server
78
+
curl http://127.0.0.1:3000/api/sites # Use from any language
79
+
```
61
80
62
81
## See it work in 60 seconds
63
82
@@ -121,7 +140,7 @@ Every example below was recorded on 2026-03-17, on macOS (Apple Silicon), over W
121
140
122
141
**Returned:**`{"origin": "49.43.xxx.x"}`
123
142
124
-
**What changed after learning:** Four browser navigations became four replayable MCP tools. Each call returns JSON directly — no page load, no DOM parsing, no selectors.
143
+
**What changed after learning:** Four browser navigations became four replayable skills — callable via MCP tools, REST API, or CLI. Each call returns JSON directly — no page load, no DOM parsing, no selectors.
125
144
126
145
---
127
146
@@ -150,7 +169,7 @@ Every example below was recorded on 2026-03-17, on macOS (Apple Silicon), over W
150
169
- Time: **1,033ms**
151
170
- Returned: Full Wikipedia search results (10 articles with titles, snippets, page IDs)
152
171
153
-
**What changed after learning:** A single MCP tool that takes a search query and returns structured Wikipedia results. The agent calls `schrute_execute({ skillId: "en_wikipedia_org.get_api_php.v1", params: { "query.srsearch": "quantum computing" } })` instead of navigating Wikipedia's UI.
172
+
**What changed after learning:** A single skill that takes a search query and returns structured Wikipedia results. Call it via MCP (`schrute_execute`), REST API (`POST /api/sites/en.wikipedia.org/skills/get_api_php`), or CLI (`schrute execute en_wikipedia_org.get_api_php.v1"query.srsearch=quantum computing"`) — instead of navigating Wikipedia's UI.
154
173
155
174
---
156
175
@@ -190,25 +209,39 @@ Every example below was recorded on 2026-03-17, on macOS (Apple Silicon), over W
190
209
191
210
**Site:**www.coingecko.com (finance/crypto)
192
211
193
-
**Why this workflow matters:**Shows how Schrute handles sites behind Cloudflare. Direct HTTP fails — the skill stays at Tier 3 (browser-proxied) and uses the browser's Cloudflare clearance cookies.
212
+
**Why this workflow matters:**CoinGecko is protected by Cloudflare Turnstile, which blocks headless browsers. When Schrute detects a Cloudflare challenge, it launches a real Chrome browser to attempt clearance, then retries the API call. If the challenge auto-clears (common for Turnstile), execution succeeds automatically. If manual intervention is needed, Schrute returns a 202 with a hint to solve the challenge in the opened browser.
**Direct HTTP attempt:** Failed after 9,129ms — Cloudflare returns a challenge page, not JSON.
226
+
**Execution with live-Chrome recovery:**
208
227
209
-
**Why it still works:** At Tier 3, Schrute executes the `fetch()` inside the browser context, which already has Cloudflare clearance cookies. The request succeeds where direct HTTP cannot. This skill will not promote to Tier 1 because the endpoint requires Cloudflare cookies — Schrute detects this and keeps it at the browser-proxied tier.
| 4 | Launches real Chrome, navigates to CoinGecko | Challenge clears (in tested run) |
238
+
| 5 | Retries API call through live Chrome session |**Success**|
239
+
240
+
- Total latency: **~7,400ms** (includes Chrome launch + challenge clearance)
241
+
- Returned: 288 BTC/USD price data points (24h) with timestamps and volumes
242
+
- Recovery status: `live_chrome_opened`
243
+
244
+
**What this shows:** Schrute handles Cloudflare-protected sites by escalating to real Chrome when headless Playwright is blocked. In the tested run, Turnstile auto-cleared and execution succeeded on the first call. Sites with interactive CAPTCHAs may require manual clearance in the opened browser window.
212
245
213
246
---
214
247
@@ -235,17 +268,9 @@ Every example below was recorded on 2026-03-17, on macOS (Apple Silicon), over W
All runs at Tier 3 (browser-proxied). Skills promote to Tier 1 (direct HTTP, ~5-50ms) after 5+ consecutive successful validations. Cloudflare-protected skills remain at Tier 3.
- Timing: `latencyMs` field from Schrute execution result
248
-
- Date tested: 2026-03-17
273
+
All runs at Tier 3 (browser-proxied) except CoinGecko which uses live-Chrome recovery. Skills promote to Tier 1 (direct HTTP, ~5-50ms) after 5+ consecutive successful validations. Cloudflare-protected skills remain at Tier 3 with real-Chrome fallback.
249
274
250
275
## Where Schrute works best
251
276
@@ -287,7 +312,7 @@ Before a learned skill executes, Schrute enforces:
287
312
288
313
Dangerous browser tools (`browser_evaluate`, `browser_run_code`) are blocked entirely.
289
314
290
-
For the full 9-gate security model, see [SECURITY.md](SECURITY.md).
315
+
For the full security model, see [SECURITY.md](SECURITY.md).
0 commit comments