Skip to main content
Glama

zen-mcp

The first MCP server for Zen Browser. Automate Zen from Claude Code, Cursor, or any MCP client.

No Selenium. No Playwright. No browser drivers. Just WebSocket.

Setup (2 minutes)

1. Start Zen with remote debugging

/Applications/Zen.app/Contents/MacOS/zen --remote-debugging-port 9222

Pro tip: Add alias zen='open /Applications/Zen.app --args --remote-debugging-port 9222' to your shell config. Then just run zen.

2. Add to Claude Code

# Option A: npm (recommended)
npm install -g zen-mcp

# Option B: Clone
git clone https://github.com/sh6drack/zen-mcp.git && cd zen-mcp && npm install

Add to ~/.claude/mcp_servers.json:

{
  "mcpServers": {
    "zen-browser": {
      "command": "zen-mcp"
    }
  }
}

If you cloned instead of npm install, use "command": "node", "args": ["/absolute/path/to/zen-mcp/server.mjs"]

Add to ~/.claude/settings.json:

{
  "permissions": {
    "allow": ["mcp__zen-browser__*"]
  }
}

That's it. Start a new Claude Code session and the zen_* tools are available.

Related MCP server: Tasker MCP

20 Tools

Browse

Tool

What it does

zen_navigate

Go to a URL

zen_list_pages

List all open tabs

zen_select_page

Switch to a tab

zen_new_tab

Open a new tab

zen_close_tab

Close a tab

See

Tool

What it does

zen_snapshot

Page structure with selectors (filter: all/interactive/form)

zen_screenshot

Capture a screenshot

zen_get_page_text

Get page title, URL, and text

zen_get_form_fields

List all form fields with labels and values

Interact

Tool

What it does

zen_click

Click an element

zen_fill

Type into an input or textarea

zen_select_option

Pick a dropdown option

zen_check

Toggle a checkbox or radio

zen_press_key

Keyboard input (Enter, Tab, Ctrl+A, etc.)

zen_fill_form

Fill multiple fields at once

zen_scroll

Scroll the page or to an element

Utility

Tool

What it does

zen_evaluate

Run JavaScript in the page

zen_wait

Wait N milliseconds

zen_wait_for

Wait for text or element to appear

zen_reconnect

Force reconnect to Zen

How It Works

Claude Code  ──stdio/MCP──>  zen-mcp  ──WebSocket/BiDi──>  Zen Browser

zen-mcp speaks WebDriver BiDi (W3C standard) directly over WebSocket. Form filling uses native value setters with input/change event dispatch so React, Vue, and Angular apps work correctly.

What Works Well

  • Navigation, clicking, form filling — rock solid, handles React/Vue/Angular

  • Screenshots and page reads — reliable content extraction

  • Tab management — open, close, switch between tabs

  • JavaScript evaluation — run any code in the page context

  • Keyboard input — shortcuts, Enter, Tab, modifier combos

Known Limitations

  • Zen inherits Firefox's WebDriver BiDi implementation, which is still maturing. Some advanced BiDi commands that work in Chrome may not be available yet.

  • Zombie sessions can only be cleared by restarting Zen (BiDi session.end is connection-scoped). zen-mcp detects this and tells you what to do.

  • No file upload or drag-and-drop support (BiDi spec limitation).

Built-in Reliability

  • Auto-reconnect with exponential backoff if WebSocket drops

  • Zombie session recovery when a previous client crashed

  • Connection retry (3 attempts with backoff)

  • Clean shutdown on SIGINT/SIGTERM to prevent orphaned sessions

Troubleshooting

Problem

Fix

"Cannot connect to Zen Browser"

Start Zen with --remote-debugging-port 9222

"Maximum number of active sessions"

Restart Zen: killall zen && zen

Connection keeps dropping

Use zen_reconnect to force a fresh connection

Config

Env Variable

Default

Description

ZEN_DEBUG_PORT

9222

Zen's remote debugging port

Requirements

Test

node test-e2e.mjs   # 21 tests, needs Zen running

License

MIT

Available Tools

20 tools
zen_checkB

Check/uncheck a checkbox or select a radio button

Inputs: selector (required), checked.

zen_clickB

Click an element by CSS selector

Inputs: selector (required).

zen_close_tabA

Close a tab by index. Cannot close the last remaining tab.

Inputs: index (required).

zen_evaluateB

Execute JavaScript in the page and return the result

Inputs: script (required).

zen_fillA

Fill a text input or textarea with a value. Clears existing content first. Dispatches input/change events for framework compatibility.

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

zen_fill_formA

Fill multiple form fields at once. Each field specifies selector, value, and action (fill/select/check/uncheck/click).

Inputs: fields (required).

zen_get_form_fieldsA

List all form fields on the page with names, types, labels, current values, and CSS selectors

Inputs: no named parameters.

zen_get_page_textA

Get the page title, URL, and visible text content. Useful for quickly understanding what is on the page.

Inputs: maxLength.

zen_list_pagesA

List all open pages/tabs in Zen browser with URLs and titles

Inputs: no named parameters.

zen_navigateB

Navigate the active page to a URL

Inputs: url (required).

zen_new_tabB

Open a new tab, optionally navigating to a URL

Inputs: url.

zen_press_keyA

Send keyboard input to the active page using BiDi input.performActions. Supports special keys like Enter, Tab, Escape, Backspace, and key combinations with modifiers.

Inputs: key (required), modifiers.

zen_reconnectA

Force disconnect and reconnect to Zen Browser. Use when the connection is in a bad state or after restarting Zen.

Inputs: no named parameters.

zen_screenshotB

Take a screenshot of the current page

Inputs: no named parameters.

zen_scrollB

Scroll the page or scroll an element into view

Inputs: direction, amount, selector.

zen_select_optionA

Select an option in a dropdown by value or text

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

zen_select_pageA

Select a page/tab by index (from zen_list_pages) as the active target

Inputs: index (required).

zen_snapshotA

Get a structured snapshot of visible page elements with CSS selectors. Filter: "all", "interactive", or "form".

Inputs: filter, selector.

zen_waitB

Wait for a specified number of milliseconds

Inputs: ms.

zen_wait_forA

Wait for text to appear on the page, or for a CSS selector to match an element. Returns when found or after timeout.

Inputs: text, selector, timeout.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 20 tools

    Disambiguation5/5

    Each tool serves a distinct browser automation purpose: clicking, filling forms, navigating, taking screenshots, etc. Even similar actions like zen_check and zen_click are clearly differentiated by element type, and zen_fill vs zen_fill_form by scope.

    Naming Consistency5/5

    All tools follow the 'zen_verb_noun' pattern with snake_case, e.g., zen_close_tab, zen_get_form_fields, zen_select_option. No mixed conventions or irregular names.

    Tool Count5/5

    20 tools cover the essential operations for browser automation (navigation, interaction, forms, tabs, debugging) without being overwhelming. Each tool seems necessary and well-scoped.

    Completeness4/5

    The tool set covers common browser automation workflows: navigation, click, fill, select, wait, screenshots, and tab management. Minor gaps exist (e.g., file upload, alert handling, iframe support), but core functionality is largely complete.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      D
      maintenance
      A beginner-friendly Model Context Protocol (MCP) server that helps users understand MCP concepts, provides interactive examples, and lists available MCP servers. This server is designed to be a helpful companion for developers working with MCP. Also comes with a huge list of servers you can install.
      3
      21 npm
      66
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server for Android's Tasker automation app
      53
      MIT