← back

Agent docs

Two doors into the same engine: the MCP tools an agent calls directly, and the CLI the agent (or you) can drive from a terminal or script. Same daemon, same session, same knowledge cache either way. This page is the contract, not a tutorial.

MCP Tools

status
Full state in one call: API health, active session, stored credentials, and live browser windows.
browse
Headless fetch with session persistence. Fast, no interaction.
execute
Run a pipeline of browser steps. Auto-starts session, handles captchas, auto-escalates browser mode on bot-block.
session
Stop (save state) or clear (wipe) the browser session.
credentials
Store, list, or use encrypted login credentials. Store refuses to overwrite existing creds unless told to, blocks the 'login failed, re-ask for password' mistake.
knowledge
Query cached domain knowledge: login flows, selectors, known obstacles, captured API endpoints.
reverse-engineer
Capture a site's API: records the fetch/XHR calls made while driving it, auth, cookies, and saves .js/.ts client files.
remember
Save per-domain element anchors, target them as @a:<name> later, no re-finding. Self-healing: a failed anchor triggers re-discovery, not blind retries.
tabs
List and target tabs in your real Chrome (requires the browser extension).
clipboard
Read or write the machine's clipboard: read a code a site copied, stage text to paste.

Pipeline steps

Use with the execute tool. Steps run sequentially with a 20s stale-state timeout.

navigate
url
Go to URL
snapshot
-
List interactive elements with @e refs
find
role/name/text
Locate one element, return a ref
click
selector
Click element
human-click
selector | x,y
Human-like click
human-type
selector, value
Human-like typing
fill
selector, value
Fast fill (framework-aware events)
select
selector, value
Pick a native <select> option
read
selector
Read text content of an element
extract
expression
Evaluate JS, return result
evaluate
expression
Run JS (no return)
upload / paste / download
-
File upload, clipboard paste, download capture
screenshot
-
Capture current state
scroll
deltaY?
Scroll page
wait / wait-for
ms | selector
Wait for time or element
keyboard
key
Press key
login
domain
Fill login with stored creds
solve-captcha / recaptcha
-
Auto-detect and solve (requires ANTHROPIC_API_KEY)

API reverse engineering

Use the reverse-engineer tool to capture a site's API while your agent browses it. It records the fetch/XHR calls made while driving it, not static assets, including auth tokens, cookies, headers, and response bodies.

How to use it

"Reverse engineer the messaging API on this site"

The agent runs the same pipeline steps as execute, but records all network calls the page makes.

What it saves

auth.js
Shared cookies, tokens, Authorization header
getMessages.js
One file per endpoint: async function using fetch with auth
index.js
Re-exports all endpoint functions
README.md
Endpoint summary and dependency chain

Ask for TypeScript output to get .ts files with inferred types from the captured response bodies. A worked example: docs/example in the repo.

CLI reference

Everything above through a terminal instead of MCP, same daemon, same session. iframer-toolkit and iframer are the same binary; npx iframer-toolkit ... works without a global install.

iframer install
Install Chromium + MCP (skip if already installed)
iframer install mcp
Register MCP in Claude Code and Codex
iframer install extension chrome
Install the optional real-Chrome extension pairing host
iframer update [--check]
Update via npm (--check: report only)
iframer remove [chromium|mcp|extension]
Remove everything, or one piece
iframer status
Check system state and available modes
iframer execute <pipeline.json>
Run a pipeline, routes to the warm daemon (--json for raw)
iframer instances
List live browser windows (instanceId → current page)
iframer credentials add <domain>
Store encrypted login credentials
iframer credentials list / remove
List or delete stored credentials
iframer screenshot <url>
Take a screenshot
iframer browse <url>
Headless fetch with JS rendering
iframer reverse-engineer <url>
Capture a site's API to .js/.ts files
iframer session stop / clear
Save + close browsers, or wipe session data
iframer --cache / --cache <domain>
List cached domains, or print one domain's knowledge
iframer telemetry
Report estimated session tokens consumed by MCP tool calls

For the daemon, browser modes, and knowledge cache this all runs on, see architecture.

Open source · MIT license · 2026