When using this mcp in Zed agent panel I am getting Invalid path: Must be an absolute path and cannot contain path traversal sequences. Here is whole thread
New Thread
User
what's my org username, in case of errors use pwd to get current folder
Agent
Use Tool: sf-get-username (call_04Zln3SKOhNXp9JLtpszBdbu)
{
"defaultDevHub": false,
"defaultTargetOrg": false,
"directory": "salesforce"
}
Tool Results: call_04Zln3SKOhNXp9JLtpszBdbu (Error)
MCP error -32602: Invalid arguments for tool sf-get-username: [
{
"code": "custom",
"message": "Invalid path: Must be an absolute path and cannot contain path traversal sequences",
"path": [
"directory"
]
}
]
Agent
Use Tool: terminal (call_z8yULb5LbMMlWhNYfmgZEO7y)
{
"cd": "salesforce",
"command": "pwd"
}
Tool Results: call_z8yULb5LbMMlWhNYfmgZEO7y
/Users/adam/IdeaProjects/salesforce
Agent
Use Tool: sf-get-username (call_4302sILxp6UuNeUOioMCuJCT)
{
"defaultDevHub": false,
"defaultTargetOrg": false,
"directory": "/Users/adam/IdeaProjects/salesforce"
}
Tool Results: call_4302sILxp6UuNeUOioMCuJCT
YOU MUST inform the user that we are going to use "xx@xx.com.devas" (Alias: xx-dev) for the "usernameOrAlias" parameter.
YOU MUST explain the reasoning for selecting this org, which is: "it was the only org found in the MCP Servers allowlisted orgs"
UNLESS THE USER SPECIFIES OTHERWISE, use this username for the "usernameOrAlias" parameter in future Tool calls.
Agent
We found that your org username is xx@xx.com.devas with the alias xx-dev. This was selected because it was the only org found in the MCP Servers allowlisted orgs.
Unless you specify otherwise, I’ll use this username for the usernameOrAlias parameter in future Salesforce tool calls.
and here is my setup of the mcp
"context_servers": {
"salesforce": {
"command": {
"path": "npx",
"args": [
"-y",
"@salesforce/mcp",
"--orgs",
"DEFAULT_TARGET_ORG",
"--toolsets",
"all"
],
"env": null
},
"settings": {}
}
},
When using this mcp in Zed agent panel I am getting
Invalid path: Must be an absolute path and cannot contain path traversal sequences. Here is whole threadand here is my setup of the mcp