Skip to content

VS Code magic variables don't work in MCP configurationΒ #4739

@dsent

Description

@dsent

App Version

3.20.3

API Provider

Not Applicable / Other

Model Used

N/A

πŸ” Steps to Reproduce

  1. Add mcp-server-git to MCPs
  2. Use ${workspaceFolder} in the list of args:
    Image

πŸ’₯ Outcome Summary

Expected the current workspace folder to be passed as an argument to the MCP.
Got "Invalid MCP settings JSON format. Please check your settings file for syntax errors." and disappearance of the MCP from the list of installed MCPs.
If I use absolute path, everything works:
Image

Other variables, such as ${fileWorkspaceFolder} don't work too, but the observed results vary (e.g. some of them don't make the MCP server disappear, but result in an error -32000.

Putting the setting into project or global MCP list makes no difference.
Relevant: #4017, #3970

πŸ“„ Relevant Logs or Errors (Optional)

I'm on Windows 11 24H2.

Metadata

Metadata

Assignees

Labels

Issue - In ProgressSomeone is actively working on this. Should link to a PR soon.bugSomething isn't working

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions