Pinchtab crab mascot

Pinchtab

Browser control for AI agents

12MB Go binary. Launches Chrome, exposes an HTTP API. Any agent, any language, even curl.

Go 12MB binary HTTP API MIT license Zero config
View on GitHub Quick Start
Quick Start

Up and running in seconds

One command to install. Chrome opens. You log into your sites. Agents drive the rest.

terminal
# Install
go install github.com/luigi-agosti/pinchtab@latest

# Run — Chrome opens with persistent profile
pinchtab

# Read a page — ~800 tokens instead of 10,000
curl localhost:9867/text

# Click a button by ref
curl -X POST localhost:9867/action -d '{"kind":"click","ref":"e5"}'
The Problem

Browser tools shouldn't have lock-in

Playwright MCP, Browser Use, OpenClaw — all tightly coupled to their own frameworks. Switch agents and you start over. Pinchtab is a standalone HTTP server. No SDK required.

Pinchtab OpenClaw Browser Playwright MCP
Tokens/page ~800 (/text) ~10,000+ ~10,000+
Interface HTTP — any language Internal only MCP protocol
Stealth mode
Sessions persist
Binary size 12MB Node.js
Lock-in None OpenClaw MCP clients
Token Efficiency

5-13x cheaper than alternatives

Measured on a live search results page. Use /text when you only need content.

10,500
Full
snapshot
3,600
Interactive
filter
~2,000
Screenshot
(vision)
~800
Pinchtab
/text
What It Does

Everything your agent needs

Accessibility-first. Token-efficient. Framework-agnostic.

🌲

Accessibility Tree

Structured tree with stable refs (e0, e1...) for click, type, read. Deterministic — no coordinate guessing.

🎯

Smart Filters

?filter=interactive returns only buttons, links, inputs. 75% fewer tokens per snapshot.

🕵️

Stealth Mode

Patches navigator.webdriver, spoofs UA, hides automation flags. Passes bot detection on major sites.

💾

Persistent Sessions

Cookies, auth, tabs survive restarts. Log in once via the Chrome window, stay logged in forever.

📝

Text Extraction

Readability mode strips nav/ads. Raw mode for full text. ~800 tokens per page read.

🔄

Smart Diff

?diff=true returns only what changed since the last snapshot. Built for monitoring.

🖱️

Direct Actions

Click, type, fill, press, focus, hover, select, scroll — by ref or CSS selector. 15s timeouts.

JS Evaluation

Escape hatch for anything the API doesn't cover. Run arbitrary JavaScript in any tab.

📸

Screenshots

JPEG with quality control for visual verification. Base64 encoded or raw bytes.

Architecture

Simple by design

One binary. One Chrome. HTTP in, CDP out.

┌─────────────┐ HTTP :9867 ┌──────────────┐ ┌─────────┐ Any Agent ──────────────► Pinchtab ── CDP ──► Chrome (OpenClaw, snapshot, act, PicoClaw, navigate, eval stealth + your curl, sessions + tabs scripts) a11y tree └─────────────┘ └──────────────┘ └─────────┘
Full API

9 endpoints. That's it.

Read-only GETs for data, POSTs for mutations. All JSON.

MethodEndpointDescription
GET /health Connection status
GET /tabs List open tabs
GET /snapshot Accessibility tree — primary interface
GET /screenshot JPEG screenshot
GET /text Readable text — readability or raw
POST /navigate Go to URL
POST /action Click, type, fill, press, hover, select, scroll
POST /evaluate Execute JavaScript
POST /tab Open / close tabs
Security

Your browser, your responsibility

Pinchtab gives AI agents full control of a real browser with your real accounts. That's what makes it useful. It also means you need to think about what you're doing.

⚠️

When you log into sites through Pinchtab's Chrome window, those sessions persist. Any agent with HTTP access can then act as you — read your email, post on your behalf, access sensitive data.

  • You are responsible for what agents do with your accounts. Pinchtab is a tool, not a guardrail.
  • Set BRIDGE_TOKEN — without it, anyone on your network can control your browser.
  • Treat ~/.pinchtab/ as sensitive — it holds your Chrome profile with all saved sessions.
  • Start with low-risk accounts. Test with throwaway accounts before pointing agents at anything important.
  • No data leaves your machine — but the agents you connect might send data wherever they want.

Think of it like giving someone your unlocked laptop. Powerful if you trust them. Dangerous if you don't.

Configuration

All env vars. Zero files.

📦 Go Install

go install github.com/luigi-agosti/pinchtab@latest

🔧 Build from Source

git clone https://github.com/luigi-agosti/pinchtab.git
cd pinchtab && go build -o pinchtab .
./pinchtab

⚙️ Environment

BRIDGE_PORT=9867
BRIDGE_TOKEN=your-secret
BRIDGE_HEADLESS=true
BRIDGE_NO_RESTORE=true

🤖 With Your AI Agent

# Just ask your agent:
"Install Pinchtab and set it up
for browser automation."