Sat 2026.11.07
Mantis: passing web pages to agents as short text
Today's pick: Mantis
Mantis is a product that lets AI agents find information and get tasks done on websites. Through Mantis, an agent reads web pages, clicks and types. Mantis reduces each page to short text before passing it to the agent.
It is today’s pick because it can cut the cost of handing web tasks to an agent.
- Found on
- Show HN
- Built with
- TypeScript, Playwright, MCP
The problem
To work with a web page, an AI agent has to pass the page’s content to the model as text or images. Passing more content uses more input tokens and costs more time and money.
Microsoft’s Playwright MCPAn MCP server made by Microsoft. It lets AI agents use web pages through Playwright, a browser automation tool. turns a page’s accessibility treeA tree of page elements with their roles and names. The browser builds it for assistive tools such as screen readers. into text and passes it to the agent. According to the Playwright MCP README, this works with models that cannot read images. In the same README, Microsoft says a CLI suits coding agents better than MCP. With MCP, the tool definitionThe name, description and input format of each tool an agent can use. The model reads them to pick a tool. With an MCP server connected, they stay in the context for the whole session., which give each tool’s name, description and input format, stay in the model’s context for the whole session. Each time the agent reads a page, a long accessibility tree goes into the context too. Running commands through a CLI keeps both out of the context.
How it solves it
Mantis was posted on Hacker News as a Show HN on November 6, 2026. The maker, Aadit Singal, published it as an MCPModel Context Protocol. It is a standard for how AI models connect to outside tools and data. server and a CLI.
Mantis reads the page in Chromium and turns it into short text with a number on each control, such as a button or link. The agent uses that number to click a control or type into it. After the agent acts, Mantis passes on only what changed on the page. Mantis shows the first items of a long list and a count of the rest. The agent finds an item by name. Mantis hands off logins, CAPTCHAs, two-factor codes and payments to the user.
What is different
The first difference is the form of the page the agent sees. Playwright MCP passes the accessibility tree and keeps its structure. Every element in it has a role and a reference number. Mantis does not pass the tree structure. It numbers only the controls and passes body text as quoted lines. The tradeoff is that the agent misses information that exists only as images on screen. According to the README, Mantis shows maps and content drawn with canvas or WebGL only as “canvas”. There is no tool to click by coordinates.
The second difference is how the browser runs. By default, Playwright MCP turns on Chromium’s sandboxAn environment that runs a program while blocking its access to system resources such as files and the network.. Mantis launches Chromium with the Playwright library’s default settings. Those settings include the option that turns the sandbox off (--no-sandbox). Today, as root, Chromium did not start with the sandbox on. Mantis ran as root under the same conditions without any setup. The tradeoff is security. Without the sandbox, a malicious page that exploits a browser flaw can reach system resources such as files and the network.
How it was built
- The repository has 343 commits, made between October 14 and November 5, 2026. The maker wrote 332 of them. 273 of the 343 commits have a Co-authored-by trailer for Claude.
- The benchmark code and result files are in the repository.
Running it
On Node.js 22, I cloned the repository and installed it with npm ci. Then I ran its token replay benchmark (npm run bench). The benchmark runs the same fixed steps with Mantis, Playwright MCP and screenshots. It counts the tokens in what each method returns. No model is used.
- Install.
npm cifinished in 4 seconds. The installed dependencies took up 232 MB. - Browser. The repository requires Chromium 156, which was not installed. I pointed the environment variables
MANTIS_CHROMIUMandBENCH_CHROMIUMat the installed Chromium 141. Playwright MCP ran Chromium as root with the sandbox on, and every step failed. WithPLAYWRIGHT_MCP_SANDBOX=false, it ran. - Results. All three methods finished 13 of the 14 tasks: 6 on public web pages and 7 on test pages. On those 13 tasks, Mantis returned 10,085 tokens of text and Playwright MCP returned 336,985. Here, one token is counted as 4 characters. Screenshots were estimated at 39,614 tokens. Image tokens are estimated as width × height ÷ 750. The task that opens a GitHub page failed for all three methods because of this environment’s certificate setup.
- Test-page tasks. The results for the 7 tasks on the repository’s test pages nearly matched its result table. The one exception was the response after the button click in the login task. It was 106 tokens, and the table lists 24.
- Tool definitions. Mantis had 20 tools, and their definitions took 2,368 tokens. The repository’s table lists 15 tools and 1,354 tokens. Its values were measured at a commit from October 16, 2026. Playwright MCP had 25 tools, and their definitions took 5,072 tokens.
- Time. On test pages, the median time per step was 219 ms for Mantis and 381 ms for Playwright MCP. In the Show HN title, the maker says agents browse 36% faster than with Playwright MCP. The README says the number comes from an evaluation where a model ran long tasks. In that evaluation, the median time to finish one run was 42 seconds with Mantis and 66 seconds with Playwright MCP. That evaluation needs a logged-in Codex or Claude Code CLI, so I did not run it.
$ node dist/cli.js read https://example.com
Page: Example Domain (https://example.com/)
"This domain is for use in documentation examples without needing permission. This is not a service; avoid relying on it for testing and monitoring purposes."
"هذا النطاق مُخصص للاستخدام في أمثلة التوثيق دون الحاجة إلى إذن. هذه ليست خدمة، يُرجى تجنب الاعتماد عليها لأغراض الاختبار والمراقبة."
"该域名仅用于文档示例,无需获得许可。这并非一项服务,请勿将其用于测试和监控目的。"
"L’usage de ce domaine est réservé à des exemples de documentation, sans autorisation préalable. Il ne s’agit pas d’un service ; son utilisation à des fins de test ou de surveillance est à éviter."
"Данный домен предназначен для использования в примерах документации без необходимости получения предварительного разрешения. Это не сервис; не рекомендуется его использование для тестирования и мониторинга."
"Este dominio está destinado al uso en ejemplos de documentación sin necesidad de permiso. Esto no es un servicio; evitar utilizarlo para realizar pruebas o monitoreos."
#1 link "Learn more" (href iana.org/help/example-domains)
~254 tokens
Not checked
- An evaluation with a model. Use a logged-in Claude Code CLI to run the same tasks with Mantis and Playwright MCP, and compare the time and the token counts.
- The GitHub page. Run the
github-repo-readtask again on a network without the certificate problem.
Verdict
It works. Mantis returned about 1/33 as many tokens as Playwright MCP. But Mantis 0.1.13 runs Chromium without a sandbox. The threat modelAn analysis of which attacks a system defends against and which it does not. in SECURITY.md does not cover this. It is worth trying if your agent reads many web pages.
What to take away
- Count tool definitions as part of the token cost. The agent keeps Mantis’s tool definitions in context for the whole session.
- When the code changes, run the benchmark again and update the result table. Mantis’s table was measured at an earlier commit, so its token count for the tool definitions differs from today’s.
Getting started
npx -y -p mantis-browser mantis installnpx -y -p mantis-browser mantis read https://example.com
- You need
- Node.js 20 or later. An agent that supports MCP, such as Claude Code, Codex or Cursor. Mantis itself needs no account or key.
- Cost
- Free under the MIT license.
Mantis hands off logins, CAPTCHAs, two-factor codes and payments to the user. According to the README, this opens a browser window, so it needs a display.
Steps select 1 ran.
Progress
- Day 3Active
- Day 7Quiet
- Day 15Quiet
- Day 30Upcoming
- Day 90Upcoming
- Day 180Upcoming
- Day 365Upcoming
Latest check Day 15, Sat 2026.11.21
- Commits since launch
- 0 → 9
- Stars
- 7 → 18
- Latest release
- v0.1.14
- Last commit
- 2026.11.07
- HN points
- 4 → 5
No commits in this period.