@mcp-use/cli 2.17.1-canary.0 → 2.18.0-canary.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -3629,7 +3629,19 @@ async function deployCommand(options) {
3629
3629
  }
3630
3630
  }
3631
3631
  console.log(source_default.cyan.bold("\u{1F680} Deploying to Manufact cloud...\n"));
3632
- const isMcp = await isMcpProject(cwd);
3632
+ const projectDir = options.rootDir ? path5.resolve(cwd, options.rootDir) : cwd;
3633
+ if (options.rootDir) {
3634
+ try {
3635
+ await fs9.access(projectDir);
3636
+ } catch {
3637
+ console.log(
3638
+ source_default.red(`\u2717 Root directory not found: ${options.rootDir}`)
3639
+ );
3640
+ process.exit(1);
3641
+ }
3642
+ console.log(source_default.gray(` Root dir: `) + source_default.cyan(options.rootDir));
3643
+ }
3644
+ const isMcp = await isMcpProject(projectDir);
3633
3645
  if (!isMcp) {
3634
3646
  console.log(
3635
3647
  source_default.yellow(
@@ -3722,17 +3734,22 @@ async function deployCommand(options) {
3722
3734
  console.log(source_default.gray("Deployment cancelled."));
3723
3735
  process.exit(0);
3724
3736
  }
3725
- const projectName = options.name || await getProjectName(cwd);
3726
- const runtime = options.runtime || await detectRuntime(cwd);
3737
+ const projectName = options.name || await getProjectName(projectDir);
3738
+ const runtime = options.runtime || await detectRuntime(projectDir);
3727
3739
  const port = options.port || 3e3;
3728
- const buildCommand = await detectBuildCommand(cwd);
3729
- const startCommand = await detectStartCommand(cwd);
3740
+ const buildCommand = await detectBuildCommand(projectDir);
3741
+ const startCommand = await detectStartCommand(projectDir);
3730
3742
  const envVars = await buildEnvVars(options);
3731
3743
  console.log();
3732
3744
  console.log(source_default.white("Deployment configuration:"));
3733
3745
  console.log(source_default.gray(` Name: `) + source_default.cyan(projectName));
3734
3746
  console.log(source_default.gray(` Runtime: `) + source_default.cyan(runtime));
3735
3747
  console.log(source_default.gray(` Port: `) + source_default.cyan(port));
3748
+ if (options.rootDir) {
3749
+ console.log(
3750
+ source_default.gray(` Root dir: `) + source_default.cyan(options.rootDir)
3751
+ );
3752
+ }
3736
3753
  if (buildCommand) {
3737
3754
  console.log(source_default.gray(` Build command: `) + source_default.cyan(buildCommand));
3738
3755
  }
@@ -3870,7 +3887,8 @@ async function deployCommand(options) {
3870
3887
  buildCommand,
3871
3888
  startCommand,
3872
3889
  ...options.port !== void 0 ? { port: options.port } : {},
3873
- env: Object.keys(envVars).length > 0 ? envVars : void 0
3890
+ env: Object.keys(envVars).length > 0 ? envVars : void 0,
3891
+ rootDir: options.rootDir || void 0
3874
3892
  };
3875
3893
  const deployment2 = await api.redeployDeployment(
3876
3894
  existingLink.deploymentId,
@@ -3914,6 +3932,7 @@ async function deployCommand(options) {
3914
3932
  type: "github",
3915
3933
  repo: `${gitInfo.owner}/${gitInfo.repo}`,
3916
3934
  branch: gitInfo.branch || "main",
3935
+ rootDir: options.rootDir || void 0,
3917
3936
  runtime,
3918
3937
  port,
3919
3938
  buildCommand,
@@ -6172,7 +6191,10 @@ program.command("deploy").description("Deploy MCP server from GitHub to Manufact
6172
6191
  ).option(
6173
6192
  "--env <key=value...>",
6174
6193
  "Environment variables (can be used multiple times)"
6175
- ).option("--env-file <path>", "Path to .env file with environment variables").action(async (options) => {
6194
+ ).option("--env-file <path>", "Path to .env file with environment variables").option(
6195
+ "--root-dir <path>",
6196
+ "Root directory within repo to deploy from (for monorepos)"
6197
+ ).action(async (options) => {
6176
6198
  await deployCommand({
6177
6199
  open: options.open,
6178
6200
  name: options.name,
@@ -6180,7 +6202,8 @@ program.command("deploy").description("Deploy MCP server from GitHub to Manufact
6180
6202
  runtime: options.runtime,
6181
6203
  new: options.new,
6182
6204
  env: options.env,
6183
- envFile: options.envFile
6205
+ envFile: options.envFile,
6206
+ rootDir: options.rootDir
6184
6207
  });
6185
6208
  });
6186
6209
  program.addCommand(createClientCommand());