Skip to content

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

@PeopleGradial

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

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