Skip to content

fix(index.ts): fix windows url encode#3109

Closed
stolen-programmer wants to merge 1 commit intomodelcontextprotocol:mainfrom
stolen-programmer:patch-2
Closed

fix(index.ts): fix windows url encode#3109
stolen-programmer wants to merge 1 commit intomodelcontextprotocol:mainfrom
stolen-programmer:patch-2

Conversation

@stolen-programmer
Copy link
Copy Markdown

Description

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:
  • Changes to:

Motivation and Context

How Has This Been Tested?

Breaking Changes

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

@olaservo
Copy link
Copy Markdown
Member

olaservo commented Mar 7, 2026

Hi @stolen-programmer, thanks for taking the time to investigate and fix this Windows URL encoding issue! 🙏

After reviewing this PR (with help from Claude Code), we found that this fix has been superseded by PR #3205, which was merged on Feb 19, 2026. That PR introduced a roots-utils.ts module with a parseRootUri() function that already handles fileURLToPath conversion for file:// URIs:

// roots-utils.ts - parseRootUri()
const rawPath = rootUri.startsWith('file://') ? fileURLToPath(rootUri) : rootUri;

The notification handler at index.ts:718 calls updateAllowedDirectoriesFromRoots()getValidRootDirectories()parseRootUri(), so the conversion now happens automatically for all root URIs — including the file:///d%3A/work/ case you identified.

Closing this as the underlying issue is resolved, but thank you for catching it — your report helped confirm the fix path!

@olaservo
Copy link
Copy Markdown
Member

olaservo commented Mar 7, 2026

Closing as superseded by #3205 (merged). See comment above for details.

@olaservo olaservo closed this Mar 7, 2026
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