leantab

LeanTab logo

LeanTab

npm MCP Registry License: MIT

Let your AI use your browser for you, as lean text instead of screenshots.

LeanTab is a Chrome extension plus a small local MCP server. Together they let an AI agent (Claude, or any MCP client) read and operate the web pages you choose, in your real Chrome. It gets your logins and tabs, and it sees every frame of the page, as compact text instead of screenshots.

Why

Before AI agents, doing a task across a few web apps meant you: open the tab, find the field, copy, paste, click Save, check it worked, repeat. Browser automation scripts helped, but they broke whenever a page changed.

AI agents can now do that work. Screenshot-driven agents pay for an image after every click, and many page readers see only the top frame, which misses the iframes where many business apps keep their actual forms and reports.

LeanTab gives the agent a lean, structured text view of the whole page, every frame included, in the Chrome you already use:

# Order entry | https://app.example.com/orders/new | tab 12 | 3 frames
[nav "Main menu"]
 - [e1 link "Dashboard"]
 - [e2 link "Orders"]
[frame f2 "New order" app.example.com]
 Customer | [f2e1 input]
 Ship date | [f2e2 input ="12/04/2026"]
 Status | [f2e3 select ="Draft" opts:Draft / Open / Closed]
 [f2e4 btn "Save"] [f2e5 btn "Cancel"]

The agent acts on refs (f2e1 is element 1 in frame 2), and each action returns only what changed:

act fill f2e1 "Rivera Plumbing", click f2e4
step 1 fill f2e1: ok
step 2 click f2e4: ok
changes (1 added, 1 removed):
- Status | [f2e3 select ="Draft" ...]
+ Status | [f2e3 select ="Open" ...]
+ [role=status "Order 1042 saved"]

No screenshot was needed to know the save worked.

Measured: on an app-style page, one LeanTab view was about 10× smaller than one screenshot, and the result of an action came back in about 70 tokens. On long reading pages a full text snapshot can cost more than a screenshot. See bench/RESULTS.md for the method, all five pages, and the script to measure your own.

What it does

   
Every frame, one view A content script runs in each frame, including cross-origin, nested and about:blank frames. The results are stitched into one tree in page order.
Diffs, not re-reads act returns the lines that changed, usually a handful.
Batch steps Fill a whole form and click Save in one call with steps.
Pop-up dialogs handled confirm() and alert() raised during an action are answered and reported instead of freezing the agent.
Big tables table pages rows as CSV, and find searches every frame, even rows the snapshot left out.
Your browser, your logins It works in the Chrome you already use. No separate headless browser, and no passwords handed to anyone.
Many agents, one browser Several MCP clients can share one browser. Each agent keeps its own tab, and commands on a tab run one at a time.

Safety model

LeanTab gives software control of a logged-in browser, so it is strict about who can connect. It is also honest about what it can’t stop.

What LeanTab enforces

What LeanTab reduces, but can’t guarantee

What only you and your AI client can control

Install

Requires Chrome 116 or newer and Node.js 18 or newer.

  1. Extension. Install LeanTab from the Chrome Web Store. Or, from source: open chrome://extensions, turn on Developer mode, click “Load unpacked” and pick the extension folder.
  2. Server. Add it to your MCP client. For Claude Code:
    claude mcp add leantab -- npx -y leantab-mcp@0.2.2
    

    For Claude Desktop or another client, use the command npx with the args ["-y", "leantab-mcp@0.2.2"].

  3. Pair them. Run npx leantab-mcp pair, copy the LT-... code, open the LeanTab popup, paste it and click Save. Then click Allow LeanTab on all sites. LeanTab only touches a page when your agent sends a command.
  4. Try it. Open any page and ask your agent: “Use LeanTab to snapshot this page and tell me what’s on it.”

To allow uploads, set LEANTAB_UPLOAD_ROOTS to the folders the agent may upload from, separated by ; on Windows or : elsewhere, for example C:\Users\you\Pictures\to-upload.

Tools

Tool Use
snapshot Compact view of the page. mode=interactive (controls only, cheapest), full (default) or text. Takes scope=<ref>, frame=<id>, maxRows, maxChars.
act click, fill, type, select, check, uncheck, press, hover, focus, clear, scroll. Batch with steps. Returns a diff.
upload Attach a file from an allowed folder to an upload field, after your approval.
find Search every frame for text.
table Page through any table as CSV or JSON.
navigate URL, back, forward or reload. Waits for frames to finish loading.
wait_for Wait for text to appear or disappear.
tabs_list List open http(s) tabs.
tabs Open, select or close a tab.
frames The frame tree (rarely needed).
screenshot Last resort. ref=<element> crops to one element, even inside nested frames.

Known limits

Author

Made by Alex Estrella. Issues and ideas are welcome.

LeanTab is an independent project. It is not affiliated with or endorsed by Google or Anthropic. Chrome is a trademark of Google LLC.

License

MIT