|
|
@@ -63,6 +63,7 @@ const createServerTypeSchema = () => {
|
|
|
type: z.enum(["stdio"]).optional(),
|
|
|
command: z.string().min(1, "Command cannot be empty"),
|
|
|
args: z.array(z.string()).optional(),
|
|
|
+ cwd: z.string().default(() => vscode.workspace.workspaceFolders?.at(0)?.uri.fsPath ?? process.cwd()),
|
|
|
env: z.record(z.string()).optional(),
|
|
|
// Ensure no SSE fields are present
|
|
|
url: z.undefined().optional(),
|
|
|
@@ -314,7 +315,7 @@ export class McpHub {
|
|
|
mcpSettingsFilePath,
|
|
|
`{
|
|
|
"mcpServers": {
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
}`,
|
|
|
)
|
|
|
@@ -427,6 +428,7 @@ export class McpHub {
|
|
|
transport = new StdioClientTransport({
|
|
|
command: config.command,
|
|
|
args: config.args,
|
|
|
+ cwd: config.cwd,
|
|
|
env: {
|
|
|
...config.env,
|
|
|
...(process.env.PATH ? { PATH: process.env.PATH } : {}),
|