Skip to content

Claude Desktop Filesystem extension ships outdated dist with root path normalization bug #3417

Closed as not planned

Description

@PeopleGradial

Bug

The Filesystem MCP server extension bundled with Claude Desktop (macOS) ships a compiled dist/path-utils.js that contains a bug already fixed in the source.

The bug

normalizePath("/") returns "" (empty string), causing the server to crash on startup with:

Error accessing directory : Error: ENOENT: no such file or directory, stat ''

Root cause

The installed extension (version 2025.8.21) has the old regex in dist/path-utils.js:

return p.replace(/\/+/g, '/').replace(/\/+$/, '');

This strips the trailing slash from /, producing an empty string.

Already fixed in source

The current TypeScript source (src/filesystem/path-utils.ts) uses a negative lookbehind that correctly preserves /:

return p.replace(/\/+/g, '/').replace(/(?<!^)\/$/, '');

There are even existing tests for this case:

expect(normalizePath('/')).toBe('/');
expect(normalizePath('///')).toBe('/');

Steps to reproduce

  1. Install the Filesystem MCP server extension in Claude Desktop (macOS)
  2. Add / as an allowed directory
  3. Restart Claude Desktop
  4. Server crashes immediately — visible in ~/Library/Logs/Claude/mcp-server-Filesystem.log

Expected

The extension should ship a build that includes the root path fix from the source.

Environment

  • Claude Desktop on macOS (Darwin 25.3.0, Apple Silicon)
  • Extension: ant.dir.ant.anthropic.filesystem
  • Installed @modelcontextprotocol/server-filesystem version: 2025.8.21
  • Upstream source version: 0.6.3

Activity

  1. xXMrNidaXx commented on Feb 28, 2026

    @xXMrNidaXx

    This is a build/release pipeline issue — the extension bundle shipped to Claude Desktop users doesn't match the source.

    Immediate workaround for affected users:

    1. Find the installed extension:

      ~/Library/Application\ Support/Claude/claude_desktop_config.json
      

      Check mcpServers.filesystem.command for the path to the installed package.

    2. Patch the regex directly in dist/path-utils.js:

      // Change this:
      return p.replace(/\/+/g, '/').replace(/\/+$/, '');
      
      // To this:
      return p.replace(/\/+/g, '/').replace(/(?<!^)\/$/, '');
    3. Or, install the upstream version directly instead of using the bundled extension:

      npm install -g @modelcontextprotocol/server-filesystem@latest

      Then update claude_desktop_config.json to point to the global install.

    Root cause speculation:

    The extension version 2025.8.21 suggests a snapshot from August 2025. If the fix landed after that snapshot was taken, it wouldn't be in the bundled build. The versioning gap (2025.8.21 vs upstream 0.6.3) makes it hard to track which commits are included.

    Suggestion for maintainers:

    Consider adding a CI check that verifies the dist/ output is deterministic and matches a clean rebuild from src/. This would catch cases where dist/ gets out of sync with src/ before a release.

  2. cliffhall commented on Oct 19, 2026

    @cliffhall
    Member

    Closing: superseded by the v2 release.

    Thank you for reporting this, and apologies for the long wait for a response.

    Since this was filed, the reference servers have been rebuilt for the 2026-07-28 MCP specification (#4857) and released as v2 (2.0.0 on npm for the TypeScript servers, 2026.10.19 on PyPI for the Python servers). Each server now runs on v2 of its SDK, and the behavior described here has either been fixed or no longer exists in the same form. The root-path normalization fix is in current source; the outdated build ships in the Claude Desktop extension bundle, which is maintained outside this repository.

    This is not a judgment on whether the problem was real; it's a consequence of the code it describes having been replaced. This is happening as part of the backlog triage in #4875.

    If this still happens on the v2 release, we'd genuinely like to know. Please open a fresh issue with the version you're running and steps to reproduce, and we'll look at it. Note that this repository accepts contributions as issues rather than pull requests; see CONTRIBUTING.md.

    Thanks for taking the time to report it.

  3. added
    closed-superseded-v2Closed: fixed or made obsolete by the v2 / 2026-07-28 refactor (#4875)
    on Oct 19, 2026
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

    closed-superseded-v2Closed: fixed or made obsolete by the v2 / 2026-07-28 refactor (#4875)

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions