Cursor always fails to load salesforce-dx mcp

I have been using ADO mcp and salesforce-dx mcp. but salesforce-dx mcp always fails to load. it works perfectly in vscode. Following is the configuration, which we use -

{
  "servers": {
    "Salesforce DX": {
      "command": "npx",
      "args": ["-y", "@salesforce/mcp",
              "--orgs", "DEFAULT_TARGET_ORG",
              "--toolsets", "orgs,metadata,data,users",
              "--tools", "run_apex_test",
              "--allow-non-ga-tools"]
    }
  }
}

I have tried changing it to following as well

{
	"mcpServers": {
		"salesforce-mcp": {
			"command": "node",
			"args": [
				"c:/BP/salesforce/fuelCrmDev/node_modules/@salesforce/mcp/bin/run.js",
				"--orgs", "DEFAULT_TARGET_ORG",
				"--toolsets", "data,users",
				"--tools", "retrieve_metadata,list_all_orgs,open_org",
				"--allow-non-ga-tools"
			],
			"env": {
				"ESLINT_USE_FLAT_CONFIG": "false"
			}
		}
    }
}

I have also tried various other combination, but it always fails.

I have found a workaround, by using a combination of commands -

Developer : Restart Extension Host

then wait for 2-3 minutes. and run another command -

Developer : Reload Window

then wait for 5 minutes, and hope for it to work.

sometimes this trick works, but sometimes not. I’m working on salesforce project. this is happening, not just with me, but along with 60 team members. I also interacted with cursor chat to resolve the problem, but that also didn’t worked. it tired installing a local copy of node modules, but that also fails.

I’m using salesforce extension pack extensions.

Please help me to get it resolved permanently.

Hey @Pankaj_Singh1

I was able to solve this by just running the npx -y @salesforce/mcp... command outside of Cursor once. After that, the MCP server worked fine in Cursor. Could you give this a try?