Skip to content

fix(mcp): support pnpm global shim with separate node runtime - #6601

Open
ordinary-s wants to merge 1 commit into
t8y2:mainfrom
ordinary-s:fix/mcp-pnpm-split-runtime
Open

fix(mcp): support pnpm global shim with separate node runtime#6601
ordinary-s wants to merge 1 commit into
t8y2:mainfrom
ordinary-s:fix/mcp-pnpm-split-runtime

Conversation

@ordinary-s

Copy link
Copy Markdown

Fixes #6370

Root cause:
DBX MCP discovery only searched MCP package bound to selected Node runtime and ignored valid pnpm global shims from separate PNPM_HOME.

Solution:
Resolve PATH shims safely by validating package identity and Node compatibility before launching.

Testing:

  • Added regression test for split PNPM_HOME layout
  • Existing MCP tests pass

@github-actions github-actions Bot added area/desktop Desktop application or Tauri shell bug Something isn't working labels Aug 18, 2026

@t8y2 t8y2 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The real pnpm global-shim path is still not supported by this implementation.

node_script_from_launcher() accepts a direct JavaScript file or a launcher containing the custom # cmd-shim-target= marker, but standard pnpm shims do not contain that marker. A clean pnpm 10.27.0 global install of @dbx-app/mcp-server@0.4.66 produces a normal POSIX shell shim; pnpm's cmd-shim implementation likewise produces standard shell, .cmd, and PowerShell launchers. Those files are rejected by the current parser, so the original split PNPM_HOME case still resolves to [dbxMcpMissing]. The new test only constructs a synthetic launcher with the private marker and therefore does not reproduce pnpm output.

The same discovery result also needs to drive status, version reporting, update, and uninstall. Currently the PATH shim can make status appear installed while script_path and version remain missing, update targets the unrelated Node runtime, and uninstall refuses because that runtime does not own the package.

Please use real pnpm-generated POSIX/Windows fixtures and implement one safe, shared discovery result for launch, status, update, and uninstall. Keep the existing package-identity, path-containment, and Node-engine checks.

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

Labels

area/desktop Desktop application or Tauri shell bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 使用pnpm全局安装的mcp无法在内置的agent中使用

2 participants