goose
goose copied to clipboard
command line with quotes in a custom extension is not parsed correctly
Describe the bug
Unable to add extension with command line that uses quotes in flags.
To Reproduce Steps to reproduce the behavior:
- Go to Settings
- Add custom extension
- Enter command
- See error
Expected behavior Correct parsing of command line arguments
Screenshots
Command line entered
/Users/ernestmicklei/go/bin/mcp-log-proxy -command "/Users/ernestmicklei/go/bin/melrose-mcp -log test.log" -log /Users/ernestmicklei/Library/Logs/goose-melrose.log -port 9001 -title “Melrose MCP”
Erorr received
Error: Error activating extension: Failed to add extension configuration, error:
Initialization(Stdio { name: "test",
cmd: "/Users/ernestmicklei/go/bin/mcp-log-proxy",
args: ["-command", "\"/Users/ernestmicklei/go/bin/melrose-mcp", "-log", "test.log\"",
"-log", "/Users/ernestmicklei/Library/Logs/goose-melrose.log",
"-port", "9001",
"-title", "“Melrose", "MCP”"],
envs: Envs { map: {} }, env_keys: [], timeout: Some(300), description: None, bundled: None }, McpServerError { method: "initialize", server: "", source: ServerBoxError(StdioProcessError("Process ended unexpectedly")) })
Additional context
As you can see, this command line cannot have quotes " to handle white spaces in arguments
Proposed solution Allow the user to (optionally) specify the command in JSON (like many other MCP clients do), for example:
"melrose-mcp": {
"command": "/Users/SOME-USER/go/bin/mcp-log-proxy",
"args": [
"-command",
"/Users/ernestmicklei/go/bin/melrose-mcp -log test.log",
"-log",
"/Users/SOME-USER/Library/Logs/goose-melrose.log",
"-port",
"9001",
"-title",
"Melrose MCP"
]
}