npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@krakerxyz/browser-mcp

v1.2.1

Published

MCP server package for remote browser automation.

Readme

@krakerxyz/browser-mcp

MCP server package for remote browser automation.

@krakerxyz/browser-mcp is the MCP-facing bridge your AI tool runs locally.

It is designed to be launched by an MCP host (for example from .mcp.json) and connects that host to a Browser MCP backend over WebSocket.

What it is used for

  • Give MCP-compatible assistants access to a real Chromium browser session
  • Support browser actions such as opening pages, navigation, DOM reads, JS execution, clicks, and screenshots
  • Keep reusable named sessions on the server so reconnects can continue prior work
  • Reach local/dev-only services through optional tunnel ports

Session model

A session is an isolated browser instance (browser context) on the server.

  • Each session keeps its own pages and state isolated from other sessions
  • Anonymous sessions are created when no --name is provided
  • Named sessions let you reconnect to that same isolated browser context later

How it works

  1. Your MCP host starts this package over stdio.
  2. This package connects to a Browser MCP server (ws://.../ws/client).
  3. On connect, it discovers tools from the server and registers them dynamically.
  4. MCP tool calls are forwarded to the remote browser backend.
  5. Results are returned to your MCP host over stdio.

This means new server tools can be added without requiring a matching MCP package release.

MCP host configuration (.mcp.json)

Minimal example:

{
  "mcpServers": {
    "browser": {
      "command": "npx",
      "args": [
        "-y",
        "@krakerxyz/browser-mcp",
        "--server",
        "ws://localhost:3100",
        "--api-key",
        "change-me"
      ]
    }
  }
}

Configuration options

  • --server <ws-url> (required): Browser MCP server URL, for example ws://localhost:3100
  • --api-key <key> (optional): Required when the server has API_KEY enabled
  • --name <session-name> (optional): Reuses a named remote session instead of always creating a new anonymous one
  • --tunnel-port <port> (optional, repeatable): Enables localhost tunneling for specific ports

Named sessions

When you set --name, the server associates your connection with that session name.

  • Reconnecting with the same name resumes that named session when available
  • Multiple MCP clients can connect to the same named session at the same time and share that browser state
  • Tunnel ports must be decided when the named session is first created (you cannot add tunneling later to an existing non-tunneled session)
  • This is useful for long-lived workflows where tabs/session state should survive MCP host restarts or reconnects

Named session .mcp.json example:

{
  "mcpServers": {
    "browser": {
      "command": "npx",
      "args": [
        "-y",
        "@krakerxyz/browser-mcp",
        "--server",
        "ws://localhost:3100",
        "--api-key",
        "change-me",
        "--name",
        "my-workspace"
      ]
    }
  }
}

Tunnel ports

Tunnel ports let the remote browser reach services that are only accessible from the MCP host machine (for example local dev servers).

Example: with --tunnel-port 3000, browsing to http://localhost:3000 in the remote browser is tunneled to port 3000 on the MCP host.

Multiple tunnel ports are supported by repeating --tunnel-port.

Tunnel .mcp.json example:

{
  "mcpServers": {
    "browser": {
      "command": "npx",
      "args": [
        "-y",
        "@krakerxyz/browser-mcp",
        "--server",
        "ws://localhost:3100",
        "--api-key",
        "change-me",
        "--tunnel-port",
        "3000",
        "--tunnel-port",
        "5173"
      ]
    }
  }
}

Available tools

Tools are discovered dynamically from the server on connect. The current set of tools provided by the server:

| Tool | Description | |------|-------------| | browser_open_page | Open a new browser page and navigate to a URL | | browser_close_page | Close a browser page | | browser_list_pages | List all open pages in the current browser session | | browser_navigate | Navigate an existing page to a new URL | | browser_execute_js | Execute JavaScript in a page context. Expression must return a JSON-serializable value. | | browser_get_dom | Get DOM HTML content. Returns full page HTML or matching elements for a CSS selector. | | browser_capture_screenshot | Capture a screenshot of a page. Returns both an inline image and a downloadable URL. | | browser_click | Click on an element by CSS selector or coordinates | | browser_set_cookies | Set one or more cookies in the current browser session context. Supports HttpOnly/Secure cookies. | | browser_get_cookies | Get cookies from the current browser session context. |

Because tools are registered dynamically from the server, new tools added to the server become available to the MCP host without requiring a new release of this package.

Server setup (Docker Compose)

services:
  browser-mcp:
    image: joshkrak/browser-mcp:latest
    container_name: browser-mcp
    restart: unless-stopped
    ports:
      - "3100:3100"
    environment:
      API_KEY: "${BROWSER_MCP_API_KEY}"
    volumes:
      - browser-mcp-data:/data

volumes:
  browser-mcp-data:

If your MCP host is not on the same machine as Docker, replace ws://localhost:3100 with your reachable server URL.