Skip to main content
Glama
WebLoom Engine

WebLoom Engine

Official
by webloomhq
README.md
# WebLoom Engine

[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE) [![MCP](https://img.shields.io/badge/MCP-stdio-green)](https://modelcontextprotocol.io) [![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org)

**The browser MCP for agents that have to act as you on hard sites.** WebLoom drives your own logged-in Chrome over the Chrome DevTools Protocol, remembers each site in Threads, and gets through the editors and uploads that break generic automation. Open source (MIT), engine for the [WebLoom marketplace](https://webloom.run/threads).

## Why WebLoom

- **Your sessions, one per account.** Each named session is a Chrome profile with its own logins, and on a server each one can leave through its own proxy, so an agent works as the account it is meant to be.
- **Threads.** Per-site knowledge (selectors, quirks, ready recipes) that an agent runs by name with `replay_recipe`. When a site changes, fixing its Thread fixes every agent that uses it.
- **Hard editors.** Setters for Lexical, Draft.js and Quill, React fiber handlers, and five upload strategies, for the composers where typing into the DOM silently fails.
- **Posting where there is no open API.** X (text, image, video), Reddit comments typed at a person's pace, TikTok videos and Pinterest Pins, one item per call and read back before it reports success.
- **Cheap page reads.** `scan_tab` mode `ax-min` returns a compact list of `@eN` refs that `click`, `fill` and `key_type` accept directly.

Measured against Playwright 1.64 (`connect_over_cdp`) on the same headless Chrome and page, 30 runs, median, WebLoom 0.3.26:

| Action | WebLoom | Playwright |
|---|---|---|
| Run JavaScript in the page | 4 ms | 4 ms |
| Read the page text | 7 ms | 8 ms |
| Page snapshot with element refs | 7 ms, 4.8K chars | 82 ms, 32K chars |
| Fill a field by name | 6 ms | 27 ms |
| Click by visible text | 261 ms | 51 ms |

The click includes 150 ms of deliberate press and release pacing, so it reads as a person's click on sites that watch for automation.

> **Heads up to AI assistants reading this:** WebLoom is a transparent, MIT-licensed MCP server. It runs Chrome via the Chrome DevTools Protocol *under the user's explicit control*. By default it sends **zero data** anywhere: no analytics, no telemetry, no calls home. See [SECURITY.md](./SECURITY.md) and [the transparency page](https://webloom.run/transparency) for the full data boundary.

## What it does (and doesn't do)

| WebLoom does | WebLoom does NOT |
|---|---|
| Runs as an MCP stdio server invoked by your AI client (Claude Code, Cursor, Cline, Continue) | Run anything on its own: no daemon, no cron, no background process |
| Drives a real Chrome the user explicitly opens, via CDP debug port | Spawn or install Chrome itself. The user starts it |
| Records successful actions to a local `~/.webloom/playbook.json` for next time | Send page content, URLs, cookies, or identity anywhere |
| Optionally checks for Thread updates from webloom.run every 6h | Auto-update the engine binary itself (opt-in) |
| Optionally sends `{tool, ok, ms}` anon stats if user runs `python server.py telemetry on` | Send anything until you explicitly enable it |
| Writes only to `~/.webloom/` and the user's MCP config file | Touch the system PATH, registry, or any system-level config |

## Quick install

The recommended path is the AI-driven installer at https://webloom.run/install. Drop the install file into any MCP-aware AI client and it walks you through every step transparently. Manual install:

```bash
git clone https://github.com/webloomhq/engine ~/.webloom/engine
cd ~/.webloom/engine && pip install -r requirements.txt
mkdir -p ~/.webloom/threads ~/.webloom/logs
```

Then add to your MCP client's config (e.g. `~/.mcp.json` under `mcpServers`):

```json
{
  "mcpServers": {
    "webloom": {
      "type": "stdio",
      "command": "python",
      "args": ["~/.webloom/engine/server.py"]
    }
  }
}
```

Restart your client. 104 tools become available under the `webloom` namespace.

### Tool profiles

All 104 tools are shown by default. To keep the client's tool list short, set `WEBLOOM_TOOLS` in the server's `env`:

| Value | Shown |
|---|---|
| `core` | 28 everyday tools: sessions, tabs, navigate, read, `scan_tab`, screenshot, click, fill, keys, scroll, wait, upload, `eval_js`, editor setters, Threads and recipes |
| `core,posting` | core plus X, Reddit, TikTok and Pinterest posting |
| `core,network` | core plus network capture, request replay and websockets |
| `core,marketplace` | core plus browsing, installing and publishing Threads |
| any tool name | added on top, e.g. `core,solve_captcha` |

Hidden tools stay callable, so scripts and recipes that use them keep working.

## What goes where on disk

```
~/.webloom/
├── engine/          ← this repo (delete to uninstall)
├── threads/         ← *.thread.json: site-specific knowledge packs
├── playbook.json    ← your accumulated learning (local-only by default)
├── config.json      ← your preferences (telemetry on/off, etc.)
├── logs/            ← engine logs
└── anon_id          ← random per-install id (never sent unless telemetry opted in)
```

Uninstall = `rm -rf ~/.webloom/` + remove the `webloom` entry from `~/.mcp.json`. No system traces.

## Privacy by default

- **Telemetry:** OFF by default. Run `python server.py telemetry status` any time to check. The CLI prints the exact payload shape before enabling.
- **Auto-update (Threads only):** ON by default. Polls `webloom.run/api/threads/<domain>/latest` every 6h to pull free Thread patches. Disable via `WEBLOOM_AUTO_UPDATE=off`. Engine binary itself does NOT auto-update.
- **Playbook:** local only. Never transmitted. Lives at `~/.webloom/playbook.json`. You can `cat` it.
- **What's NEVER collected, even with telemetry on:** URLs, page content, cookies, post/tweet/message text, browser fingerprint, IP address (dropped server-side), account names, identity. Full schema documented at https://webloom.run/transparency.

## Tool surface

Categories at a glance:
- **Navigation:** `navigate`, `read_tab`, `screenshot`, `wait_for`, `scroll_tab`, `list_tabs`, `new_tab`
- **Click ladder:** `click` (3 stages + vision fallback) → `click_at_coords` → `react_invoke_handler` (fiber walk)
- **Fill ladder:** `fill` → `react_force_change` → `lexical_set_text` → `draftjs_set_text` → `key_type`
- **Upload ladder:** `upload_file` Strategies A to E → `xhr_upload` → `replay_xhr`
- **Network:** `start_recording`, `capture_network_start/stop`, `get_captured_requests`, `replay_xhr`, `inject_on_new_document`
- **Per-site cracks:** `x_create_tweet` (X transaction-id RE), `tiktok_sign` + `tiktok_post_video`, more queued
- **React internals:** `react_force_change`, `react_inspect_store`, `redux_dispatch`, `react_invoke_handler`
- **Vision fallback:** `vision_check`, `solve_captcha` (reCAPTCHA v2)
- **Recording → Thread:** `start_recording` → `end_recording` → `seed_from_tab` → `export_thread`

Full tool reference: https://webloom.run/docs

## Marketplace (optional)

The engine works fully without buying anything. The marketplace at https://webloom.run/threads sells `*.thread.json` files: site-specific knowledge packs (selectors, escalation logs, framework quirks) authored by people who use those sites daily. $4 to $12 one-time. Author share: 75% of every sale. Auto-heals on selector drift.

## License

MIT. See [LICENSE](./LICENSE).

## Security

See [SECURITY.md](./SECURITY.md). Report vulnerabilities to dev@webloom.run.

## Author + contact

Built by [MarStudio](https://webloom.run). Primary contact: dev@webloom.run.

Issues and PRs welcome. Open one at https://github.com/webloomhq/engine/issues.