Skip to content

Browserstack integration with Cline in Windows is not working #69

Open

Description

@uthircloudnative

Hi,

I am trying use Browserstack MCP server with Cline in my windows machine getting below error.

node:events:502 throw er; // Unhandled 'error' event ^ Error: EPERM: operation not permitted, open
'C:\Program Files\Microsoft VS Code\NUL' Emitted 'error' event on ThreadStream instance at: at Immediate.<anonymous>
(C:<My project path>\index.js:369:12) at process.processImmediate (node:internal/timers:491:21) Node.js v22.13.1 MCP error -32000: Connection closed

My System configuration

Window 11 Enterprise
Node v22.13.1
VS Code 1.98.2

My Cline MCP server configuration.

"browserstack-mcp-server": {
  "disabled": false,
  "timeout": 180,
  "command": "node",
  "args": [
    "C:\\<path>\\mcp-server-main\\dist\\index.js"
  ],
"env": {
        "BROWSERSTACK_USERNAME": "<userName>",
        "BROWSERSTACK_ACCESS_KEY": "<AccessKey>"
      },
  "transportType": "stdio"
}

In this case I downloaded the MCP server code to my local and started the mcp server with

node dist/index.js

When I execute above command code is getting started without any issue. But when I connect this server in Cline getting above error.

Not sure its some permission issue. I have tried to run my VS code in administrator mode but still got the above error.

Got the same error with below config as well

"browserstack-mcp-server": {
  "disabled": false,
  "timeout": 180,
  "command": "npx",
  "args": [
        "/c",
        "npx",
        "-y",
        "@browserstack/mcp-server@1.1.5"
      ],
"env": {
        "BROWSERSTACK_USERNAME": "<userName>",
        "BROWSERSTACK_ACCESS_KEY": "<AccessKey>"
      },
  "transportType": "stdio"
}

Activity

  1. pulkitsharma07 commented on Jun 16, 2025

    @pulkitsharma07
    Contributor

    Can you try running this npx @browserstack/mcp-server@latest in powershell ?
    Expected output is actually nothing, the server will start but won't print anything to the console.

  2. uthircloudnative commented on Jun 16, 2025

    @uthircloudnative
    Author

    I can able to run the application with command line interface with below command.
    npx -y @browserstack/mcp-server@1.1.5 --BROWSERSTACK_ACCESS_KEY= --BROWSERSTACK_USERNAME=

    Once the application is starts I need to configure this MCP server with Cline and Cline tool should be able to integrate with running MCP server. When Cline is try to connect this MCP I am getting above mentioned issue.

    Looks like from Cline when try to connect the running MCP (bowserStackServer) its trying to make some changes in my VS Code folder file that's where I am getting Operation Not permitted issue.

  3. korggy commented on Sep 13, 2026

    @korggy

    I’m seeing what appears to be the same issue with @browserstack/mcp-server 1.3.3 on Windows, launched by Codex Desktop using Node.js and npx.

    In my case, the working directory is writable, so the server starts successfully but creates a literal NUL file in the repository root. Git then shows it as an untracked file. Deleting it only helps until the server starts again.

    The file contains these startup messages:

    Launching BrowserStack MCP server, version 1.3.3
    Creating BrowserStack MCP Server, version 1.3.3
    

    The installed dist/logger.js appears to explain the behavior. Its default, non-development branch uses:

    currentLogger = pino({
      level: "info",
      transport: {
        target: "pino/file",
        options: {
          destination: process.platform === "win32" ? "NUL" : "/dev/null",
        },
      },
    });

    The intent is to discard logs, but this logging path produces a real file named NUL on my system. That would also explain the original report’s EPERM when the working directory is protected.

    Could the default branch disable logging directly—for example, with pino({ enabled: false }) and no file transport—instead of opening a null-device path? Any enabled diagnostic logging should also stay off stdout because stdout carries the MCP protocol.

    A useful Windows regression check would start the server with NODE_ENV unset in an empty writable directory, then verify that it initializes without creating NUL or another log file. Testing a non-writable working directory would cover the original failure too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions