agent-browser
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@agent-browseropen https://example.com and extract the main content as markdown"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
agent-browser
A hardened local browser for AI agents. Zero dependencies. Drives the Chrome you already have over the DevTools Protocol, extracts token-efficient Markdown, and is not trivially flagged as automation.
Surface | Install | Use it for |
MCP server |
| Claude Code, Cursor, Codex, any MCP client |
CLI |
| shells, scripts, CI |
Library |
| your own Node code |
DSH / Cordis plugin | composition row | native tools in a DSH harness |
npx -y @truenix/agent-browser markdown https://news.ycombinator.comEverything runs locally. No account, no API key, no remote service, no quota.
Why
Feeding an agent raw HTML wastes most of its context. Measured on real pages:
page | html | markdown | text | saving |
| 835 kB | 95 kB | 51 kB | 8.8× |
| 34 kB | 6 kB | 4 kB | 5.2× |
And a browser that announces itself as automation gets blocked, degraded, or served different content — which quietly corrupts whatever the agent concluded.
Related MCP server: Browser-MCP Navigator
Install
As an MCP server
claude mcp add browser -- npx -y @truenix/agent-browser mcp{
"mcpServers": {
"browser": {
"command": "npx",
"args": ["-y", "@truenix/agent-browser", "mcp"]
}
}
}Tools: browser_markdown, browser_text, browser_html, browser_links, browser_screenshot, browser_evaluate, browser_accessibility_tree, browser_pdf, browser_probe.
As a library
npm install @truenix/agent-browserimport { withBrowser } from '@truenix/agent-browser';
const md = await withBrowser({}, async (session) => {
await session.navigate('https://example.com');
return session.markdown();
});As a DSH / Cordis plugin
One-liner (recommended — auto-wires when you mean DSH):
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 againRestart dsh — browser_markdown, browser_text, browser_links, browser_evaluate, browser_screenshot, browser_probe appear as native tools. No handler runs on plain npm install; intentional install is required.
Manual (if you prefer to edit the composition yourself):
npm i -g @truenix/agent-browser
# or inside the harness checkout: pnpm add @truenix/agent-browserRequires Node ≥ 18 and a Chrome/Chromium install. Then add to the host composition (tools registry lives on host, not per-agent):
# ~/.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 neededShort form (when the composition already wraps insert):
- '@truenix/agent-browser/cordis':
timeoutMs: 180000Env overrides: AGENT_BROWSER_BIN (Chrome binary), AGENT_BROWSER_ENDPOINT (attach to long-lived browser via --endpoint), or config.cli.
CLI
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 stdioOptions: --headful, --no-stealth, --block-images, --gpu/--no-gpu, --width, --height, --viewport WxH, --main, --raw, --full, --endpoint <ws>, --timeout, --json, -o.
--endpoint attaches to an already-running browser instead of launching one — useful for reusing a single long-lived browser across many calls.
Bot detection
Run it yourself: npm run test:bot. Latest result:
detector | result |
31 passed, 0 failed | |
6 green, 0 red, | |
|
Plain headless Chrome fails four sannysoft rows (HEADCHR_UA, CHR_MEMORY, WebGL SwiftShader, old UA) and is reported as a bot.
An unreachable detector counts as SKIP, never as a pass, and the gate requires three reachable passes — so a day when the test sites are down cannot be mistaken for success.
Environment matters more than patching
The identical code, measured in two places:
this workstation | GitHub Actions runner | |
IP | residential | datacenter |
GPU | real (NVIDIA) | none → SwiftShader |
| 31 passed, 0 failed | 30 passed, 1 failed ( |
| 6 green, 0 red | 6 green, 0 red |
|
|
|
Every CDP-level signal stays clean in both — that part is code, and the code is right. What flips the verdict is the environment: a datacenter ASN plus software rendering trips a weak-signal composite that no amount of fingerprint patching addresses.
This is the honest shape of the problem. Hardening the browser removes the trivial tells. Where you run it decides the rest.
What the hardening does, and why
Every item came from a detector telling us we were wrong:
No
--enable-automation. That flag — which Puppeteer and Playwright add — is what setsnavigator.webdriver = true. Raw CDP does not set it, so it staysfalsewith nothing patched.No
Runtime.enable. It is the loudest CDP tell and powers the classic console/Error.stackdetector.Runtime.evaluateworks fine without it.Window and screen move together.
--window-sizewithout--ozone-override-screen-sizegivesouterWidth > screen.width, which is physically impossible — a stronger signal than plain headless.No default device-metrics override. The usual 1280×720 is Playwright's default viewport and detectors flag it by name. Set
--viewportonly if you need it.Real GPU when available, giving a genuine
ANGLE (NVIDIA …)renderer instead of SwiftShader.UA set at launch, not only over CDP.
Emulation.setUserAgentOverridedoes not reach Web Workers, so a worker keeps reporting the headless UA while the page reports the clean one (hasInconsistentWorkerValues).No
acceptLanguageoverride. CDP derivesnavigator.languagesby splitting that header, so"en-US,en;q=0.9"becomes["en-US","en;q=0.9"]— a q-value where none can legally exist, and another page/worker mismatch.--langdoes it correctly.Client Hints derived from the binary's own version, so
Sec-CH-UAcannot disagree withnavigator.userAgent.Isolated browser context per session, disposed on close — clean state per task without a second browser process.
The recurring lesson: consistency beats coverage. Four of those are cases where partial spoofing made detection easier, caught only by running real detectors.
Why WebGL spoofing is off by default
spoofWebgl exists and is implemented carefully — a Proxy around native getParameter, so Function.prototype.toString still reports [native code]. It is off, because measurement says it backfires. From test/webgl-spoof-experiment.mjs:
arm | renderer claimed | maxTexture | extensions | sannysoft | verdict |
real GPU, no spoof | NVIDIA | 32768 | 37 | 0 failed |
|
SwiftShader, honest | SwiftShader | 8192 | 35 | 1 failed |
|
SwiftShader + spoof | NVIDIA | 8192 | 35 | 0 failed |
|
Claiming hardware you do not have fixes one cosmetic row and fails the composite detector: the injected script does not reach Web Workers, so the worker still reports SwiftShader, and MAX_TEXTURE_SIZE stays at the software value while the renderer string claims a discrete GPU.
Honest SwiftShader passes. A convincing lie does not. Give the browser a real GPU instead — it is free.
What this does NOT do
Fingerprint-level detection is the entire scope. It does not defeat, and does not try to:
TLS/JA3-JA4 and HTTP/2 fingerprinting — decided before any JavaScript runs
IP reputation — datacenter vs residential ASN, often the real blocker
Behavioural analysis — mouse paths, timing, dwell
Commercial challenge products lean on those, so "passes the gate" means not trivially flagged as automation, never undetectable. Intended for your own sites, testing, accessibility work, and ordinary agent browsing.
Memory
A Chrome stack costs roughly 450 MB. The lever is architecture, not flags: run one browser and many isolated contexts rather than one browser per task. Start a browser once, then point every call at it with --endpoint / AGENT_BROWSER_ENDPOINT. --block-images helps for text work.
Zero dependencies
dependencies is empty, including the WebSocket transport.
Node's global WebSocket (WHATWG) cannot send request headers, which any authenticated or proxied CDP endpoint needs, and undici is not importable standalone. So src/ws.mjs implements RFC 6455 directly over node:http(s) — handshake, masking, continuation fragments, 64-bit lengths, ping/pong — which is everything CDP requires.
The Markdown converter walks the DOM with an explicit stack, keeping JS call depth at O(1) regardless of nesting, and uses native innerText for leaf-level inline nodes. That makes it both recursion-safe on deeply nested documents and markedly faster on large pages.
Environment
| path to a Chrome/Chromium binary |
| attach to this CDP endpoint instead of launching |
Requirements
Node ≥ 18 and a Chrome/Chromium install. No build step.
Credits
This project's hardening is almost entirely derived from other people's published detection research — see CREDITS.md. Particular thanks to rebrowser-bot-detector, bot.sannysoft.com, deviceandbrowserinfo.com, and Camoufox for showing how this is done properly.
License
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