Skip to content

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

Closed

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).

  3. added this to the v2.3.0 milestone on Oct 25, 2026
  4. self-assigned this
    on Oct 28, 2026
  5. cliffhall commented on Oct 29, 2026

    @cliffhall
    MemberAuthor

    Shipped in #5380, merged into v2/main; it releases with milestone v2.3.0. Tested together with the rest of the #5269 work in the rollup #5405.

  6. added a commit that references this issue on Nov 4, 2026
    d665e43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions