-
-
Notifications
You must be signed in to change notification settings - Fork 362
fix: Resolve Windows ESM path issues in MCP server #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This commit fixes the "Invalid path protocol 'c:'" error when running the MCP server on Windows systems. The error occurred because Node.js ESM imports require proper URL formatting with file:// protocol, which was not being handled correctly for Windows paths. Changes: - Added a createFileURL() helper function to properly convert Windows paths to valid file:// URLs - Fixed import path handling in index.ts for setup script loading - Updated setup-claude-server.js to use proper URL detection for direct execution - Added proper TypeScript Node.js type definitions - Updated tsconfig.json to explicitly include Node types - Ensured Windows backslashes are properly escaped in JSON config These changes ensure the MCP server installs and runs correctly on Windows systems while maintaining compatibility with other platforms. Closes wonderwhy-er#8
Thanks, I will try to find time over weekend to test this, if it works across systems will merge. |
What node version are you using? And no mcp added to Claude It seems that that experimental option was removed What I did was that I tried to run it with the flag, and then if that failed with the flag |
Message: I encountered the same issue while using Node.js v22. The error message I received was: To resolve this, I manually installed the project by running the following commands:
After this, it worked successfully. |
I encountered the same issue when access XAMPP i.e. C:\xampp\htdocs directory... |
I plan to make changes to allow access to other folders in this PR Currently access is limited to user home dir here I think I will remove that and allow any access. |
@beingnikhilesh @shabbirdudhiya In new version I commented out folder validation so all disk drives and paths are allowed now I will allow restriction again when its configurable |
Hello ! FYI I tried to install both way on my windows 11. If I install with the commande : I have :
If I pull repo : I have :
Hope it can helps, i have been trying to install CDC for few days on my windows 11, following your updates. |
Thank you for pushing the new version and commenting out the folder validation. I’ve updated and restarted Claude as you mentioned. However, I’m still facing the same issue when using Node.js v22. |
The New version worked for me. Also if its not working I'd suggest you try the following.
If this does not solve the issue. Try the following
Also a huge Thank you to @wonderwhy-er for creating this MCP and also guiding us through his Youtube Channel. I cant express in words how this has helped me as a Pro developer and saved my time. (Also this has made me lazy ;) ). |
this PR fixed my problem on windows 10.
|
Ok I made some changes and merged. |
This commit fixes the "Invalid path protocol 'c:'" error when running the MCP server on Windows systems. The error occurred because Node.js ESM imports require proper URL formatting with file:// protocol, which was not being handled correctly for Windows paths.
Changes:
These changes ensure the MCP server installs and runs correctly on Windows systems while maintaining compatibility with other platforms.
Closes #8