Skip to content

Conversation

alexmadPDE
Copy link

Problem

Fixes workspace MCP configuration on Windows for JetBrains IDEs.

Types of changes

  • [X ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)

Description

Workspace-scoped MCP configuration fails on Windows with:
ENOENT: no such file or directory, mkdir 'C:\Program Files\JetBrains\PyCharm\file:\C:\Users...\workspace.amazonq\agents'

Bug:
Workspace scoped MCP configuration fail under Windows #7774
aws/aws-toolkit-vscode#7774

Root Cause

Manual URI construction in LspEditorUtil.toUri() creates malformed URIs on Windows that get interpreted as literal file paths.

Solution

  • Replace manual URI construction with Path.toUri()
  • Ensures proper cross-platform URI handling
  • Eliminates malformed path issues

Checklist

  • My code follows the code style of this project
  • [New guy Need help with this ] I have added tests to cover my changes
  • A short description of the change has been added to the CHANGELOG if the change is customer-facing in the IDE.
  • I have added metrics for my changes (if required)

License

I confirm that my contribution is made under the terms of the Apache 2.0 license.

@alexmadPDE alexmadPDE marked this pull request as ready for review September 19, 2025 14:48
@alexmadPDE alexmadPDE requested a review from a team as a code owner September 19, 2025 14:48
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