# Mantis: 에이전트에게 웹 페이지를 짧은 텍스트로 넘기기
# Mantis: passing web pages to agents as short text

- Site: https://select1.dev/2026-11-07 (English), https://select1.dev/ko/2026-11-07 (Korean)
- Entry: 028
- Published: 2026-11-07 (KST). Launch date: 2026-11-06
- Pick: Mantis <https://github.com/perzianhq/mantis> (source: Show HN)
- Verified: ran
- What: Mantis 는 AI 에이전트가 웹사이트에서 정보를 찾고 작업을 처리하게 하는 프로덕트다. 에이전트는 Mantis 로 웹 페이지를 읽고, 클릭하고, 입력한다. Mantis 는 페이지를 짧은 텍스트로 줄여 에이전트에게 넘긴다.
- What (en): 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.
- Why: 오늘의 픽으로 선정한 이유는 에이전트에게 웹 작업을 맡기는 비용을 줄일 수 있기 때문이다.
- Why (en): It is today’s pick because it can cut the cost of handing web tasks to an agent.
- Verdict: 작동한다. 응답 토큰 수는 Playwright MCP 의 약 33분의 1이었다.
- Verdict (en): It works. Mantis returned about 1/33 as many tokens as Playwright MCP.
- Tags: agent, browser, mcp, playwright, tokens, typescript

## Checked against the README

- [pass] 같은 작업에서 에이전트가 받는 텍스트가 Playwright MCP 보다 훨씬 적다(token replay: Mantis 11,309, Playwright MCP 573,512 tokens) — 저장소의 토큰 측정 벤치마크(npm run bench)를 실행했다. 작업 14개 가운데 13개는 Mantis, Playwright MCP, 스크린샷 방식 모두에서 끝까지 실행됐다. 이 작업 13개에서 도구가 반환한 텍스트는 Mantis 10,085토큰, Playwright MCP 336,985토큰이었다
- [fail] 세션 내내 컨텍스트에 두는 도구 정의는 15개, 1,354토큰이다(Fixed per-session cost: mantis 15 tools, 1,354 tokens) — 오늘 토큰 측정 벤치마크를 커밋 28b741b 에서 실행하니 도구 정의는 20개, 2,368토큰이었다. 저장소의 결과 표는 2026년 10월 16일 커밋 c447103 기준이다
- [unknown] 에이전트가 Mantis 를 사용하면 Playwright MCP 를 사용할 때보다 36% 빠르게 탐색한다(Show HN 제목: AI agents browse 36% faster than with Playwright MCP) — 이 수치는 모델이 실제로 작업하는 평가에서 나왔다. 그 평가는 로그인한 Codex 나 Claude Code CLI 가 필요해 실행하지 않았다. 토큰 측정 벤치마크를 테스트용 페이지에서 실행하니 단계당 시간의 중앙값은 Mantis 219 ms, Playwright MCP 381 ms 였다

## Measured

- 테스트용 페이지 작업 7개에서 도구가 반환한 텍스트의 토큰 수 합계(문자 수를 4로 나눈 추정값): Mantis 2,705, Playwright MCP 23,575, 스크린샷 추정 28,686 (npm run bench 의 결과(bench/results/latest.md). 저장소의 결과 표는 Mantis 2,585, Playwright MCP 23,229 였다)

## Progress (days after launch; full history https://select1.dev/2026-11-07/progress)

- day 3 (checked 2026-11-09) [active] commits since launch 9, stars 13, releases 13, contributors 2, last commit 2026-11-07
  - It now attaches automatically to a Chrome instance with a debug port open on 127.0.0.1:9222. MANTIS_AUTO_ATTACH=0 turns this off (v0.1.14).
  - Added two benchmark suites. In one, the agent must remember a user preference across product pages. In the other, the agent sees the question only after visiting the pages, so it must go back to a collapsed spec section.
- day 7 (checked 2026-11-13) [quiet] commits since launch 9, stars 18, releases 13, contributors 2, last commit 2026-11-07
- day 15 (checked 2026-11-21) [quiet] commits since launch 9, stars 18, releases 13, contributors 2, last commit 2026-11-07

## 한국어

## 무엇이 문제인가

AI 에이전트가 웹 페이지를 다루려면 페이지의 내용을 모델에게 텍스트나 이미지로 넘겨야 한다. 넘기는 양이 많을수록 모델의 입력 토큰이 늘어나고, 그만큼 비용과 시간이 든다.

Microsoft 의 Playwright MCP 는 페이지의 접근성 트리를 텍스트로 바꿔 에이전트에게 넘긴다. Playwright MCP 의 README 에 따르면 이 방식은 이미지를 읽는 모델이 필요 없다. 같은 README 에서 Microsoft 는 코딩 에이전트에는 MCP 보다 CLI 방식이 적합하다고 했다. MCP 방식에서는 도구의 이름, 설명, 입력 형식을 적은 도구 정의가 세션 내내 모델의 컨텍스트에 들어 있다. 페이지를 읽을 때마다 긴 접근성 트리도 컨텍스트에 들어간다. CLI 로 명령을 실행하면 도구 정의와 접근성 트리를 컨텍스트에 넣지 않아도 된다.

## 어떻게 해결했나

Mantis 는 2026년 11월 6일 Hacker News 에 Show HN 글로 올라왔다. 제작자 Aadit Singal 은 Mantis 를 MCP 서버와 CLI 로 공개했다.

Mantis 는 Chromium 에서 페이지를 읽고, 버튼과 링크 같은 조작 요소에 번호를 붙여 짧은 텍스트로 바꾼다. 에이전트는 이 번호로 요소를 클릭하거나 요소에 텍스트를 입력한다. 에이전트가 조작한 뒤에는 Mantis 가 페이지에서 변경된 부분만 넘긴다. Mantis 는 긴 목록의 앞부분과 나머지 항목의 개수만 보여 준다. 에이전트는 필요한 항목을 이름으로 찾는다. Mantis 는 로그인, CAPTCHA, 2단계 인증, 결제를 사용자에게 맡긴다.

## 무엇이 다른가

첫째, 에이전트에게 보여 주는 페이지의 형태가 다르다. Playwright MCP 는 접근성 트리를 구조 그대로 넘기고, 요소마다 역할과 참조 번호를 붙인다. Mantis 는 트리 구조를 넘기지 않는다. 조작할 수 있는 요소에만 번호를 붙이고, 본문은 따옴표로 묶은 텍스트로 넘긴다. 트레이드오프는 화면에 이미지로만 있는 정보를 넘기지 못한다는 점이다. README 에 따르면 Mantis 는 캔버스나 WebGL 로 그린 화면과 지도를 "캔버스"라고만 표시한다. 좌표로 클릭하는 도구도 없다.

둘째, 브라우저를 실행하는 방식이 다르다. Playwright MCP 는 기본 설정에서 Chromium 의 샌드박스를 켠다. Mantis 는 Playwright 라이브러리의 기본 설정으로 Chromium 을 실행한다. 이 기본 설정에는 샌드박스를 끄는 옵션(`--no-sandbox`)이 들어 있다. 오늘 root 권한에서는 샌드박스를 켠 Chromium 이 실행되지 않았다. Mantis 는 같은 조건에서도 별도 설정 없이 작동했다. 트레이드오프는 보안이다. 악성 페이지가 브라우저의 취약점을 이용하면, 샌드박스가 없어 파일이나 네트워크 같은 시스템 자원에도 접근할 수 있게 된다.

## 어떻게 만들었나

- 커밋 343개는 2026년 10월 14일부터 11월 5일 사이에 작성됐다. 이 가운데 332개는 제작자가 작성했다. 343개 가운데 273개에는 Claude 와 함께 작성했다는 Co-authored-by 트레일러가 있다.
- 저장소에 벤치마크 코드와 결과 파일이 함께 들어 있다.

## 실행해 보니

Node.js 22 에서 저장소를 클론해 `npm ci` 로 설치하고, 저장소의 토큰 측정 벤치마크(`npm run bench`)를 실행했다. 이 벤치마크는 같은 조작을 정해진 순서대로 Mantis, Playwright MCP, 스크린샷 방식으로 각각 실행하고, 도구가 반환하는 내용의 토큰 수를 측정한다. 모델은 사용하지 않는다.

1. 설치. `npm ci` 는 4초 만에 끝났다. 의존성은 232 MB 였다.
2. 브라우저. 저장소가 요구하는 Chromium 156 이 설치돼 있지 않아, 환경 변수 `MANTIS_CHROMIUM`, `BENCH_CHROMIUM` 에 Chromium 141 을 지정했다. Playwright MCP 는 샌드박스를 켠 채 Chromium 을 실행했다. root 권한에서는 Playwright MCP 의 모든 단계가 실패했다. `PLAYWRIGHT_MCP_SANDBOX=false` 로 샌드박스를 끄자 실행됐다.
3. 결과. 작업 14개 가운데 13개는 세 방식이 모두 끝까지 실행했다. 공개 웹 페이지 작업 6개와 테스트용 페이지 작업 7개다. 이 작업 13개에서 도구가 반환한 텍스트는 Mantis 10,085토큰, Playwright MCP 336,985토큰이었다. 토큰은 문자 수를 4로 나눈 값이다. 스크린샷 방식은 39,614토큰으로 추정됐다. 벤치마크는 이미지의 토큰 수를 너비 × 높이 ÷ 750 으로 계산한다. GitHub 페이지를 여는 작업은 이 환경의 인증서 설정 때문에 세 방식 모두 실패했다.
4. 테스트용 페이지 작업. 이 작업 7개에서 측정한 토큰 수는 저장소의 결과 표와 거의 같았다. 로그인 작업에서 버튼을 클릭한 뒤의 응답만 106토큰으로 표의 24토큰보다 많았다.
5. 도구 정의. Mantis 의 도구 정의는 20개, 2,368토큰이었다. 저장소의 결과 표에는 15개, 1,354토큰으로 나와 있다. 이 표의 값은 2026년 10월 16일 커밋에서 측정됐다. Playwright MCP 의 도구 정의는 25개, 5,072토큰이었다.
6. 시간. 테스트용 페이지에서 단계당 시간의 중앙값은 Mantis 219 ms, Playwright MCP 381 ms 였다. 제작자는 Show HN 제목에서 Playwright MCP 보다 36% 빠르다고 했다. README 에 따르면 이 값은 모델이 긴 작업을 실행한 평가에서 나왔다. 그 평가에서 작업 한 번에 걸린 시간의 중앙값은 Mantis 42초, Playwright MCP 66초였다. 그 평가는 로그인한 Codex 나 Claude Code CLI 가 필요해 실행하지 않았다.

```
$ 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
```

## 확인하지 못한 것

- 모델이 작업하는 평가. Claude Code CLI 에 로그인한 뒤 같은 작업을 Mantis 와 Playwright MCP 로 실행하고, 시간과 토큰 수를 비교하자.
- GitHub 페이지. 인증서 문제가 없는 네트워크에서 `github-repo-read` 작업을 다시 실행하자.

## 판정

작동한다. 응답 토큰 수는 Playwright MCP 의 약 33분의 1이었다. 다만 Mantis 0.1.13 은 Chromium 을 샌드박스 없이 실행한다. SECURITY.md 의 위협 모델에는 이 내용이 없다. 에이전트에게 웹 페이지를 많이 읽게 하는 경우에 써 볼 만하다.

## 얻어갈 것

- 도구 정의도 토큰 비용에 넣어 계산하자. 에이전트는 Mantis 의 도구 정의를 세션 내내 컨텍스트에 포함한다.
- 코드를 바꿀 때는 벤치마크도 다시 실행해 결과 표를 갱신하자. Mantis 의 결과 표는 이전 커밋에서 측정한 값이라 오늘 측정한 도구 정의의 토큰 수와 달랐다.

### 용어

- Playwright MCP: Microsoft 가 만든 MCP 서버다. 브라우저 자동화 도구 Playwright 로 AI 에이전트가 웹 페이지를 조작하게 한다.
- 접근성 트리: 페이지 요소의 역할과 이름을 트리 구조로 정리한 것이다. 브라우저가 스크린 리더 같은 보조 기술에 넘기려고 만든다.
- 도구 정의: 에이전트가 쓸 수 있는 도구마다 이름, 설명, 입력 형식을 적은 것. 모델은 이것을 읽고 어떤 도구를 부를지 정한다. MCP 서버를 연결하면 세션 내내 컨텍스트에 들어 있다.
- MCP: Model Context Protocol. AI 모델을 외부 도구와 데이터에 연결하는 방식을 정의한 규격이다.
- 샌드박스: 프로그램이 파일, 네트워크 같은 시스템 자원에 접근하지 못하게 제한한 실행 환경이다.
- 위협 모델: 시스템이 어떤 공격에 대비하고 어떤 공격은 막지 않는지 정리한 분석이다.

## English

## 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 MCP turns a page’s accessibility tree 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 definitions, 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 MCP 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 sandbox. 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.

1. Install. `npm ci` finished in 4 seconds. The installed dependencies took up 232 MB.
2. Browser. The repository requires Chromium 156, which was not installed. I pointed the environment variables `MANTIS_CHROMIUM` and `BENCH_CHROMIUM` at the installed Chromium 141. Playwright MCP ran Chromium as root with the sandbox on, and every step failed. With `PLAYWRIGHT_MCP_SANDBOX=false`, it ran.
3. 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.
4. 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.
5. 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.
6. 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-read` task 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 model 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.

### Terms

- Playwright MCP: An MCP server made by Microsoft. It lets AI agents use web pages through Playwright, a browser automation tool.
- accessibility tree: A tree of page elements with their roles and names. The browser builds it for assistive tools such as screen readers.
- tool definition: The 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.
- MCP: Model Context Protocol. It is a standard for how AI models connect to outside tools and data.
- sandbox: An environment that runs a program while blocking its access to system resources such as files and the network.
- threat model: An analysis of which attacks a system defends against and which it does not.

## Launches the same day

- Wand Browser <https://github.com/hito-dev/wand-browser> (Show HN, 14): iOS 브라우저. Web Bluetooth 와 NFC 를 지원하는 오픈소스 브라우저다.
- HackerRepos <https://HackerRepos.fyi/> (Show HN, 10): 저장소 모음 사이트. HN 에 언급된 저장소를 모아 보여 준다.
- Inference business simulator <https://makermaker.ai/breakthroughs/inference/simulation/> (Show HN, 10): 추론 사업 시뮬레이터. GPU 를 임대하고 토큰을 판매하면서 파산하지 않게 운영하는 게임이다.
- HackerGit <https://hackergit.org/> (Show HN, 7): 저장소 모음 사이트. HN 에 공유된 GitHub 저장소를 모두 모은다.
- Ueddit <https://ueddit.com/> (Show HN, 5): Reddit 뷰어. 로그인하지 않고 Reddit 을 읽는다.
- Mantis <https://github.com/perzianhq/mantis> (Show HN, 4): 에이전트용 브라우저 도구. 웹 페이지를 번호를 붙인 짧은 텍스트로 넘긴다.
- poki <https://github.com/JosssphZhou/poki> (GitHub, 398): iPhone 제어 도구. AI 에이전트가 탈옥이나 추가 장비 없이 실제 iPhone 을 조작한다고 소개한다.
- turkish-anti-ai-skill <https://github.com/yucezerey/turkish-anti-ai-skill> (GitHub, 220): 튀르키예어 글 교정 스킬. AI 가 쓴 흔적과 번역투를 찾아 고친다고 소개한다.
- sshole <https://github.com/oz9un/sshole> (GitHub, 182): 보안 점검 스크립트. musl 에서 빌드한 OpenSSH 가 비밀번호 없는 계정에서 257자 이상의 아무 비밀번호나 받아들인다고 소개한다.
- Tobira Site Agent <https://www.producthunt.com/products/tobira-ai> (Product Hunt, 304): 웹사이트용 AI 에이전트. 다른 AI 에이전트에게 상품을 판매하는 에이전트를 만든다고 소개한다.
- Turnstone <https://www.producthunt.com/products/turnstone> (Product Hunt, 199): Grok 봇 대안. 사용자의 AI 로 무료로 실행한다고 소개한다.
- Wonder Dev View <https://www.producthunt.com/products/wonder-dev-view> (Product Hunt, 144): 에이전트 병렬 실행 도구. Claude Code 와 Codex 에이전트 여러 개를 함께 실행한다.

## Getting started

- Steps: npx -y -p mantis-browser mantis install ; npx -y -p mantis-browser mantis read https://example.com
- Needs: Node.js 20 이상. MCP 를 지원하는 에이전트(예: Claude Code, Codex, Cursor). Mantis 에는 계정과 키가 필요 없다.
- Cost: MIT, 무료.
- Note: Mantis 는 로그인, CAPTCHA, 2단계 인증, 결제를 사용자에게 맡긴다. README 에 따르면 사용자는 로그인 같은 단계를 브라우저 창에서 처리하므로 디스플레이가 필요하다.
