modelcontextprotocol / modelcontextprotocol/servers

Error starting filesystem: CodeExpectedError: Variable workspaceFolder can not be resolved. Please open a folder.

Open
#1,613 5 comments 10 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

server-filesystem
Dominant language
TypeScript
Stars
90.5k
Forks
11.7k
Avg merge
2d 2h
Merged PRs (30d)
5

Description

I have already opened a folder as workspace, but the error still occurs. This is my settings.json.
Image
Only when I add it in the project's .vscode/mcp.json file and replace ${workspaceFolder} with the project path does it work properly. However, I want to add it in the User Settings (JSON) file.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the error with the MCP configuration in User Settings (JSON), then compare it with the working project .vscode/mcp.json configuration. Inspect how ${workspaceFolder} is resolved in these two configuration locations. Done means the variable resolves when the same configuration is placed in User Settings while a folder workspace is open.

Written by the indexing model from the issue text.

Assessment

Tech stack
vscode
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.