Skip to content

Plugin not respecting $PATH? MCP can't call npx/node #869

Description

@Datamance

Which version of LM Studio?
Example: LM Studio 0.3.22

Which operating system?
Mac

What is the bug?
Try adding something like playwright to mcp.json

...
    "context7": {
      "url": "https://mcp.context7.com/mcp"
    },
    "deepwiki": {
      "url": "https://mcp.deepwiki.com/mcp"
    },
    "playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ]
    }
...

And the plugin process will fail to start, due to [Plugin(mcp/playwright)] stderr: env: node: No such file or directory. This happens even when I open LMStudio from the command line.

I manage my node installation with mise, so there's quite a few shimmed paths that might be confusing LM Studio as to where npx/node live... Just a guess.

I can add streaming http MCP sources just fine.

Logs

Developer Logs
2025-08-07 11:47:22 [DEBUG]
[Client=plugin:installed:lmstudio/js-code-sandbox] Client created.
2025-08-07 11:47:22 [INFO]
[Plugin(lmstudio/js-code-sandbox)] stdout: [Tools Prvdr.] Register with LM Studio
2025-08-07 11:47:23 [DEBUG]
[Client=plugin:installed:lmstudio/js-code-sandbox][Endpoint=setToolsProvider] Registering tools provider.
2025-08-07 12:06:32 [DEBUG]
[Client=plugin:installed:lmstudio/js-code-sandbox] Client created.
2025-08-07 12:06:32 [INFO]
[Plugin(lmstudio/js-code-sandbox)] stdout: [Tools Prvdr.] Register with LM Studio
2025-08-07 12:06:32 [DEBUG]
[Client=plugin:installed:lmstudio/js-code-sandbox][Endpoint=setToolsProvider] Registering tools provider.
2025-08-07 12:07:25 [DEBUG]
[Client=plugin:installed:mcp/playwright] Client created.
2025-08-07 12:07:25 [ERROR]
[Plugin(mcp/playwright)] stderr: env: node: No such file or directory
2025-08-07 12:07:25 [ERROR]
[Plugin(mcp/playwright)] stderr: Error in LM Studio MCP bridge process: _0xb7292 [McpError]: MCP error -32000: Connection closed
at _0x589280._onclose (/Applications/LM Studio.app/Contents/Resources/app/.webpack/lib/mcpbridgeworker.js:1:827846)
at .onclose (/Applications/LM Studio.app/Contents/Resources/app/.webpack/lib/mcpbridgeworker.js:1:826574)
at ChildProcess. (/Applications/LM Studio.app/Contents/Resources/app/.webpack/lib/mcpbridgeworker.js:1:801737)
at ChildProcess.emit (node:events:519:28)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5) {
code: -32000,
data: undefined
}
2025-08-07 12:07:25 [ERROR]
[Plugin(mcp/playwright)] stderr: _0xb7292 [McpError]: MCP error -32000: Connection closed
at _0x589280._onclose (/Applications/LM Studio.app/Contents/Resources/app/.webpack/lib/mcpbridgeworker.js:1:827846)
at .onclose (/Applications/LM Studio.app/Contents/Resources/app/.webpack/lib/mcpbridgeworker.js:1:826574)
at ChildProcess. (/Applications/LM Studio.app/Contents/Resources/app/.webpack/lib/mcpbridgeworker.js:1:801737)
at ChildProcess.emit (node:events:519:28)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5) {
code: -32000,
data: undefined
}
2025-08-07 12:07:25 [DEBUG]
[Client=plugin:installed:mcp/playwright] Client disconnected.

To Reproduce

  1. add playwright to mcp config:
...
"playwright": {
      "command": "npx",
      "args": [
        "@playwright/mcp@latest"
      ]
    }
...

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