vscode
vscode copied to clipboard
Bug: command in .vscode/mcp.json should executed inside the workspace
Does this issue occur when all extensions are disabled?: No
- VS Code Version: Version: 1.99.3 (Universal)
- OS Version: macOS 15.4.1 (24E263)
Steps to Reproduce:
- Follow https://eslint.org/docs/latest/use/mcp#set-up-eslint-mcp-server-in-vs-code to add
.cursor/mcp.jsonfor Eslint MCP server - Start the server
- If you have two versions of eslint: one defined inside the workspace's package.json and one defined globally, the global
eslintwill be used. This is because the command is executed from the root directory, not the workspace directly.
I believe the command should only be executed from root directory if the server is defined in settings.json. Commands in .cursor/mcp.json should be executed with respect to where they are defined.
If someone can confirm this is really a bug, I can contribute a fix.
Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.99.3. Please try upgrading to the latest version and checking whether this issue remains.
Happy Coding!
There should be a missing cwd field to configure the execution directory https://code.visualstudio.com/docs/reference/variables-reference#_environment-variables However, the mcp configuration doesn't seem to be supported at the moment
This is a really strange omission, if you are developing an MCP service locally it's almost impossible to test without the means to set some working directory
Added this last week