pinchtab-mcp
pinchtab-mcp
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-mcpOr install globally:
npm install -g pinchtab-mcp
pinchtab-mcpRelated 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-mcpConfiguration
Variable | Default | Description |
|
| PinchTab API endpoint |
| (empty) | Auth token (must match PinchTab's |
| (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 |
| (bundled Chromium) | Path to browser binary — use this for Yandex Browser, Brave, Edge, etc. |
| (none) | Connect to an already-running browser's DevTools (e.g. |
|
| Set to |
|
| PinchTab HTTP API port |
| (none) | Protect the API with an auth token |
|
| Browser profile directory (cookies, sessions) |
|
| Max open tabs |
|
| Block ads |
|
| Block image loading (faster scraping) |
|
| Block video/audio |
|
| Disable CSS animations |
|
| Anti-detection level |
| (system) | Override timezone |
| (auto) | Override User-Agent |
| (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-mcpDocumentation
For tools reference, project structure, agent workflow, and code style see PROJECT_INDEX.md.
Contributing
See CONTRIBUTING.md.
License
MIT
Available Tools
19 toolspinchtab_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_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
Scored across 19 tools
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.
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.
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.
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
Related MCP Connectors
Automate cloud Chrome—navigate, click, type, screenshot, run code, record screen video
Hosted browser for AI agents: screenshots, post-JS DOM, console, WCAG. No install, no API key.
Cloud browser, web extraction, screenshots, and remote CDP tools for AI agents.
Give AI agents a real cloud Chrome: open sessions, navigate, read pages, click, type and screenshot.
Related MCP Servers
- AlicenseAqualityNot gradedmaintenanceEnables 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.239,076 npm5-
- AlicenseNot gradedqualityBmaintenanceZero-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 npm33MIT
- AlicenseBqualityCmaintenanceEnables AI tools to drive a hosted headless-Chromium browser over HTTP, letting them navigate, click, type, and read web pages through accessibility snapshots.2310,233,094 npmApache 2.0
- AlicenseNot gradedqualityCmaintenanceEnables 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 npmMIT