Skip to content

filesystem: a dangling symlink is reported as "Parent directory does not exist" #5191

Open

Description

@cliffhall

Problem

When the requested path is a symlink whose target does not exist, fs.realpath in validatePath (src/filesystem/lib.ts) fails with ENOENT and the code falls through to resolveUnicodeEquivalentPath, whose own realpath of the entry fails as well. validatePath reports that as "Parent directory does not exist:

", naming a directory that does exist. src/filesystem/__tests__/server-paths.test.ts pins the message.

Expected

The error says the path is a broken symlink. Refusing the request is correct and stays.

Prior work

The PR(s) above targeted the pre-refactor code and are closed as part of the backlog triage in #4875; this issue is where the work continues, with the PR(s) as a prototype. Thank you to their authors.

Activity

  1. added
    bugSomething isn't working
    server-filesystemReference implementation for the Filesystem MCP server - src/filesystem
    on Oct 20, 2026
  2. cliffhall commented on Oct 20, 2026

    @cliffhall
    MemberAuthor

    Triage: Priority Low (total 5)

    • Severity 2: a misleading error message; the refusal itself is correct
    • Urgency 2: wanted eventually
    • Bonuses:
    • +1 bug label

    Filed from the PR backlog triage (#4877). Board: Servers V2 (#43), Status Incoming, awaiting maintainer review (no milestone yet).

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

    bugSomething isn't workingserver-filesystemReference implementation for the Filesystem MCP server - src/filesystemv2

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions