From 7d8c811a1efa3a39ee91a08ce9f975b0dd1f98be Mon Sep 17 00:00:00 2001 From: snehshah22 Date: Tue, 21 Apr 2026 10:39:09 -0700 Subject: [PATCH] Optimize MCP config: bundle cross-spawn, use local path in gemini-extension.json, and split config for Claude/Codex --- .claude-plugin/plugin.json | 2 +- .mcp.claude.json | 164 ++++++++++++ gemini-extension.json | 6 +- mcp/build.js | 4 +- mcp/dist/index.js | 511 ++++++++++++++++++++++++++++++++++++- 5 files changed, 678 insertions(+), 9 deletions(-) create mode 100644 .mcp.claude.json diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index cfae44b..c7ec0b6 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -2,5 +2,5 @@ "name": "data-agent-kit-starter-pack", "version": "0.1.0", "description": "This plugin provides a specialized suite of skills for data engineers and database practitioners working on Google Cloud. It acts as an expert assistant, allowing you to use natural language prompts in your preferred coding agent to architect complex data pipelines, transform data with dbt, write Spark and BigQuery SQL notebooks, and orchestrate end-to-end workflows across GCP's data ecosystem.", - "mcp": "./.mcp.json" + "mcp": "./.mcp.claude.json" } diff --git a/.mcp.claude.json b/.mcp.claude.json new file mode 100644 index 0000000..29db5f6 --- /dev/null +++ b/.mcp.claude.json @@ -0,0 +1,164 @@ +{ + "mcpServers": { + "notebook_and_visualization": { + "command": "node", + "args": [ + "${CLAUDE_PLUGIN_ROOT}/mcp/dist/index.js" + ], + "env": {}, + "env_vars": [ + "DATA_CLOUD_CURR_IDE_NAME" + ] + }, + "datacloud_bigquery_toolbox": { + "command": "npx", + "args": [ + "-y", + "@toolbox-sdk/server@>=1.1.0", + "--prebuilt", + "bigquery", + "--stdio", + "--user-agent-metadata", + "datacloud.claude-and-codex" + ], + "env": { + "BIGQUERY_LOCATION": "", + "BIGQUERY_PROJECT": "" + } + }, + "datacloud_spanner_toolbox": { + "command": "npx", + "args": [ + "-y", + "@toolbox-sdk/server@>=1.1.0", + "--prebuilt", + "spanner", + "--stdio", + "--user-agent-metadata", + "datacloud.claude-and-codex" + ], + "env": { + "SPANNER_DATABASE": "", + "SPANNER_DIALECT": "", + "SPANNER_INSTANCE": "", + "SPANNER_PROJECT": "" + } + }, + "datacloud_alloydb-postgres-admin_toolbox": { + "command": "npx", + "args": [ + "-y", + "@toolbox-sdk/server@>=1.1.0", + "--prebuilt", + "alloydb-postgres-admin", + "--stdio", + "--user-agent-metadata", + "datacloud.claude-and-codex" + ], + "env": {} + }, + "datacloud_alloydb-postgres_toolbox": { + "command": "npx", + "args": [ + "-y", + "@toolbox-sdk/server@>=1.1.0", + "--prebuilt", + "alloydb-postgres", + "--stdio", + "--user-agent-metadata", + "datacloud.claude-and-codex" + ], + "env": { + "ALLOYDB_POSTGRES_CLUSTER": "", + "ALLOYDB_POSTGRES_DATABASE": "", + "ALLOYDB_POSTGRES_INSTANCE": "", + "ALLOYDB_POSTGRES_IP_TYPE": "", + "ALLOYDB_POSTGRES_PASSWORD": "", + "ALLOYDB_POSTGRES_PROJECT": "", + "ALLOYDB_POSTGRES_REGION": "", + "ALLOYDB_POSTGRES_USER": "" + } + }, + "datacloud_cloud-sql-postgresql-admin_toolbox": { + "command": "npx", + "args": [ + "-y", + "@toolbox-sdk/server@>=1.1.0", + "--prebuilt", + "cloud-sql-postgres-admin", + "--stdio", + "--user-agent-metadata", + "datacloud.claude-and-codex" + ], + "env": {} + }, + "datacloud_cloud-sql-postgresql_toolbox": { + "command": "npx", + "args": [ + "-y", + "@toolbox-sdk/server@>=1.1.0", + "--prebuilt", + "cloud-sql-postgres", + "--stdio", + "--user-agent-metadata", + "datacloud.claude-and-codex" + ], + "env": { + "CLOUD_SQL_POSTGRES_DATABASE": "", + "CLOUD_SQL_POSTGRES_INSTANCE": "", + "CLOUD_SQL_POSTGRES_IP_TYPE": "", + "CLOUD_SQL_POSTGRES_PASSWORD": "", + "CLOUD_SQL_POSTGRES_PROJECT": "", + "CLOUD_SQL_POSTGRES_REGION": "", + "CLOUD_SQL_POSTGRES_USER": "" + } + }, + "datacloud_knowledge_catalog_toolbox": { + "command": "npx", + "args": [ + "-y", + "@toolbox-sdk/server@>=1.1.0", + "--prebuilt", + "dataplex", + "--stdio", + "--user-agent-metadata", + "datacloud.claude-and-codex" + ], + "env": { + "DATAPLEX_PROJECT": "" + } + }, + "datacloud_dataproc_toolbox": { + "command": "npx", + "args": [ + "-y", + "@toolbox-sdk/server@>=1.1.0", + "--prebuilt", + "dataproc", + "--stdio", + "--user-agent-metadata", + "datacloud.claude-and-codex" + ], + "env": { + "DATAPROC_PROJECT": "", + "DATAPROC_REGION": "" + } + }, + "datacloud_serverless-spark_toolbox": { + "command": "npx", + "args": [ + "-y", + "@toolbox-sdk/server@>=1.1.0", + "--prebuilt", + "serverless-spark", + "--stdio", + "--user-agent-metadata", + "datacloud.claude-and-codex" + ], + "env": { + "SERVERLESS_SPARK_PROJECT": "", + "SERVERLESS_SPARK_LOCATION": "" + } + } + } +} diff --git a/gemini-extension.json b/gemini-extension.json index 25ca481..7b88d27 100644 --- a/gemini-extension.json +++ b/gemini-extension.json @@ -4,11 +4,11 @@ "description": "This plugin provides a specialized suite of skills for data engineers and database practitioners working on Google Cloud. It acts as an expert assistant, allowing you to use natural language prompts in your preferred coding agent to architect complex data pipelines, transform data with dbt, write Spark and BigQuery SQL notebooks, and orchestrate end-to-end workflows across GCP's data ecosystem.", "mcpServers": { "notebook_and_visualization": { - "command": "npx", + "command": "node", "args": [ - "-y", - "git+https://github.com/gemini-cli-extensions/data-agent-kit-starter-pack.git" + "${extensionPath}/mcp/dist/index.js" ], + "cwd": "${extensionPath}/mcp", "env": {} }, "datacloud_bigquery_toolbox": { diff --git a/mcp/build.js b/mcp/build.js index 6a2f41b..94a9bb3 100644 --- a/mcp/build.js +++ b/mcp/build.js @@ -38,9 +38,9 @@ esbuild.build({ platform: 'node', format: 'esm', outfile: 'dist/index.js', - external: ['child_process', 'fs', 'path', 'url', 'cross-spawn'], + external: ['child_process', 'fs', 'path', 'url'], banner: { - js: `#!/usr/bin/env node\n${licenseHeader}\n`, + js: `#!/usr/bin/env node\n${licenseHeader}\nimport { createRequire } from 'module';\nconst require = createRequire(import.meta.url);\n`, }, }).catch((err) => { console.error(err); diff --git a/mcp/dist/index.js b/mcp/dist/index.js index 669a5f2..e661231 100644 --- a/mcp/dist/index.js +++ b/mcp/dist/index.js @@ -14,6 +14,8 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +import { createRequire } from 'module'; +const require = createRequire(import.meta.url); var __create = Object.create; var __defProp = Object.defineProperty; @@ -21,7 +23,13 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; -var __commonJS = (cb, mod) => function __require() { +var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { + get: (a, b) => (typeof require !== "undefined" ? require : a)[b] +}) : x)(function(x) { + if (typeof require !== "undefined") return require.apply(this, arguments); + throw Error('Dynamic require of "' + x + '" is not supported'); +}); +var __commonJS = (cb, mod) => function __require2() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __export = (target, all) => { @@ -6814,6 +6822,503 @@ var require_dist = __commonJS({ } }); +// node_modules/isexe/windows.js +var require_windows = __commonJS({ + "node_modules/isexe/windows.js"(exports, module) { + module.exports = isexe; + isexe.sync = sync; + var fs11 = __require("fs"); + function checkPathExt(path4, options) { + var pathext = options.pathExt !== void 0 ? options.pathExt : process.env.PATHEXT; + if (!pathext) { + return true; + } + pathext = pathext.split(";"); + if (pathext.indexOf("") !== -1) { + return true; + } + for (var i = 0; i < pathext.length; i++) { + var p = pathext[i].toLowerCase(); + if (p && path4.substr(-p.length).toLowerCase() === p) { + return true; + } + } + return false; + } + function checkStat(stat2, path4, options) { + if (!stat2.isSymbolicLink() && !stat2.isFile()) { + return false; + } + return checkPathExt(path4, options); + } + function isexe(path4, options, cb) { + fs11.stat(path4, function(er, stat2) { + cb(er, er ? false : checkStat(stat2, path4, options)); + }); + } + function sync(path4, options) { + return checkStat(fs11.statSync(path4), path4, options); + } + } +}); + +// node_modules/isexe/mode.js +var require_mode = __commonJS({ + "node_modules/isexe/mode.js"(exports, module) { + module.exports = isexe; + isexe.sync = sync; + var fs11 = __require("fs"); + function isexe(path4, options, cb) { + fs11.stat(path4, function(er, stat2) { + cb(er, er ? false : checkStat(stat2, options)); + }); + } + function sync(path4, options) { + return checkStat(fs11.statSync(path4), options); + } + function checkStat(stat2, options) { + return stat2.isFile() && checkMode(stat2, options); + } + function checkMode(stat2, options) { + var mod = stat2.mode; + var uid = stat2.uid; + var gid = stat2.gid; + var myUid = options.uid !== void 0 ? options.uid : process.getuid && process.getuid(); + var myGid = options.gid !== void 0 ? options.gid : process.getgid && process.getgid(); + var u = parseInt("100", 8); + var g = parseInt("010", 8); + var o = parseInt("001", 8); + var ug = u | g; + var ret = mod & o || mod & g && gid === myGid || mod & u && uid === myUid || mod & ug && myUid === 0; + return ret; + } + } +}); + +// node_modules/isexe/index.js +var require_isexe = __commonJS({ + "node_modules/isexe/index.js"(exports, module) { + var fs11 = __require("fs"); + var core; + if (process.platform === "win32" || global.TESTING_WINDOWS) { + core = require_windows(); + } else { + core = require_mode(); + } + module.exports = isexe; + isexe.sync = sync; + function isexe(path4, options, cb) { + if (typeof options === "function") { + cb = options; + options = {}; + } + if (!cb) { + if (typeof Promise !== "function") { + throw new TypeError("callback not provided"); + } + return new Promise(function(resolve, reject) { + isexe(path4, options || {}, function(er, is) { + if (er) { + reject(er); + } else { + resolve(is); + } + }); + }); + } + core(path4, options || {}, function(er, is) { + if (er) { + if (er.code === "EACCES" || options && options.ignoreErrors) { + er = null; + is = false; + } + } + cb(er, is); + }); + } + function sync(path4, options) { + try { + return core.sync(path4, options || {}); + } catch (er) { + if (options && options.ignoreErrors || er.code === "EACCES") { + return false; + } else { + throw er; + } + } + } + } +}); + +// node_modules/which/which.js +var require_which = __commonJS({ + "node_modules/which/which.js"(exports, module) { + var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys"; + var path4 = __require("path"); + var COLON = isWindows ? ";" : ":"; + var isexe = require_isexe(); + var getNotFoundError = (cmd) => Object.assign(new Error(`not found: ${cmd}`), { code: "ENOENT" }); + var getPathInfo = (cmd, opt) => { + const colon = opt.colon || COLON; + const pathEnv = cmd.match(/\//) || isWindows && cmd.match(/\\/) ? [""] : [ + // windows always checks the cwd first + ...isWindows ? [process.cwd()] : [], + ...(opt.path || process.env.PATH || /* istanbul ignore next: very unusual */ + "").split(colon) + ]; + const pathExtExe = isWindows ? opt.pathExt || process.env.PATHEXT || ".EXE;.CMD;.BAT;.COM" : ""; + const pathExt = isWindows ? pathExtExe.split(colon) : [""]; + if (isWindows) { + if (cmd.indexOf(".") !== -1 && pathExt[0] !== "") + pathExt.unshift(""); + } + return { + pathEnv, + pathExt, + pathExtExe + }; + }; + var which = (cmd, opt, cb) => { + if (typeof opt === "function") { + cb = opt; + opt = {}; + } + if (!opt) + opt = {}; + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); + const found = []; + const step = (i) => new Promise((resolve, reject) => { + if (i === pathEnv.length) + return opt.all && found.length ? resolve(found) : reject(getNotFoundError(cmd)); + const ppRaw = pathEnv[i]; + const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; + const pCmd = path4.join(pathPart, cmd); + const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; + resolve(subStep(p, i, 0)); + }); + const subStep = (p, i, ii) => new Promise((resolve, reject) => { + if (ii === pathExt.length) + return resolve(step(i + 1)); + const ext = pathExt[ii]; + isexe(p + ext, { pathExt: pathExtExe }, (er, is) => { + if (!er && is) { + if (opt.all) + found.push(p + ext); + else + return resolve(p + ext); + } + return resolve(subStep(p, i, ii + 1)); + }); + }); + return cb ? step(0).then((res) => cb(null, res), cb) : step(0); + }; + var whichSync = (cmd, opt) => { + opt = opt || {}; + const { pathEnv, pathExt, pathExtExe } = getPathInfo(cmd, opt); + const found = []; + for (let i = 0; i < pathEnv.length; i++) { + const ppRaw = pathEnv[i]; + const pathPart = /^".*"$/.test(ppRaw) ? ppRaw.slice(1, -1) : ppRaw; + const pCmd = path4.join(pathPart, cmd); + const p = !pathPart && /^\.[\\\/]/.test(cmd) ? cmd.slice(0, 2) + pCmd : pCmd; + for (let j = 0; j < pathExt.length; j++) { + const cur = p + pathExt[j]; + try { + const is = isexe.sync(cur, { pathExt: pathExtExe }); + if (is) { + if (opt.all) + found.push(cur); + else + return cur; + } + } catch (ex) { + } + } + } + if (opt.all && found.length) + return found; + if (opt.nothrow) + return null; + throw getNotFoundError(cmd); + }; + module.exports = which; + which.sync = whichSync; + } +}); + +// node_modules/path-key/index.js +var require_path_key = __commonJS({ + "node_modules/path-key/index.js"(exports, module) { + "use strict"; + var pathKey = (options = {}) => { + const environment = options.env || process.env; + const platform = options.platform || process.platform; + if (platform !== "win32") { + return "PATH"; + } + return Object.keys(environment).reverse().find((key) => key.toUpperCase() === "PATH") || "Path"; + }; + module.exports = pathKey; + module.exports.default = pathKey; + } +}); + +// node_modules/cross-spawn/lib/util/resolveCommand.js +var require_resolveCommand = __commonJS({ + "node_modules/cross-spawn/lib/util/resolveCommand.js"(exports, module) { + "use strict"; + var path4 = __require("path"); + var which = require_which(); + var getPathKey = require_path_key(); + function resolveCommandAttempt(parsed, withoutPathExt) { + const env = parsed.options.env || process.env; + const cwd = process.cwd(); + const hasCustomCwd = parsed.options.cwd != null; + const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled; + if (shouldSwitchCwd) { + try { + process.chdir(parsed.options.cwd); + } catch (err) { + } + } + let resolved; + try { + resolved = which.sync(parsed.command, { + path: env[getPathKey({ env })], + pathExt: withoutPathExt ? path4.delimiter : void 0 + }); + } catch (e) { + } finally { + if (shouldSwitchCwd) { + process.chdir(cwd); + } + } + if (resolved) { + resolved = path4.resolve(hasCustomCwd ? parsed.options.cwd : "", resolved); + } + return resolved; + } + function resolveCommand(parsed) { + return resolveCommandAttempt(parsed) || resolveCommandAttempt(parsed, true); + } + module.exports = resolveCommand; + } +}); + +// node_modules/cross-spawn/lib/util/escape.js +var require_escape = __commonJS({ + "node_modules/cross-spawn/lib/util/escape.js"(exports, module) { + "use strict"; + var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g; + function escapeCommand(arg) { + arg = arg.replace(metaCharsRegExp, "^$1"); + return arg; + } + function escapeArgument(arg, doubleEscapeMetaChars) { + arg = `${arg}`; + arg = arg.replace(/(?=(\\+?)?)\1"/g, '$1$1\\"'); + arg = arg.replace(/(?=(\\+?)?)\1$/, "$1$1"); + arg = `"${arg}"`; + arg = arg.replace(metaCharsRegExp, "^$1"); + if (doubleEscapeMetaChars) { + arg = arg.replace(metaCharsRegExp, "^$1"); + } + return arg; + } + module.exports.command = escapeCommand; + module.exports.argument = escapeArgument; + } +}); + +// node_modules/shebang-regex/index.js +var require_shebang_regex = __commonJS({ + "node_modules/shebang-regex/index.js"(exports, module) { + "use strict"; + module.exports = /^#!(.*)/; + } +}); + +// node_modules/shebang-command/index.js +var require_shebang_command = __commonJS({ + "node_modules/shebang-command/index.js"(exports, module) { + "use strict"; + var shebangRegex = require_shebang_regex(); + module.exports = (string3 = "") => { + const match = string3.match(shebangRegex); + if (!match) { + return null; + } + const [path4, argument] = match[0].replace(/#! ?/, "").split(" "); + const binary = path4.split("/").pop(); + if (binary === "env") { + return argument; + } + return argument ? `${binary} ${argument}` : binary; + }; + } +}); + +// node_modules/cross-spawn/lib/util/readShebang.js +var require_readShebang = __commonJS({ + "node_modules/cross-spawn/lib/util/readShebang.js"(exports, module) { + "use strict"; + var fs11 = __require("fs"); + var shebangCommand = require_shebang_command(); + function readShebang(command) { + const size = 150; + const buffer = Buffer.alloc(size); + let fd; + try { + fd = fs11.openSync(command, "r"); + fs11.readSync(fd, buffer, 0, size, 0); + fs11.closeSync(fd); + } catch (e) { + } + return shebangCommand(buffer.toString()); + } + module.exports = readShebang; + } +}); + +// node_modules/cross-spawn/lib/parse.js +var require_parse = __commonJS({ + "node_modules/cross-spawn/lib/parse.js"(exports, module) { + "use strict"; + var path4 = __require("path"); + var resolveCommand = require_resolveCommand(); + var escape2 = require_escape(); + var readShebang = require_readShebang(); + var isWin = process.platform === "win32"; + var isExecutableRegExp = /\.(?:com|exe)$/i; + var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i; + function detectShebang(parsed) { + parsed.file = resolveCommand(parsed); + const shebang = parsed.file && readShebang(parsed.file); + if (shebang) { + parsed.args.unshift(parsed.file); + parsed.command = shebang; + return resolveCommand(parsed); + } + return parsed.file; + } + function parseNonShell(parsed) { + if (!isWin) { + return parsed; + } + const commandFile = detectShebang(parsed); + const needsShell = !isExecutableRegExp.test(commandFile); + if (parsed.options.forceShell || needsShell) { + const needsDoubleEscapeMetaChars = isCmdShimRegExp.test(commandFile); + parsed.command = path4.normalize(parsed.command); + parsed.command = escape2.command(parsed.command); + parsed.args = parsed.args.map((arg) => escape2.argument(arg, needsDoubleEscapeMetaChars)); + const shellCommand = [parsed.command].concat(parsed.args).join(" "); + parsed.args = ["/d", "/s", "/c", `"${shellCommand}"`]; + parsed.command = process.env.comspec || "cmd.exe"; + parsed.options.windowsVerbatimArguments = true; + } + return parsed; + } + function parse3(command, args, options) { + if (args && !Array.isArray(args)) { + options = args; + args = null; + } + args = args ? args.slice(0) : []; + options = Object.assign({}, options); + const parsed = { + command, + args, + options, + file: void 0, + original: { + command, + args + } + }; + return options.shell ? parsed : parseNonShell(parsed); + } + module.exports = parse3; + } +}); + +// node_modules/cross-spawn/lib/enoent.js +var require_enoent = __commonJS({ + "node_modules/cross-spawn/lib/enoent.js"(exports, module) { + "use strict"; + var isWin = process.platform === "win32"; + function notFoundError(original, syscall) { + return Object.assign(new Error(`${syscall} ${original.command} ENOENT`), { + code: "ENOENT", + errno: "ENOENT", + syscall: `${syscall} ${original.command}`, + path: original.command, + spawnargs: original.args + }); + } + function hookChildProcess(cp, parsed) { + if (!isWin) { + return; + } + const originalEmit = cp.emit; + cp.emit = function(name, arg1) { + if (name === "exit") { + const err = verifyENOENT(arg1, parsed); + if (err) { + return originalEmit.call(cp, "error", err); + } + } + return originalEmit.apply(cp, arguments); + }; + } + function verifyENOENT(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, "spawn"); + } + return null; + } + function verifyENOENTSync(status, parsed) { + if (isWin && status === 1 && !parsed.file) { + return notFoundError(parsed.original, "spawnSync"); + } + return null; + } + module.exports = { + hookChildProcess, + verifyENOENT, + verifyENOENTSync, + notFoundError + }; + } +}); + +// node_modules/cross-spawn/index.js +var require_cross_spawn = __commonJS({ + "node_modules/cross-spawn/index.js"(exports, module) { + "use strict"; + var cp = __require("child_process"); + var parse3 = require_parse(); + var enoent = require_enoent(); + function spawn2(command, args, options) { + const parsed = parse3(command, args, options); + const spawned = cp.spawn(parsed.command, parsed.args, parsed.options); + enoent.hookChildProcess(spawned, parsed); + return spawned; + } + function spawnSync(command, args, options) { + const parsed = parse3(command, args, options); + const result = cp.spawnSync(parsed.command, parsed.args, parsed.options); + result.error = result.error || enoent.verifyENOENTSync(result.status, parsed); + return result; + } + module.exports = spawn2; + module.exports.spawn = spawn2; + module.exports.sync = spawnSync; + module.exports._parse = parse3; + module.exports._enoent = enoent; + } +}); + // node_modules/zod/v3/external.js var external_exports = {}; __export(external_exports, { @@ -18612,7 +19117,7 @@ var Client = class extends Protocol { }; // node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js -import spawn from "cross-spawn"; +var import_cross_spawn = __toESM(require_cross_spawn(), 1); import process3 from "node:process"; import { PassThrough } from "node:stream"; var DEFAULT_INHERITED_ENV_VARS = process3.platform === "win32" ? [ @@ -18663,7 +19168,7 @@ var StdioClientTransport = class { throw new Error("StdioClientTransport already started! If using Client class, note that connect() calls start() automatically."); } return new Promise((resolve, reject) => { - this._process = spawn(this._serverParams.command, this._serverParams.args ?? [], { + this._process = (0, import_cross_spawn.default)(this._serverParams.command, this._serverParams.args ?? [], { // merge default env with server env because mcp server needs some env vars env: { ...getDefaultEnvironment(),