LeanTab MCP: let your AI agent use your real Chrome as text, not screenshots
Most of my web chores look the same. Open a tab, find the field, copy, paste, click Save, check that it saved, repeat in the next app. AI agents can do that now. But the browser tools I tried had two problems. The firs
Most of my web chores look the same. Open a tab, find the field, copy, paste, click Save, check that it saved, repeat in the next app.
AI agents can do that now. But the browser tools I tried had two problems.
The first was cost. Many agents look at the page through a screenshot, and they need another screenshot after every click to see what happened. One screenshot of my browser window is about 1,300 tokens, using Anthropic's published estimate for images. A ten-step form becomes ten pictures.
The second was iframes. A lot of business apps put the real form inside a frame, often on another domain. Page readers that only see the top frame miss the part you actually need.
So I built LeanTab.
What it is
LeanTab is a Chrome extension plus a small local MCP server (leantab-mcp on npm). Together they let Claude, or any MCP client, read and operate pages in the Chrome you already use, with your logins and tabs.
Instead of a picture, the agent gets a short text map of the page. Every frame is stitched into one view, including cross-origin and nested ones:
# 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 the refs. f2e1 means element 1 in frame 2. After an action, LeanTab 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"]
The agent knows the save worked without taking another screenshot.
The numbers, including where it loses
I measured one "look at the page" with LeanTab text against one screenshot of the same window. The script and method are in the repo (bench/RESULTS.md), so you can run it on your own pages. Tokens for text are estimated as characters divided by 4.
- Order form inside a cross-origin iframe: about 107 tokens for LeanTab's controls view, against about 1,282 for one screenshot. About 12 times smaller.
- Result of "fill the customer, click Save": a diff of about 70 tokens, including the "Order 1042 saved" message.
- npm package page: about 598 tokens for the controls view. The full text view was about 2,456, more than a screenshot.
- Hacker News front page: about 1,711 tokens for the controls view, which is more than one screenshot (1,282). Link-heavy pages are where text loses.
So it is a big win on app-style pages: forms, dashboards, admin screens. On long reading pages a full text snapshot can cost more than one screenshot, though it covers the whole page rather than one screen. For those, the agent should use find to jump to what it needs, or snapshot just one section.
Handing an agent a logged-in browser, carefully
Most of the work went into safety, because this gives software control of a browser where you are signed in.
- Paired, not open. The server and extension share a pairing code, and both sides prove they hold it before any command runs. Web pages and other extensions can't connect.
- Local only. The server listens on 127.0.0.1. LeanTab has no cloud servers, analytics or accounts.
- You approve uploads. Uploads are off until you list allowed folders. Each upload opens a window showing the file and the site, and only your click sends it.
- One tab per agent. If the agent's tab is closed, it gets an error instead of acting on whatever tab you're looking at.
- Sensitive fields masked. Password, card and one-time-code fields are hidden in the text views. Detection is heuristic, so it reduces the risk rather than removing it.
- Page text marked untrusted. Every result is wrapped in a labeled block, and common hidden-text tricks are dropped. That lowers the risk of prompt injection. It does not remove it.
What LeanTab can't control: the agent acts as you. It can click "Send", "Pay" or "Delete". Keep your client's approval prompts on for actions that matter. And anything the agent reads goes to your AI provider under its terms.
Try it
You need Chrome 116 or newer and Node.js 18 or newer.
- Install the LeanTab extension from the Chrome Web Store.
- Add the server. For Claude Code:
claude mcp add leantab -- npx -y [email protected]. For Claude Desktop or another client, usenpxwith args["-y", "[email protected]"]. - Run
npx leantab-mcp pair, paste theLT-...code into the LeanTab popup, and click "Allow LeanTab on all sites". - Open any page and ask: "Use LeanTab to snapshot this page and tell me what's on it."
It's MIT licensed and listed in the official MCP Registry as io.github.AlexanderEstrella/leantab.
Code, benchmark and safety notes: https://github.com/AlexanderEstrella/leantab
If you try it on a page where it does badly, open an issue with the page type. Those are the cases I want to fix next.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.