Repository avatar
AI Tools
v0.8.4
active

vanjar

io.github.Sivanesanbalu/vanjar

Local AI browser automation: observe, act, verify, recover, with human approval for risky actions.

Documentation

VANJAR Logo

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

ClientTransportSetup CommandAuto-ConfigureGuide
Google AntigravitySTDIOvanjar setup --client antigravityYes (~/.gemini/config/mcp_config.json)docs/ANTIGRAVITY.md
Claude DesktopSTDIOvanjar setup --client claude-desktopYes (claude_desktop_config.json)docs/CLAUDE.md
Claude CodeSTDIOvanjar setup --client claude-codeYes (~/.claude.json)docs/CLAUDE.md
OpenAI Codex CLISTDIOvanjar setup --client codexYes (~/.codex/config.toml)docs/CODEX.md
CursorSTDIOvanjar setup --client cursorYes (.cursor/mcp.json)docs/CURSOR.md
ChatGPT (Custom MCP)Streamable HTTP (HTTPS)vanjar setup --client chatgptTemplate only (manual setup)docs/CHATGPT.md
Generic MCP ClientSTDIO / Streamable HTTPvanjar setup --client genericTemplate only (manual setup)docs/CLIENT-COMPATIBILITY.md

See docs/CLIENT-COMPATIBILITY.md for platform paths and vanjar clients / vanjar compatibility CLI 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.json with 0600 permissions if VANJAR_HTTP_TOKEN is not set)

Local vs. Remote MCP Connection

  • Local STDIO (Recommended for desktop/CLI agents): The AI client spawns node dist/index.js directly. Zero open MCP network ports, no Bearer token needed, lowest latency.
  • Streamable HTTP (--transport http): Exposes /mcp over HTTP with mandatory 256-bit Bearer authentication, Host/Origin DNS-rebinding checks, and a 1 MB request cap. Keep bound to 127.0.0.1 and 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

  1. Browser & Navigation (browser_*): browser_open, browser_back, browser_wait, browser_stop, browser_get_tabs, browser_switch_tab
  2. Observation & Extraction: browser_observe, browser_read_page, browser_extract, browser_screenshot
  3. Interaction: browser_action, browser_click, browser_type, browser_fill, browser_scroll
  4. Verification: browser_verify
  5. Session Management (session_*): session_create, session_list, session_switch, session_close
  6. 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
  7. 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=false by 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: false in 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 strict chrome-extension:// origin validation.

Full security details: docs/SECURITY.md, docs/SECURITY_REVIEW.md, and docs/NATIVE_CHROME_SECURITY.md.


Troubleshooting

  • Run vanjar doctor to verify Node.js, SQLite schema, Playwright Chromium, extension build, and transport/security defaults.
  • Run vanjar clients to 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 marked unavailable on restart.

Development

npm run typecheck
npm run package:release
npm test
NPM
@sivanesan90007/vanjar
Install Command
npm install @sivanesan90007/vanjar