claude-code - 💡(How to fix) Fix Desktop MCP extensions (DXT) aren't path-rewritten on SSH sessions like plugins are

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

When connecting via SSH to a remote machine with a different home directory, Claude Desktop correctly rewrites plugin paths but passes raw local paths for DXT-style MCP extensions to the remote. The remote Node process can't resolve them.

Error Message

Spawning: node /Users/<local-user>/Library/Application Support/Claude/Claude Extensions/ant.dir.gh.anthropic.pdf-server-mcp/dist/index.js Error: Cannot find module '/Users/<local-user>/Library/Application Support/Claude/Claude Extensions/...'

Root Cause

When connecting via SSH to a remote machine with a different home directory, Claude Desktop correctly rewrites plugin paths but passes raw local paths for DXT-style MCP extensions to the remote. The remote Node process can't resolve them.

Fix Action

Fix / Workaround

Workarounds

Code Example

[CCD] SSH: rewrote 7/7 plugin path(s) to remote-synced dirs

---

Spawning: node /Users/<local-user>/Library/Application Support/Claude/Claude Extensions/ant.dir.gh.anthropic.pdf-server-mcp/dist/index.js
Error: Cannot find module '/Users/<local-user>/Library/Application Support/Claude/Claude Extensions/...'
RAW_BUFFERClick to expand / collapse

Summary

When connecting via SSH to a remote machine with a different home directory, Claude Desktop correctly rewrites plugin paths but passes raw local paths for DXT-style MCP extensions to the remote. The remote Node process can't resolve them.

Environment

  • Local machine: macOS, one username
  • Remote machine (via SSH): macOS, different username (different home directory)
  • The PDF MCP extension installed via the Desktop app's Extensions UI at ~/Library/Application Support/Claude/Claude Extensions/ant.dir.gh.anthropic.pdf-server-mcp/

Observed in logs

[CCD] SSH: rewrote 7/7 plugin path(s) to remote-synced dirs

Plugins are handled correctly — they're synced to ~/.claude/remote/plugins/... on the remote and paths are rewritten before being passed to ccd-cli.

Spawning: node /Users/<local-user>/Library/Application Support/Claude/Claude Extensions/ant.dir.gh.anthropic.pdf-server-mcp/dist/index.js
Error: Cannot find module '/Users/<local-user>/Library/Application Support/Claude/Claude Extensions/...'

DXT-style extension paths are not rewritten. The remote Node process tries to load the local path (/Users/<local-user>/...), which doesn't exist on the remote (/Users/<remote-user>/...), and fails with MODULE_NOT_FOUND.

Expected behavior

One of:

  1. Extensions get the same sync + path-rewrite treatment as plugins. Sync the extension's dist/ to the remote (analogous to the remote-synced plugin dir) and rewrite the path before spawning.
  2. Desktop skips spawning Claude Extensions on SSH sessions and logs a single informational line instead of a MODULE_NOT_FOUND per session.

Either is better than the current behavior (spawn + crash).

Impact

Low functional impact — the MCP tool is unavailable on SSH sessions, but the session still works for everything else. Noisy in logs: one failure per session start per affected extension.

Why this looks like a scope gap, not a design choice

The logs show that the SSH path-rewriting logic is already present and working for the plugins namespace. Extending it to DXT-style extensions (or making those extensions opt in/out of SSH handoff explicitly) seems like a localized fix rather than a broader refactor.

Workarounds

  1. Disable the PDF MCP extension for SSH sessions in the app settings (cleanest — stops the log spam).
  2. Manually install the PDF MCP server on the remote machine and configure it in ~/.claude/mcp.json there with an absolute path to the remote Node install. More setup but functional.

Related

  • #47977 (closed as duplicate) — structurally similar (DXT ${__dirname} resolves to MSIX-virtualized path on Windows; child processes can't resolve it). Different OS + mechanism, but the same class of bug: Claude Desktop and the spawned child process disagree on where the extension's files live.

extent analysis

TL;DR

The most likely fix is to extend the existing SSH path-rewriting logic to handle DXT-style extensions, similar to how plugins are handled.

Guidance

  • Investigate the SSH path-rewriting logic for plugins and determine how to apply a similar approach to DXT-style extensions.
  • Consider adding a configuration option to opt-in or opt-out of SSH handoff for DXT-style extensions.
  • Verify that the ccd-cli command is correctly handling the rewritten paths for plugins and apply a similar fix for DXT-style extensions.
  • Review the code for spawning Node processes and ensure that it correctly handles remote paths for DXT-style extensions.

Example

No code snippet is provided as the issue does not include specific code details.

Notes

The fix may require modifications to the Claude Desktop app's SSH path-rewriting logic and the handling of DXT-style extensions. The provided workarounds can be used as a temporary solution until a proper fix is implemented.

Recommendation

Apply a workaround, specifically disabling the PDF MCP extension for SSH sessions in the app settings, as it is the cleanest solution that stops log spam and allows for continued functionality.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

FAQ

Expected behavior

One of:

  1. Extensions get the same sync + path-rewrite treatment as plugins. Sync the extension's dist/ to the remote (analogous to the remote-synced plugin dir) and rewrite the path before spawning.
  2. Desktop skips spawning Claude Extensions on SSH sessions and logs a single informational line instead of a MODULE_NOT_FOUND per session.

Either is better than the current behavior (spawn + crash).

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING