modelcontextprotocol / modelcontextprotocol/servers

Filesystem server: roots are not working on Windows

Open
#3,174 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug
If I configure the filesystem server in VS Code mcp.json, it automatically sets the workspace folder as root. This fails on Windows with this error (e.g. using C:\temp as workspace folder)

Skipping invalid path or inaccessible: file:///c%3A/temp
No valid root directories provided by client

To Reproduce
Steps to reproduce the behavior:

  1. Create a folder C:\temp on Windows
  2. Open VS Code in that folder
  3. Create a .vscode/mcp.json
"servers": {
    "filesystem": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-filesystem@latest"
      ]
    },
  },
  "inputs": []
}
  1. Start the filesystem server
  2. Check the Output of the filesystem server

If you pass a folder manually via the args you will notice that this folder will be used instead of the workspace folder that should be provided as root.

Expected behavior
The workspace folder on Windows should be used as root.

Logs

2026-01-02 14:59:42.734 [info] Starting server filesystem
2026-01-02 14:59:42.735 [info] Connection state: Starting
2026-01-02 14:59:42.735 [info] Starting server from LocalProcess extension host
2026-01-02 14:59:42.747 [info] Connection state: Starting
2026-01-02 14:59:42.747 [info] Connection state: Running
2026-01-02 14:59:44.911 [warning] [server stderr] Secure MCP Filesystem Server running on stdio
2026-01-02 14:59:44.930 [info] Discovered 14 tools
2026-01-02 14:59:44.931 [warning] [server stderr] Skipping invalid path or inaccessible: file:///c%3A/temp
2026-01-02 14:59:44.932 [warning] [server stderr] No valid root directories provided by client

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 with the filesystem server's handling of the workspace root URI shown in the logs, focusing on conversion of file:///c%3A/temp on Windows. Reproduce using the .vscode/mcp.json configuration and C:\temp workspace described in the issue. Done means the workspace folder is accepted as a valid root without requiring a manually supplied argument.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.