
vanjar
io.github.Sivanesanbalu/vanjar
Local AI browser automation: observe, act, verify, recover, with human approval for risky actions.
Documentation
VANJAR
Universal, AI-Model-Independent Browser Automation MCP Server
Local-first Playwright & Native Chrome automation over STDIO and Streamable HTTP MCP, with durable SQLite persistence and a Chrome Extension Human Control Center.
Universal MCP Compatibility Overview
VANJAR (v0.8.4) exposes 40 MCP tools over both STDIO (for local AI clients) and Streamable HTTP (for authenticated remote-compatible MCP connections). Any MCP-compatible AI agent gets the exact same browser automation, session isolation, task memory, verification, and human-in-the-loop safety controls.
AI Clients (Antigravity / Claude Desktop / Claude Code / Codex / Cursor / ChatGPT* / Generic MCP)
│ MCP over STDIO (local) OR Streamable HTTP + Bearer Auth (/mcp)
▼
VANJAR Local Engine (Node.js + TypeScript)
├── TaskManager, Plans & Bounded Memory ──▶ SQLite (~/.vanjar/data/vanjar.db)
├── ApprovalManager (Single-use, Hash-bound)
├── BrowserSessionManager (Isolated Contexts) ──▶ Playwright Chromium
└── Local Bridge (127.0.0.1 HTTP + SSE) ──▶ Chrome Extension Side Panel
Supported Client Matrix
| Client | Transport | Setup Command | Auto-Configure | Guide |
|---|---|---|---|---|
| Google Antigravity | STDIO | vanjar setup --client antigravity | Yes (~/.gemini/config/mcp_config.json) | docs/ANTIGRAVITY.md |
| Claude Desktop | STDIO | vanjar setup --client claude-desktop | Yes (claude_desktop_config.json) | docs/CLAUDE.md |
| Claude Code | STDIO | vanjar setup --client claude-code | Yes (~/.claude.json) | docs/CLAUDE.md |
| OpenAI Codex CLI | STDIO | vanjar setup --client codex | Yes (~/.codex/config.toml) | docs/CODEX.md |
| Cursor | STDIO | vanjar setup --client cursor | Yes (.cursor/mcp.json) | docs/CURSOR.md |
| ChatGPT (Custom MCP) | Streamable HTTP (HTTPS) | vanjar setup --client chatgpt | Template only (manual setup) | docs/CHATGPT.md |
| Generic MCP Client | STDIO / Streamable HTTP | vanjar setup --client generic | Template only (manual setup) | docs/CLIENT-COMPATIBILITY.md |
See docs/CLIENT-COMPATIBILITY.md for platform paths and
vanjar clients/vanjar compatibilityCLI commands.
New here? Start with How to use VANJAR: install, connect your AI app, three test messages, and a real LinkedIn walkthrough with screenshots.
Installation
Option 1: Install from npm (Recommended)
npm install -g @sivanesan90007/vanjar
npx playwright install chromium
vanjar --help
Or run directly with npx:
npx -y @sivanesan90007/vanjar doctor
Option 2: Claude Code plugin
This repository is also a Claude Code plugin marketplace. Inside Claude Code:
/plugin marketplace add Sivanesanbalu/vanjar
/plugin install vanjar@vanjar
The plugin starts VANJAR with npx -y @sivanesan90007/vanjar@latest mcp. You still need Chromium once: npx playwright install chromium.
Option 3: Install from Source
git clone https://github.com/Sivanesanbalu/vanjar.git
cd vanjar
npm install
npx playwright install chromium
npm run package:release
npm link # optional: exposes `vanjar` globally
Requires Node.js >= 22.5.0 (for built-in node:sqlite).
Client Setup Instructions
# Auto-configure a local STDIO client (creates a timestamped .bak-* backup first)
vanjar setup --client antigravity
vanjar setup --client claude-desktop
vanjar setup --client claude-code
vanjar setup --client codex
vanjar setup --client cursor
# Generate ready-to-copy templates for manual/remote clients
vanjar setup --client chatgpt
vanjar setup --client generic
# Inspect client status, compatibility matrix, and diagnostics
vanjar clients
vanjar compatibility
vanjar doctor
Client Configuration Examples
STDIO JSON (Antigravity, Claude Desktop, Claude Code, Cursor)
{
"mcpServers": {
"vanjar": {
"command": "node",
"args": ["/absolute/path/to/vanjar/dist/index.js"],
"env": {
"VANJAR_HEADLESS": "true",
"VANJAR_ALLOW_LOCALHOST": "false",
"VANJAR_BRIDGE_ENABLED": "true",
"VANJAR_BRIDGE_PORT": "47821",
"VANJAR_LOG_LEVEL": "info"
}
}
}
}
OpenAI Codex CLI (~/.codex/config.toml)
[mcp_servers.vanjar]
command = "node"
args = ["/absolute/path/to/vanjar/dist/index.js"]
[mcp_servers.vanjar.env]
VANJAR_HEADLESS = "true"
VANJAR_ALLOW_LOCALHOST = "false"
VANJAR_BRIDGE_ENABLED = "true"
VANJAR_BRIDGE_PORT = "47821"
VANJAR_LOG_LEVEL = "info"
Streamable HTTP (Remote / ChatGPT / Custom HTTP MCP Clients)
# Start VANJAR in authenticated Streamable HTTP mode (binds to 127.0.0.1:47822 by default)
vanjar mcp --transport http --port 47822
- Endpoint:
http://127.0.0.1:47822/mcp(health check:GET /health) - Auth header:
Authorization: Bearer <token>(auto-generated in~/.vanjar/http-auth.jsonwith0600permissions ifVANJAR_HTTP_TOKENis not set)
Local vs. Remote MCP Connection
- Local STDIO (Recommended for desktop/CLI agents): The AI client spawns
node dist/index.jsdirectly. Zero open MCP network ports, no Bearer token needed, lowest latency. - Streamable HTTP (
--transport http): Exposes/mcpover HTTP with mandatory 256-bit Bearer authentication, Host/Origin DNS-rebinding checks, and a 1 MB request cap. Keep bound to127.0.0.1and place behind an authenticated HTTPS reverse proxy or private tunnel (e.g., Cloudflare Tunnel, Tailscale Funnel, or nginx TLS) when connecting remote cloud clients like ChatGPT.
40 MCP Tool Categories
- Browser & Navigation (
browser_*):browser_open,browser_back,browser_wait,browser_stop,browser_get_tabs,browser_switch_tab - Observation & Extraction:
browser_observe,browser_read_page,browser_extract,browser_screenshot - Interaction:
browser_action,browser_click,browser_type,browser_fill,browser_scroll - Verification:
browser_verify - Session Management (
session_*):session_create,session_list,session_switch,session_close - Task & Safety Engine (
task_*):task_create,task_plan,task_next_step,task_status,task_history,task_control,task_propose_action,task_approve_action,task_reject_action,task_checkpoint,task_resume,task_summary - Native Chrome (
native_chrome_*):native_chrome_tabs,native_chrome_select_tab,native_chrome_permissions,native_chrome_observe,native_chrome_action,native_chrome_verify,native_chrome_deselect
Full schemas and parameters: docs/TOOLS_REFERENCE.md.
Demo Workflow
Run the built-in self-test against an ephemeral local portal:
vanjar demo
See docs/DEMO_WORKFLOW.md for a step-by-step agent workflow.
Security Architecture
- SSRF & Scheme Guard: HTTP/HTTPS-only navigation, private-IP/localhost/DNS-rebinding protection (
VANJAR_ALLOW_LOCALHOST=falseby default). - Prompt-Injection Framing & Redaction: Web content is wrapped in
<untrusted_webpage_content>delimiters; password/secret fields are automatically redacted from logs and tool outputs. - Zero-Download Policy:
acceptDownloads: falsein Playwright contexts. - Authenticated HTTP & Bridge: Mandatory Bearer auth on Streamable HTTP
/mcp;127.0.0.1-only extension bridge with 256-bit token, pairing code, and strictchrome-extension://origin validation.
Full security details: docs/SECURITY.md, docs/SECURITY_REVIEW.md, and docs/NATIVE_CHROME_SECURITY.md.
Troubleshooting
- Run
vanjar doctorto verify Node.js, SQLite schema, Playwright Chromium, extension build, and transport/security defaults. - Run
vanjar clientsto inspect detected client config paths and status. - See docs/TROUBLESHOOTING.md for common issues.
Known Limitations
- ChatGPT Web: Does not support local STDIO; requires a remote HTTPS Streamable HTTP endpoint and a ChatGPT plan/workspace with custom MCP connector access.
- Interactive Auth/CAPTCHA: Login, MFA, and CAPTCHA require human takeover (
task_checkpoint/task_resume); VANJAR never bypasses anti-bot protections. - Process Restarts: Interrupted tasks are marked
failed, pending approvals are invalidated, and prior Playwright sessions are markedunavailableon restart.
Development
npm run typecheck
npm run package:release
npm test
@sivanesan90007/vanjarnpm install @sivanesan90007/vanjar