I'm trying to configure and run the Model Context Protocol (MCP) filesystem server using the ModelContextProtocol repository, but I'm encountering an error during setup.
Here's the config I'm using in my claude_desktop_config.JSON file (I've reformatted the code from the example):
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-filesystem",
"C:\\Users\\umaan\\Desktop",
"C:\\Users\\umaan\\Downloads"
]
}
}
}
However, when I try to run it in the Claude Desktop app's developer section, I receive the following error:
Arguments: -y u/modelcontextprotocol/server-filesystem /Users/umaan/Desktop /Users/umaan/Downloads
Error: Server disconnected
Looking at the MCP logs, I see the following error:
Error accessing directory /Users/umaan/Desktop: Error: ENOENT: no such file or directory, stat 'C:\Users\umaan\Desktop'
at async Object.stat (node:internal/fs/promises:1032:18)
at async file:///C:/Users/umaan/AppData/Roaming/npm/node_modules/@modelcontextprotocol/server-filesystem/dist/index.js:33:23
at async Promise.all (index 0)
at async file:///C:/Users/umaan/AppData/Roaming/npm/node_modules/@modelcontextprotocol/server-filesystem/dist/index.js:31:1 {
errno: -4058,
code: 'ENOENT',
syscall: 'stat',
path: 'C:\\Users\\umaan\\Desktop'
}
What I've tried so far:
I double-checked that both paths are valid, while I can confirm that they are.
I ensured that the paths in the config file are correct and reflect my Windows directory structure.
Is there something wrong with my configuration file, or is there an issue with the way the MCP filesystem server is resolving paths?
How can I fix this issue so that the server accesses the correct directories on my Windows and doesn't mistakenly look for paths on Windows?