Skip to content

fix(filesystem): normalize paths for glob matching#4373

Open
go165 wants to merge 1 commit into
modelcontextprotocol:mainfrom
go165:go165/filesystem-posix-glob-paths
Open

fix(filesystem): normalize paths for glob matching#4373
go165 wants to merge 1 commit into
modelcontextprotocol:mainfrom
go165:go165/filesystem-posix-glob-paths

Conversation

@go165

@go165 go165 commented Jun 14, 2026

Copy link
Copy Markdown

Summary

  • normalize filesystem search relative paths to POSIX separators before minimatch evaluation
  • keep returned search results unchanged as full filesystem paths
  • add a regression test for Windows-style relative paths matching slash-based glob patterns

Fixes #3517

Validation

  • npm exec --workspace src/filesystem -- vitest run tests/lib.test.ts --coverage=false
  • git diff --check

Blocked local checks:

  • npm test --workspace src/filesystem: the target lib suite passed, but the full package test run also invokes startup/structured-content tests that require dist/index.js and workspace SDK resolution in this fresh worktree.
  • npm run build --workspace src/filesystem: blocked in this fresh worktree because @modelcontextprotocol/sdk workspace dependencies are not installed/resolved locally. I used the existing dependency checkout only for the targeted lib test and did not reinstall the full workspace.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Filesystem server glob pattern matching inconsistent across platforms

1 participant