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

@simplysm/mcp-playwright

v13.0.85

Published

Simplysm MCP server — multi-session Playwright proxy

Readme

@simplysm/mcp-playwright

Multi-session Playwright MCP (Model Context Protocol) server. Wraps @playwright/mcp to support multiple isolated browser sessions, each identified by a sessionId.

Installation

npm install @simplysm/mcp-playwright

Overview

This package provides a stdio-based MCP server that proxies all @playwright/mcp tools while adding multi-session support. Each tool call requires a sessionId parameter, ensuring that different consumers can operate independent browser instances without interference.

Key features:

  • Session isolation -- each sessionId gets its own browser context via @playwright/mcp
  • Automatic cleanup -- idle sessions are destroyed after a configurable timeout (default: 5 minutes)
  • Broken connection recovery -- if an underlying Playwright connection breaks, the session is destroyed and the error is reported
  • All @playwright/mcp tools are automatically discovered and proxied with the added sessionId parameter

Usage

As an MCP server (CLI)

The package publishes a sd-mcp-playwright binary:

npx sd-mcp-playwright

The server communicates over stdio using the MCP protocol. It is designed to be launched by an MCP client (e.g., Claude Code, an IDE extension, or any MCP-compatible host).

MCP client configuration example

{
  "mcpServers": {
    "playwright": {
      "command": "npx",
      "args": ["sd-mcp-playwright"]
    }
  }
}

Tools

All tools from @playwright/mcp are automatically proxied with an additional required sessionId parameter. In addition, two session-management tools are provided:

session_close

Close a browser session and release resources.

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | sessionId | string | Yes | Session ID to close |

session_list

List all active browser session IDs. Returns a JSON array of session ID strings.

No parameters required.

Proxied Playwright tools

Every tool exposed by @playwright/mcp (e.g., browser_navigate, browser_click, browser_snapshot, browser_take_screenshot, etc.) is available with an injected sessionId parameter. The sessionId is stripped before forwarding the call to the underlying Playwright MCP connection.

Configuration

The server launches browsers with the following defaults:

| Option | Value | |--------|-------| | Headless mode | true | | Browser isolation | true (each session gets its own context) | | Output directory | .tmp/playwright (screenshots, PDFs, downloads) | | Session idle timeout | 5 minutes | | Cleanup interval | 30 seconds |

API

SessionManager

Manages the lifecycle of multiple isolated Playwright MCP sessions.

import { SessionManager } from "@simplysm/mcp-playwright";

constructor(config, timeoutMs?, version?)

| Parameter | Type | Default | Description | |-----------|------|---------|-------------| | config | CreateConnectionConfig | -- | Configuration passed to @playwright/mcp createConnection() | | timeoutMs | number | 300000 (5 min) | Idle timeout before a session is automatically destroyed | | version | string | "0.0.0" | Version string for the internal MCP client |

getOrCreate(sessionId: string): Promise<Client>

Returns the MCP Client for the given session, creating a new one if it does not exist. Concurrent calls with the same sessionId are coalesced (only one session is created).

destroy(sessionId: string): Promise<void>

Closes and removes the session with the given ID. No-op if the session does not exist.

disposeAll(): Promise<void>

Destroys all active sessions and stops the background cleanup timer.

list(): string[]

Returns an array of all active session IDs.

registerProxiedTools(server, sessionManager): Promise<void>

Discovers all tools from @playwright/mcp, injects the sessionId parameter, adds session-management tools (session_close, session_list), and registers request handlers on the given MCP Server.

import { registerProxiedTools } from "@simplysm/mcp-playwright";

injectSessionId(tool: Tool): Tool

Utility that takes an MCP Tool definition and returns a copy with a required sessionId property added to its input schema.

import { injectSessionId } from "@simplysm/mcp-playwright";