Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows filesystem MCP enhancements #543

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

mfcasazza
Copy link

Description

Added support for Windows file paths with spaces in them. Also added support for linked directories.

Server Details

  • Server: filesystem
  • Changes to: server implementation and path resolution logic

Motivation and Context

I ran into this bug: #447 when trying to use the claude desktop app.

How Has This Been Tested?

Tested extensively with Claude desktop client on Windows using multiple scenarios:

  1. Basic directory access (Desktop folder)
  2. Access to program files (I used my World of Warcraft directory - C:\Program Files (x86)\World of Warcraft)
  3. Confirmed proper security boundaries (access denied for non-allowed paths)
  4. Verified directory/file type differentiation is maintained through symbolic links
  5. Added tests to address the scenarios in the open bug

Breaking Changes

No breaking changes. Existing configurations should continue to work as before - I tested locally with my desktop and downloads folders

Types of changes

  • New feature (non-breaking change which adds functionality)
  • [] Documentation update

Checklist

  • I have read the MCP Protocol Documentation
  • My changes follows MCP security best practices
  • I have updated the server's README accordingly
  • I have tested this with an LLM client
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have documented all environment variables and configuration options

Additional context

I don't have a mac - the code shouldn't affect mac paths - however was not able to test that locally

- Add path-utils module for consistent path handling
- Handle Windows paths with spaces via proper quoting
- Support Unix-style Windows paths (/c/path)
- Support WSL paths (/mnt/c/path)
- Add comprehensive test coverage
- Fix path normalization for all path formats

Closes modelcontextprotocol#447
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.

1 participant