Back to browse
GitHub Repository

Ultra-light MCP browser navigation. CDP-free, token-efficient and undetectable. Works on any site (SPAs, shadow DOM, iframes).

4 starsJavaScript

NavAgent – CDP-free, token-efficient web automation for AI

by DimitriBouriez·Mar 5, 2026·1 point·0 comments

AI Analysis

●●●BangerBig BrainWizardrySolve My Problem

Token-efficient DOM-to-list avoids screenshots and vision—works with SPAs, shadow DOM, iframes.

Strengths
  • Genuinely clever: numbered element lists (2K tokens) beat screenshots (2K+) and ARIA trees (15-20K) for both cost and accuracy.
  • Anti-bot-proof via Chrome extension messaging instead of CDP; works with real cookies, logins, Cloudflare-protected sites.
  • Universal MCP support (Claude Code, Cursor, Windsurf, Zed) with zero setup friction—just `npx navagent-mcp`.
Weaknesses
  • No Chrome Web Store yet (sideload only), limiting non-developer adoption; early ecosystem.
  • Untested at scale—no public benchmarks on complex SPAs or edge cases (shadow DOM nesting, contenteditable conflicts).
Target Audience

AI engineers, Claude power users, and developers building autonomous AI agents

Similar To

Playwright CDP · Selenium · Anthropic Computer Use

Post Description

Hi HN, I built NavAgent, a small MCP server + Chrome extension that lets AI clients drive your real browser session without CDP.

I use Claude Code daily, and I kept wanting it to interact with pages in my own browser, with my existing tabs, cookies, and logins.

Most browser automation approaches I tried for MCP were based on CDP / Playwright. I wanted something lighter and closer to normal browser behavior, so I tried a different design: the extension scans the DOM and sends the model a compact numbered list of actionable elements over a local WebSocket.

So the model sees something like: Search [input] Books [link] ... and can reply with browse_click(2) or browse_type(...)

That keeps scans very small (usually much smaller than screenshots or ARIA-tree dumps) and avoids screenshots, vision models, and huge accessibility payloads.

It currently handles SPAs, shadow DOM, same-origin iframes, and contenteditable editors. Everything runs locally. Setup is just the npm package plus the extension, and you can already try it by sideloading the extension from the repo and running npx navagent-mcp.

It's intentionally narrow: this is not a replacement for Playwright, CI automation or heavy scraping. It's a passive bridge for everyday browser tasks like opening pages, clicking around, and filling forms from an AI assistant.

It's still early, but it's already useful for my daily workflow. Feedback very welcome, especially on edge cases, security concerns and sites where it breaks.

Similar Projects

Developer Tools●●Solid

Why Playwright-CLI Beats MCP for AI‑Driven Browser Automation

The write-up zeroes in on a concrete, painful failure mode: MCP setups streaming full DOMs and logs into models and burning token budgets. It shows how playwright-cli keeps browser state external and emits compact element references and YAML flows you can replay into npx playwright test — a realistic pattern for long agent sessions. Valuable practical guidance for teams already on Playwright, but it's an explainer, not a new system you can drop in without plumbing.

Niche GemBig Brain
tanmay001
103mo ago