Skip to main content
Glama
pinchtab-mcp

pinchtab-mcp

by maderwin

pinchtab-mcp

npm version npm downloads CI codecov License: MIT Node.js

Smithery Glama mcp.so

MCP server for PinchTab — control Chrome (or any Chromium browser) via accessibility tree snapshots through the Model Context Protocol.

PinchTab is included as a dependency and starts automatically — no manual setup required.

Quick Start

npx pinchtab-mcp

Or install globally:

npm install -g pinchtab-mcp
pinchtab-mcp

Related MCP server: cdpilot

Client Setup

Claude Desktop — add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "pinchtab": {
      "command": "npx",
      "args": ["-y", "pinchtab-mcp"]
    }
  }
}

With a custom browser (see Configuration):

{
  "mcpServers": {
    "pinchtab": {
      "command": "npx",
      "args": ["-y", "pinchtab-mcp"],
      "env": {
        "CHROME_BINARY": "/Applications/Yandex.app/Contents/MacOS/Yandex",
        "BRIDGE_HEADLESS": "false"
      }
    }
  }
}

Cursor / VS Code — add to .cursor/mcp.json or .vscode/mcp.json:

{
  "servers": {
    "pinchtab": {
      "command": "npx",
      "args": ["-y", "pinchtab-mcp"]
    }
  }
}

Claude Code:

claude mcp add pinchtab -- npx -y pinchtab-mcp

Configuration

Variable

Default

Description

PINCHTAB_URL

http://127.0.0.1:9867

PinchTab API endpoint

PINCHTAB_TOKEN

(empty)

Auth token (must match PinchTab's BRIDGE_TOKEN)

PINCHTAB_BIN

(auto-detect)

Explicit path to PinchTab binary

Binary lookup order: PINCHTAB_BIN → node_modules/.bin/pinchtab → system PATH.

PinchTab Configuration

PinchTab itself is configured via env variables or a config file (~/.config/pinchtab/config.json):

Variable

Default

Description

CHROME_BINARY

(bundled Chromium)

Path to browser binary — use this for Yandex Browser, Brave, Edge, etc.

CDP_URL

(none)

Connect to an already-running browser's DevTools (e.g. http://localhost:9222)

BRIDGE_HEADLESS

true

Set to false to see the browser window

BRIDGE_PORT

9867

PinchTab HTTP API port

BRIDGE_TOKEN

(none)

Protect the API with an auth token

BRIDGE_PROFILE

~/.config/pinchtab/chrome-profile

Browser profile directory (cookies, sessions)

BRIDGE_MAX_TABS

20

Max open tabs

BRIDGE_BLOCK_ADS

false

Block ads

BRIDGE_BLOCK_IMAGES

false

Block image loading (faster scraping)

BRIDGE_BLOCK_MEDIA

false

Block video/audio

BRIDGE_NO_ANIMATIONS

false

Disable CSS animations

BRIDGE_STEALTH

light

Anti-detection level

BRIDGE_TIMEZONE

(system)

Override timezone

BRIDGE_USER_AGENT

(auto)

Override User-Agent

CHROME_FLAGS

(none)

Extra flags passed to the browser

Custom Browser Examples

# Yandex Browser
CHROME_BINARY="/Applications/Yandex.app/Contents/MacOS/Yandex" npx pinchtab-mcp

# Brave
CHROME_BINARY="/Applications/Brave Browser.app/Contents/MacOS/Brave Browser" npx pinchtab-mcp

# Microsoft Edge
CHROME_BINARY="/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge" npx pinchtab-mcp

# Visible browser (non-headless) for debugging
BRIDGE_HEADLESS=false npx pinchtab-mcp

# Custom window size (default: random common resolution for stealth)
CHROME_FLAGS="--window-size=1920,1080" npx pinchtab-mcp

# Connect to an existing browser session (keeps your tabs, cookies, logins)
CDP_URL="http://localhost:9222" npx pinchtab-mcp

Documentation

For tools reference, project structure, agent workflow, and code style see PROJECT_INDEX.md.

Contributing

See CONTRIBUTING.md.

License

MIT

Available Tools

19 tools
pinchtab_clickClickA

Click an element by its ref ID (e.g. 'e5'). Uses human-like click by default. Set waitMs to get a snapshot after clicking (saves a round-trip). For SPAs, clicking may not cause full navigation.

Inputs: ref (required), humanClick, waitMs, waitNav.

pinchtab_close_tabClose TabB

Close the current tab or a specific tab by its ID.

Inputs: tabId.

pinchtab_cookiesGet CookiesA

Get all cookies for the current page.

Inputs: no named parameters.

pinchtab_evalEvaluate JavaScriptB

Execute JavaScript code in the page context. Returns the result of the expression.

Inputs: code (required).

pinchtab_focusFocusA

Focus an element by its ref ID. Useful for triggering focus-dependent UI (e.g. autocomplete dropdowns) without clicking.

Inputs: ref (required).

pinchtab_get_textGet TextA

Get readable text content from the page (~800 tokens). Best for extracting article content or page information.

Inputs: no named parameters.

pinchtab_healthHealth CheckA

Check if PinchTab server is running and responsive.

Inputs: no named parameters.

pinchtab_hoverHoverA

Hover over an element by its ref ID. Triggers mouseover/mouseenter events — useful for revealing tooltips, dropdown menus, or hover states.

Inputs: ref (required).

pinchtab_list_instancesList TabsA

List all open browser tabs. Returns tab IDs, URLs, and titles.

Inputs: no named parameters.

pinchtab_navigateNavigateA

Navigate the browser to a URL. Set waitMs to wait for page load and get a snapshot back automatically.

Inputs: url (required), newTab, waitMs.

pinchtab_pdfExport PDFA

Export the current page as a PDF. Returns the PDF as base64.

Inputs: no named parameters.

pinchtab_pressPress KeyC

Press a keyboard key (e.g. 'Enter', 'Tab', 'Escape', 'ArrowDown'). Optionally target a specific element.

Inputs: key (required), ref.

pinchtab_screenshotScreenshotB

Take a screenshot of the page. Returns a base64-encoded image.

Inputs: no named parameters.

pinchtab_scrollScrollA

Scroll the page or a specific element. Supports all four directions.

Inputs: direction (required), amount, ref.

pinchtab_selectSelectA

Select an option in a dropdown by its ref ID. Pass the option value or visible text.

Inputs: ref (required), value (required).

pinchtab_snapshotSnapshotA

Get an accessibility tree snapshot of the page. Returns element refs (e0, e1, …) that can be used with click/type/press. Use filter='interactive' for fewer tokens. Use format='compact' for minimal output.

Inputs: diff, filter, format.

pinchtab_typeTypeA

Type text into an input field by its ref ID. Uses human-like typing by default. Set clearFirst=true to click, select all, then type — required for React/Vue/Angular inputs where direct fill doesn't trigger state updates.

Inputs: ref (required), text (required), clearFirst, fast, +1 more.

pinchtab_waitWaitA

Wait for a specified number of seconds. Useful after navigation or dynamic content loading.

Inputs: seconds.

pinchtab_wait_for_selectorWait for SelectorA

Wait for a CSS selector to appear on the page. Polls every 500ms up to the timeout. Useful for waiting on dynamic content, modals, or lazy-loaded elements.

Inputs: selector (required), timeoutMs.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.7/5.0

    Scored across 19 tools

    Disambiguation5/5

    Each tool targets a distinct browser automation action (click, type, scroll, navigate, etc.) with no functional overlap. Even similar actions like click vs focus vs hover are clearly differentiated by their descriptions and use cases.

    Naming Consistency4/5

    All tools use the pinchtab_ prefix and snake_case. However, there is a minor inconsistency: some tools use verb_noun (e.g., pinchtab_list_instances, pinchtab_get_text) while others are just a noun (e.g., pinchtab_cookies, pinchtab_screenshot) instead of pinchtab_get_cookies or pinchtab_take_screenshot.

    Tool Count5/5

    19 tools cover the essential browser automation operations without being excessive. Each tool serves a clear purpose, and the number feels well-scoped for a comprehensive automation server.

    Completeness4/5

    The tool set covers most common browser interactions: navigation, input, events, screenshots, PDF, cookies, evaluation, and tab management. Missing features like file upload or drag-and-drop are minor gaps that can be worked around with eval.

    Maintenance

    ActivityInactive
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      Not graded
      maintenance
      Enables browser automation through Playwright using accessibility tree snapshots instead of screenshots. Supports web scraping, form interactions, testing, and connecting to existing browser sessions with logged-in accounts.
      23
      9,076 npm
      5
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      Zero-dependency browser automation CLI with 40+ commands. Navigate, click, fill forms, take screenshots, capture network traffic, and more — all via Chrome DevTools Protocol. Built-in accessibility tree snapshots for AI agents (500x fewer tokens than screenshot-based approaches). Works with any Chromium browser already installed. 50KB total, no Playwright or Puppeteer needed.
      322 npm
      33
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to drive a real headless Chrome over the DevTools Protocol without any extension, exposing tools to list, open, navigate and read tabs as compact accessible outlines with element refs, click, type, scroll, take screenshots, and inject scripts. It also runs horizontal-overflow and WCAG AA contrast audits via both an MCP tool and a CI-friendly CLI.
      10 npm
      MIT