Skip to content

Workspace scoped MCP configuration fail under Windows #7774

@bluemonkmn

Description

@bluemonkmn

Problem

Workspace-scoped MCP configuration does not work under Windows. Attempting to change a global MCP configuration to a workspace configuration causes an error.

Steps to reproduce the issue

  1. Define any valid Global MCP configuration (gets saved in %USERPROFILE%.aws\amazonq\mcp.json)
  2. Go to VS Code's Amazon Q extension tab
  3. Click the MCP server configuration icon
  4. Select the MCP server
  5. Click Edit Setup
  6. Change the scope selection from "Global" to "This workspace"
  7. Click Save
  8. See error message l;ike: ENOENT: no such file or directory, mkdir 'C:\Users\bmarty\AppData\Local\Programs\Microsoft VS Code\file:\c%3A\landmark\ox3\src\hcm.amazonq\agents'

Expected behavior

The configuration should be moved from mcp.json to the root of the workspace in a directory called .amazonq. If a file is created in that location it should be picked up.

Actual Behavior

The extension is apparently failing to combine paths correctly or process the path representing the root of the workspace as a local path leading to an error like:

ENOENT: no such file or directory, mkdir 'C:\Users\bmarty\AppData\Local\Programs\Microsoft VS Code\file:\c%3A\landmark\ox3\src\hcm.amazonq\agents'

If a file is created in the correct location, it is not honored (no MCP configuration is seen).

System details

OS: Windows_NT x64 10.0.22631
Visual Studio Code extension host: 1.102.2
Amazon Q: 1.85.0
node: 22.15.1
electron: 35.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugWe can reproduce the issue and confirmed it is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions