Skip to content

Fix windows absolute path parsing bug#3205

Merged
olaservo merged 1 commit intomodelcontextprotocol:mainfrom
Shellishack:main
Feb 19, 2026
Merged

Fix windows absolute path parsing bug#3205
olaservo merged 1 commit intomodelcontextprotocol:mainfrom
Shellishack:main

Conversation

@Shellishack
Copy link
Contributor

Description

Fix Windows absolute path parsing bug described in #3174

Publishing Your Server

Note: We are no longer accepting PRs to add servers to the README. Instead, please publish your server to the MCP Server Registry to make it discoverable to the MCP ecosystem.

To publish your server, follow the quickstart guide. You can browse published servers at https://registry.modelcontextprotocol.io/.

Server Details

  • Server: filesystem
  • Changes to: roots

Motivation and Context

Fix Windows path parsing bug where any path isn't recognized as valid path except ones starting with ./

How Has This Been Tested?

Manully tested on Windows and Linux.

Breaking Changes

No

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • 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

Copy link
Member

@olaservo olaservo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - correct use of fileURLToPath() to replace the naive slice(7) for Windows file:// URI parsing. Minimal change, all CI green, existing try-catch covers edge cases. Will follow up with a small PR for quote style consistency and a regression test.

@olaservo olaservo merged commit 1b96551 into modelcontextprotocol:main Feb 19, 2026
19 checks passed
olaservo added a commit to olaservo/servers that referenced this pull request Feb 19, 2026
Follow-up to modelcontextprotocol#3205. Fixes import quote style inconsistency (double to
single quotes) and adds a regression test using pathToFileURL() to
verify properly-encoded file:// URIs are handled correctly on all
platforms.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

2 participants

Comments