mirror of
https://github.com/samanhappy/mcphub.git
synced 2025-12-24 02:39:19 -05:00
fix: set current working directory for StdioClientTransport to homedir (#311)
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import os from 'os';
|
||||
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
||||
import {
|
||||
CallToolRequestSchema,
|
||||
@@ -205,6 +206,7 @@ const createTransportFromConfig = (name: string, conf: ServerConfig): any => {
|
||||
}
|
||||
|
||||
transport = new StdioClientTransport({
|
||||
cwd: os.homedir(),
|
||||
command: conf.command,
|
||||
args: replaceEnvVars(conf.args) as string[],
|
||||
env: env,
|
||||
|
||||
Reference in New Issue
Block a user