mirror of
https://github.com/mcp-use/mcp-use.git
synced 2026-09-14 18:06:01 +08:00
0fb3005356
* docs(typescript): fix CLI flag syntax that silently deploys the wrong directory
The v2 CLI reference wrote the repeatable --env, --watch-paths and
--deploy-branches flags in commander's variadic notation (<glob...>) and
showed examples passing several values to one flag. The CLI parses argv
with node's util.parseArgs, where multiple: true means the flag is
repeatable, not variadic, so only the first value is read and the rest
become positionals.
That makes the two documented examples wrong in different ways:
mcp-use deploy --root-dir apps/mcp-server \
--watch-paths "apps/mcp-server/**" "packages/shared/**"
deploy takes an optional [path] positional, so "packages/shared/**" is
accepted as the deploy path. The command succeeds and deploys the wrong
directory with one watch path instead of two.
mcp-use servers update srv_abc123 \
--watch-paths "apps/api/**" "packages/shared/**" --deploy-branches "release/*"
servers update allows exactly one positional, so the extra value fails
with exit code 2 and "Usage: mcp-use servers update <id-or-slug>".
Also drops the -y short flag from servers delete. deploy defines
yes: { type: "boolean", short: "y" }, but servers delete defines only
yes: { type: "boolean" }, so -y exits 2 with "Unknown option '-y'".
The legacy docs/typescript reference already uses the repeated-flag form.
This brings v2 in line with it and with the CLI's own --help output.
* docs: say outright that the servers update pattern flags are repeatable
The deploy table carries Repeatable in the description column, but the
servers update row is a flat options list with nowhere to put it, so the
one place a reader learns the rule was the corrected example.