agent-browser
agent-browser
AIエージェント向けの堅牢化されたローカルブラウザ。依存関係ゼロ。 お使いのChromeをDevToolsプロトコル経由で操作し、トークン効率の良いMarkdownを抽出します。自動化ツールとして簡単に検出されることはありません。
サーフェス | インストール方法 | 用途 |
MCP サーバー |
| Claude Code、Cursor、Codex、任意のMCPクライアント |
CLI |
| シェル、スクリプト、CI |
ライブラリ |
| 自作のNodeコード |
DSH / Cordis プラグイン | コンポジションの行 | DSHハーネスでのネイティブツール |
npx -y @truenix/agent-browser markdown https://news.ycombinator.comすべてローカルで動作します。アカウント不要、APIキー不要、リモートサービス不要、割り当て枠なし。
なぜ
エージェントに生のHTMLを渡すと、トークンの大部分が無駄になります。実際のページで測定した結果:
ページ | html | markdown | テキスト | 削減率 |
| 835 kB | 95 kB | 51 kB | 8.8× |
| 34 kB | 6 kB | 4 kB | 5.2× |
さらに、自動化として自己申告するブラウザは、検出されたり、異なるコンテンツを配信されたりします。これは、エージェントが受け取るデータを静かに劣化させます。
Related MCP server: Browser-MCP Navigator
インストール
MCPサーバーとして
claude mcp add browser -- npx -y @truenix/agent-browser mcp{
"mcpServers": {
"browser": {
"command": "npx",
"args": ["-y", "@truenix/agent-browser", "mcp"]
}
}
}npm install @truenix/agent-browserツール: browser_markdown、browser_html、browser_links、browser_screenshot、browser_pdf、browser_console、browser_probe
ライブラリとして
import { withBrowser } from '@truenix/agent-browser';
const md = await withBrowser({}, async (session) => {
await session.navigate('https://example.com');
return session.markdown();
});npx -y @truenix/agent-browser install # edits ~/.dsh/profiles/web/cordis.patch.yml + package.json, then pnpm install
# npx -y @truenix/agent-browser install --profile web --dry-run # preview
# npx -y @truenix/agent-browser uninstall # remove againDSH / Cordisプラグインとして
ワンライナー(推奨 — DSH環境では自動で配線されます):
npm i -g @truenix/agent-browser
# or inside the harness checkout: pnpm add @truenix/agent-browserbrowser_markdown、browser_html、browser_links、browser_screenshot、browser_evaluate がDSHのホストにネイティブツールとして表示されます。npx を手動で実行する必要はありません。
手動設定(コンポジションを自分で編集したい場合):
# ~/.dsh/profiles/web/cordis.patch.yml — persists for every web session
- insert:
- id: agent-browser
name: '@truenix/agent-browser/cordis'
config:
timeoutMs: 180000 # per-tool call budget; default respects AGENT_BROWSER_BIN / ENDPOINT
# cli: 'npx -y @truenix/agent-browser' # override only if neededCordisプラグインの設定:
- '@truenix/agent-browser/cordis':
timeoutMs: 180000設定キー:
agent-browser <command> [options]
markdown <url> Extract the page as Markdown (main content by default)
text <url> Visible text only
html <url> Full serialized DOM after JavaScript runs
links <url> Every anchor as JSON
screenshot <url> PNG/JPEG (-o file, --full)
pdf <url> PDF (-o file)
a11y <url> Filtered accessibility tree
eval <url> <expr> Evaluate JS in the page
probe Browser, GPU and capability report
mcp Run as an MCP server on stdioCLI
agent-browser markdown <url> [options] — ページをMarkdownとして取得します。
agent-browser html <url> [options] — 加工前のHTMLを取得します。
agent-browser links <url> [options] — ページのリンクを抽出します。
GXP11
オプション: --headful、--no-stealth、--block-images、--gpu/--no-gpu、--width、--height、--viewport WxH、--main、--raw、--full、--endpoint <url>、--timeout <ms>、--json、-o
--endpoint はブラウザを起動せずに既存のブラウザへ接続します。多くの呼び出しにまたがって1つのブラウザを再利用するのに便利です。
検出回避
通常のヘッドレスChromeとは異なり、navigator.webdriver が false のままになります。
生のCDPは --enable-automation フラグを追加しないため、navigator.webdriver は undefined のままです。ただし、それをさらに強化するための対策がいくつかあります。
シグナル | プレーンなヘッドレス | このプロジェクト |
|
|
|
ヘッドレスUA | ✅ | ❌ |
| あり | なし |
外部からの視認性 | 高い | 低い |
強化された条件で bot.sannysoft.com を実行すると、合格 となります。
bot-detector.rebrowser.net も同様に 合格 です。
検出について
検出は、以下の2つの大きなカテゴリに分けられます。
JavaScript による検出 —
navigator.webdriver、プロパティの欠落、Chrome DevTools Protocol の起動時の痕跡。ネットワークレベルのフィンガープリンティング — TLS フィンガープリント、IP 評判、HTTP/2 のフレーム順序。
このプロジェクトは カテゴリ1 に対処し、ブラウザをよりクリーンに、より標準的に見せます。カテゴリ2 はユーザー自身のネットワークの評判に依存するため、範囲外です。
CDP 検出
最も永続的な CDP 検出方法の1つは、Runtime.enable が呼び出された後に Error.stack が変更される ことです。Puppeteer と Playwright はどちらも Runtime.enable を呼び出すため、CDP 駆動のブラウザは起動直後に検出されます。
このプロジェクトは 決して Runtime.enable を呼び出しません。
代わりに、Runtime.evaluate を awaitPromise 付きで使用して、ページコンテキスト内のプロミスを解決します。これはクリーンな方法で、Runtime.enable の痕跡を残しません。
最新のテスト結果 (npm run test:bot)
検出器 | 結果 |
31 合格、0 不合格 | |
6 グリーン、0 レッド | |
弱いシグナルなし、検出されず |
技術的詳細
puppeteer-extra-plugin-stealth は使用していません。これは壊れやすい Function.prototype.toString のパッチに依存しており、多くのパッチ(chrome.runtime、permissions、languages など)は現代のChromeでは不要であるか、検出可能です。代わりに、オリジナルのChromeバイナリをフラグ付きで起動し、特定のCDPコールのみを使用します。
ゼロ依存関係
dependencies は空です。Nodeのグローバル WebSocket(Node ≥ 22)または組み込みの node:http を使用してCDPに接続します。Chromeの起動と管理には node:child_process、Markdownへの変換には独自のDOMウォーカーを使用します。
環境変数
変数名 | 説明 |
| Chrome/Chromium バイナリへのパス(自動検出を上書き) |
| 起動せずに接続するCDPエンドポイントURL |
|
|
| 追加のChrome引数(スペース区切り) |
| Chromeのユーザーデータディレクトリ(指定しない場合は一時ディレクトリ) |
GXP12
ライセンス
MIT
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityBmaintenanceMCP server for browser automation with anti-detection. Scout pages, find elements, interact with websites, and monitor network traffic from any AI client that supports the Model Context Protocol.211MIT
- FlicenseBqualityBmaintenanceUltra-fast browser automation server over Chrome DevTools Protocol (CDP), exposed as MCP, enabling AI agents to control a real Chrome browser with low latency and minimal token usage.21
- AlicenseAqualityAmaintenanceA fault-tolerant, stealth-enabled Model Context Protocol (MCP) server for web searching and content fetching. Built for AI Agents (Cursor, Claude Code, OpenCode), it uses a stealth browser engine to fetch pages, dynamically handles SPAs/React, and converts bloat into token-optimized Markdown.23192MIT
- AlicenseNot gradedqualityBmaintenanceMCP server that lets agents drive your real Chrome browser with existing logins and sessions via an outbound-only WebSocket extension. It exposes Playwright-compatible browser tools for navigation, clicking, typing, and snapshots.Apache 2.0
Related MCP Connectors
Browser MCP for logged-in tasks. Uses your Chrome — credentials stay local. Zero-token replay.
Hosted real Google Chrome MCP with per-user persistent state. Navigate, click, type, screenshot.
Headless-browser-as-JSON with memorymarket cache economics. Real Chromium, crypto settlement.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/TrueNix/agent-browser'
If you have feedback or need assistance with the MCP directory API, please join our Discord server