diff --git a/cmd/mcpproxy/upstream_cmd.go b/cmd/mcpproxy/upstream_cmd.go index 4b9edd38d..74cc16157 100644 --- a/cmd/mcpproxy/upstream_cmd.go +++ b/cmd/mcpproxy/upstream_cmd.go @@ -133,17 +133,34 @@ Examples: } upstreamPatchCmd = &cobra.Command{ - Use: "patch ", - Short: "Update headers / env on an existing upstream server", - Long: `Update HTTP headers and stdio environment variables on an existing upstream server. - -The PATCH endpoint uses JSON Merge Patch semantics: keys you specify are -upserted, keys you delete with -remove flags are explicitly removed, and -every other key on the stored config is preserved. So you can safely -rotate a single header without seeing or touching the rest — including + Use: "patch [-- command args...]", + Short: "Update command, args, headers or env on an existing upstream server", + Long: `Update the command and arguments of a stdio server, HTTP headers, and +environment variables on an existing upstream server. + +The PATCH endpoint uses JSON Merge Patch semantics for headers and env: keys +you specify are upserted, keys you delete with -remove flags are explicitly +removed, and every other key on the stored config is preserved. So you can +safely rotate a single header without seeing or touching the rest — including sensitive values the backend redacts from list / inspect responses. +The command is replaced as a single value. Arguments are replaced as a whole +list: give every argument you want to keep. Changing either restarts the +server with the new command line. + Examples: + # replace the whole command line of a stdio server + mcpproxy upstream patch sqlite -- uvx mcp-server-sqlite --db-path /data/new.db + + # change only the program, keep the stored arguments + mcpproxy upstream patch sqlite --command /usr/local/bin/uvx + + # replace only the arguments (repeat --arg, in order) + mcpproxy upstream patch sqlite --arg mcp-server-sqlite --arg=--db-path --arg /data/new.db + + # remove all arguments + mcpproxy upstream patch sqlite --clear-args + # rotate the Authorization header on the synapbus server mcpproxy upstream patch synapbus --header "Authorization: Bearer new-token" @@ -161,7 +178,10 @@ Examples: Flags are repeatable. The corresponding null in the JSON Merge Patch body is constructed automatically — you never have to think about wire format.`, - Args: cobra.ExactArgs(1), + Args: func(cmd *cobra.Command, args []string) error { + _, _, err := splitUpstreamPatchArgs(args, cmd.ArgsLenAtDash()) + return err + }, RunE: runUpstreamPatch, } @@ -311,6 +331,9 @@ Examples: upstreamPatchEnvs []string upstreamPatchEnvRemove []string upstreamPatchInitTimeout string + upstreamPatchCommand string + upstreamPatchArgs []string + upstreamPatchClearArgs bool // Import command flags upstreamImportServer string @@ -393,6 +416,9 @@ func init() { upstreamPatchCmd.Flags().StringArrayVar(&upstreamPatchHeaderRemove, "header-remove", nil, "HTTP header name to delete (repeatable)") upstreamPatchCmd.Flags().StringArrayVar(&upstreamPatchEnvs, "env", nil, "Environment variable to upsert in KEY=value format (repeatable)") upstreamPatchCmd.Flags().StringArrayVar(&upstreamPatchEnvRemove, "env-remove", nil, "Environment variable name to delete (repeatable)") + upstreamPatchCmd.Flags().StringVar(&upstreamPatchCommand, "command", "", "New command for a stdio server (the program to start); arguments are kept unless --arg / --clear-args is given") + upstreamPatchCmd.Flags().StringArrayVar(&upstreamPatchArgs, "arg", nil, "Argument for a stdio server's command (repeatable, in order); REPLACES all stored arguments. Use --arg=--flag for values that start with a dash") + upstreamPatchCmd.Flags().BoolVar(&upstreamPatchClearArgs, "clear-args", false, "Remove all arguments from a stdio server's command") upstreamPatchCmd.Flags().StringVar(&upstreamPatchInitTimeout, "init-timeout", "", "MCP initialize handshake deadline as a duration (e.g. '120s', '3m'); raise for upstreams that warm up before responding to initialize") // Inspect command flags @@ -2649,75 +2675,167 @@ func applyImportedServersConfigMode(imported []*configimport.ImportedServer, glo // {"headers": {"X-Stale": null}}. Both shapes go through encoding/json // (`map[string]*string`) where a nil pointer renders as the literal // `null` token — verified by the backend's PATCH tests. -func runUpstreamPatch(_ *cobra.Command, args []string) error { - serverName := strings.TrimSpace(args[0]) - if serverName == "" { - return fmt.Errorf("server name is required") - } +// upstreamPatchInput is everything `upstream patch` reads from the command +// line, kept apart from the cobra globals so the body can be built and tested +// without a daemon. +type upstreamPatchInput struct { + Headers []string + HeaderRemove []string + Envs []string + EnvRemove []string + InitTimeout string + // Command is --command; CommandSet tells an explicit empty value (an + // error) from an omitted flag. + Command string + CommandSet bool + // Args is --arg (repeatable); ClearArgs is --clear-args. + Args []string + ClearArgs bool + // CommandLine is everything after `--`: the new command and its arguments. + CommandLine []string +} + +// splitUpstreamPatchArgs separates the server name from the optional command +// line after `--`. dash is cobra's ArgsLenAtDash: -1 when `--` was not used. +// +// A server name may start with a dash, and the only way to pass one is behind +// `--` (`upstream patch --env A=b -- -name`). That form predates the command +// line and keeps its meaning: a single argument after a leading `--` is the +// name, never a command. +func splitUpstreamPatchArgs(args []string, dash int) (name string, commandLine []string, err error) { + before := args + switch { + case dash == 0 && len(args) == 1: + // `-- `: the name alone. + case dash >= 0: + before = args[:dash] + commandLine = args[dash:] + } + if len(before) != 1 { + return "", nil, fmt.Errorf("exactly one server name is required before any `--` (got %d)", len(before)) + } + name = strings.TrimSpace(before[0]) + if name == "" { + return "", nil, fmt.Errorf("server name is required") + } + if dash > 0 && len(commandLine) == 0 { + return "", nil, fmt.Errorf("a command is required after --") + } + return name, commandLine, nil +} - initTimeout := strings.TrimSpace(upstreamPatchInitTimeout) - if len(upstreamPatchHeaders) == 0 && len(upstreamPatchHeaderRemove) == 0 && - len(upstreamPatchEnvs) == 0 && len(upstreamPatchEnvRemove) == 0 && initTimeout == "" { - return fmt.Errorf("at least one of --header / --header-remove / --env / --env-remove / --init-timeout must be specified") +// buildUpstreamPatchBody turns the flags into the PATCH /api/v1/servers/{id} +// body and a short summary of what it changes. The summary never repeats a +// value: headers, env values and arguments can all carry credentials. +func buildUpstreamPatchBody(in upstreamPatchInput) (body map[string]interface{}, summary []string, err error) { + initTimeout := strings.TrimSpace(in.InitTimeout) + if len(in.Headers) == 0 && len(in.HeaderRemove) == 0 && + len(in.Envs) == 0 && len(in.EnvRemove) == 0 && initTimeout == "" && + !in.CommandSet && len(in.Args) == 0 && !in.ClearArgs && len(in.CommandLine) == 0 { + return nil, nil, fmt.Errorf("at least one of --command / --arg / --clear-args / `-- command args...` / --header / --header-remove / --env / --env-remove / --init-timeout must be specified") } // Validate --init-timeout locally so we fail fast with a clear message // before hitting the daemon (the backend re-validates the bounds). if initTimeout != "" { if _, perr := time.ParseDuration(initTimeout); perr != nil { - return fmt.Errorf("invalid --init-timeout %q: %v (expected a duration like '120s' or '3m')", initTimeout, perr) + return nil, nil, fmt.Errorf("invalid --init-timeout %q: %v (expected a duration like '120s' or '3m')", initTimeout, perr) + } + } + + body = map[string]interface{}{} + + // Command and arguments (issue #2008). `args` REPLACES the stored vector, + // so it is sent only when the caller asked for it; an explicit empty array + // clears it, while an omitted key leaves it alone. + switch { + case len(in.CommandLine) > 0: + if in.CommandSet || len(in.Args) > 0 || in.ClearArgs { + return nil, nil, fmt.Errorf("`-- command args...` cannot be combined with --command, --arg or --clear-args; use one form") + } + // The command is stored as given: a path is not ours to trim. + command := in.CommandLine[0] + if strings.TrimSpace(command) == "" { + return nil, nil, fmt.Errorf("command after -- must not be empty") + } + rest := append([]string{}, in.CommandLine[1:]...) + body["command"] = command + body["args"] = rest + summary = append(summary, "command set") + if len(rest) > 0 { + summary = append(summary, fmt.Sprintf("%d arg(s) set", len(rest))) + } else { + summary = append(summary, "args cleared") + } + default: + if in.CommandSet { + if strings.TrimSpace(in.Command) == "" { + return nil, nil, fmt.Errorf("--command must not be empty") + } + body["command"] = in.Command + summary = append(summary, "command set") + } + if len(in.Args) > 0 && in.ClearArgs { + return nil, nil, fmt.Errorf("--arg and --clear-args conflict; pick one") + } + if len(in.Args) > 0 { + body["args"] = append([]string{}, in.Args...) + summary = append(summary, fmt.Sprintf("%d arg(s) set", len(in.Args))) + } + if in.ClearArgs { + body["args"] = []string{} + summary = append(summary, "args cleared") } } headers := map[string]*string{} - for _, h := range upstreamPatchHeaders { + for _, h := range in.Headers { parts := strings.SplitN(h, ":", 2) if len(parts) != 2 { - return fmt.Errorf("invalid --header format: %q (expected 'Name: value')", h) + return nil, nil, fmt.Errorf("invalid --header format: %q (expected 'Name: value')", h) } key := strings.TrimSpace(parts[0]) val := strings.TrimSpace(parts[1]) if key == "" { - return fmt.Errorf("invalid --header: empty header name in %q", h) + return nil, nil, fmt.Errorf("invalid --header: empty header name in %q", h) } headers[key] = &val } - for _, k := range upstreamPatchHeaderRemove { + for _, k := range in.HeaderRemove { key := strings.TrimSpace(k) if key == "" { - return fmt.Errorf("invalid --header-remove: empty name") + return nil, nil, fmt.Errorf("invalid --header-remove: empty name") } if _, dupe := headers[key]; dupe { - return fmt.Errorf("--header and --header-remove for %q conflict; pick one", key) + return nil, nil, fmt.Errorf("--header and --header-remove for %q conflict; pick one", key) } headers[key] = nil // JSON Merge Patch: null = delete } envs := map[string]*string{} - for _, e := range upstreamPatchEnvs { + for _, e := range in.Envs { parts := strings.SplitN(e, "=", 2) if len(parts) != 2 { - return fmt.Errorf("invalid --env format: %q (expected 'KEY=value')", e) + return nil, nil, fmt.Errorf("invalid --env format: %q (expected 'KEY=value')", e) } key := strings.TrimSpace(parts[0]) val := parts[1] if key == "" { - return fmt.Errorf("invalid --env: empty key in %q", e) + return nil, nil, fmt.Errorf("invalid --env: empty key in %q", e) } envs[key] = &val } - for _, k := range upstreamPatchEnvRemove { + for _, k := range in.EnvRemove { key := strings.TrimSpace(k) if key == "" { - return fmt.Errorf("invalid --env-remove: empty name") + return nil, nil, fmt.Errorf("invalid --env-remove: empty name") } if _, dupe := envs[key]; dupe { - return fmt.Errorf("--env and --env-remove for %q conflict; pick one", key) + return nil, nil, fmt.Errorf("--env and --env-remove for %q conflict; pick one", key) } envs[key] = nil } - body := map[string]interface{}{} if len(headers) > 0 { body["headers"] = headers } @@ -2728,6 +2846,46 @@ func runUpstreamPatch(_ *cobra.Command, args []string) error { body["init_timeout"] = initTimeout } + if n := len(in.Headers); n > 0 { + summary = append(summary, fmt.Sprintf("%d header(s) set", n)) + } + if n := len(in.HeaderRemove); n > 0 { + summary = append(summary, fmt.Sprintf("%d header(s) removed", n)) + } + if n := len(in.Envs); n > 0 { + summary = append(summary, fmt.Sprintf("%d env var(s) set", n)) + } + if n := len(in.EnvRemove); n > 0 { + summary = append(summary, fmt.Sprintf("%d env var(s) removed", n)) + } + if initTimeout != "" { + summary = append(summary, fmt.Sprintf("init_timeout=%s", initTimeout)) + } + return body, summary, nil +} + +func runUpstreamPatch(cmd *cobra.Command, args []string) error { + serverName, commandLine, err := splitUpstreamPatchArgs(args, cmd.ArgsLenAtDash()) + if err != nil { + return err + } + + body, summary, err := buildUpstreamPatchBody(upstreamPatchInput{ + Headers: upstreamPatchHeaders, + HeaderRemove: upstreamPatchHeaderRemove, + Envs: upstreamPatchEnvs, + EnvRemove: upstreamPatchEnvRemove, + InitTimeout: upstreamPatchInitTimeout, + Command: upstreamPatchCommand, + CommandSet: cmd.Flags().Changed("command"), + Args: upstreamPatchArgs, + ClearArgs: upstreamPatchClearArgs, + CommandLine: commandLine, + }) + if err != nil { + return err + } + bodyBytes, err := json.Marshal(body) if err != nil { return fmt.Errorf("failed to marshal patch body: %w", err) @@ -2754,24 +2912,8 @@ func runUpstreamPatch(_ *cobra.Command, args []string) error { } fmt.Printf("✅ Patched %s", serverName) - parts := []string{} - if n := len(upstreamPatchHeaders); n > 0 { - parts = append(parts, fmt.Sprintf("%d header(s) set", n)) - } - if n := len(upstreamPatchHeaderRemove); n > 0 { - parts = append(parts, fmt.Sprintf("%d header(s) removed", n)) - } - if n := len(upstreamPatchEnvs); n > 0 { - parts = append(parts, fmt.Sprintf("%d env var(s) set", n)) - } - if n := len(upstreamPatchEnvRemove); n > 0 { - parts = append(parts, fmt.Sprintf("%d env var(s) removed", n)) - } - if initTimeout != "" { - parts = append(parts, fmt.Sprintf("init_timeout=%s", initTimeout)) - } - if len(parts) > 0 { - fmt.Printf(": %s", strings.Join(parts, ", ")) + if len(summary) > 0 { + fmt.Printf(": %s", strings.Join(summary, ", ")) } fmt.Println() return nil diff --git a/cmd/mcpproxy/upstream_patch_body_test.go b/cmd/mcpproxy/upstream_patch_body_test.go new file mode 100644 index 000000000..4533c38e7 --- /dev/null +++ b/cmd/mcpproxy/upstream_patch_body_test.go @@ -0,0 +1,148 @@ +package main + +import ( + "encoding/json" + "strings" + "testing" + + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" +) + +// Issue #2008: `mcpproxy upstream patch` could not change a stdio server's +// command or arguments, although PATCH /api/v1/servers/{id} accepts both. + +func patchBodyJSON(t *testing.T, in upstreamPatchInput) string { + t.Helper() + body, _, err := buildUpstreamPatchBody(in) + require.NoError(t, err) + raw, err := json.Marshal(body) + require.NoError(t, err) + return string(raw) +} + +func TestBuildUpstreamPatchBody_Command(t *testing.T) { + got := patchBodyJSON(t, upstreamPatchInput{Command: "uvx", CommandSet: true}) + assert.JSONEq(t, `{"command":"uvx"}`, got, "args must be omitted so the stored vector is kept") +} + +func TestBuildUpstreamPatchBody_CommandIsStoredAsGiven(t *testing.T) { + // A path may legitimately end in a space; only a blank value is refused. + got := patchBodyJSON(t, upstreamPatchInput{Command: "/opt/mcp/server ", CommandSet: true}) + assert.JSONEq(t, `{"command":"/opt/mcp/server "}`, got) + got = patchBodyJSON(t, upstreamPatchInput{CommandLine: []string{"/opt/mcp/server ", "a"}}) + assert.JSONEq(t, `{"command":"/opt/mcp/server ","args":["a"]}`, got) +} + +func TestBuildUpstreamPatchBody_Args(t *testing.T) { + got := patchBodyJSON(t, upstreamPatchInput{Args: []string{"mcp-server-sqlite", "--db", "a,b.db"}}) + assert.JSONEq(t, `{"args":["mcp-server-sqlite","--db","a,b.db"]}`, got) +} + +func TestBuildUpstreamPatchBody_ClearArgs(t *testing.T) { + got := patchBodyJSON(t, upstreamPatchInput{ClearArgs: true}) + assert.JSONEq(t, `{"args":[]}`, got, "an empty array, not null: null means 'leave unchanged'") +} + +func TestBuildUpstreamPatchBody_CommandLine(t *testing.T) { + got := patchBodyJSON(t, upstreamPatchInput{CommandLine: []string{"npx", "-y", "some-mcp"}}) + assert.JSONEq(t, `{"command":"npx","args":["-y","some-mcp"]}`, got) + + // A bare command after `--` replaces the whole command line, so the old + // arguments must go too. + got = patchBodyJSON(t, upstreamPatchInput{CommandLine: []string{"my-server"}}) + assert.JSONEq(t, `{"command":"my-server","args":[]}`, got) +} + +func TestBuildUpstreamPatchBody_CombinesWithEnvAndHeaders(t *testing.T) { + got := patchBodyJSON(t, upstreamPatchInput{ + Command: "uvx", + CommandSet: true, + Args: []string{"x"}, + Envs: []string{"LOG=debug"}, + EnvRemove: []string{"OLD"}, + Headers: []string{"X-A: 1"}, + HeaderRemove: []string{"X-B"}, + InitTimeout: "120s", + }) + assert.JSONEq(t, `{ + "command":"uvx","args":["x"], + "env":{"LOG":"debug","OLD":null}, + "headers":{"X-A":"1","X-B":null}, + "init_timeout":"120s"}`, got) +} + +func TestBuildUpstreamPatchBody_Summary(t *testing.T) { + _, summary, err := buildUpstreamPatchBody(upstreamPatchInput{CommandLine: []string{"npx", "-y", "some-mcp"}}) + require.NoError(t, err) + joined := strings.Join(summary, ", ") + assert.Contains(t, joined, "command set") + assert.Contains(t, joined, "2 arg(s) set") + // Argument values can carry credentials; the summary must not echo them. + assert.NotContains(t, joined, "some-mcp") + + _, summary, err = buildUpstreamPatchBody(upstreamPatchInput{ClearArgs: true}) + require.NoError(t, err) + assert.Contains(t, strings.Join(summary, ", "), "args cleared") +} + +func TestBuildUpstreamPatchBody_Errors(t *testing.T) { + cases := []struct { + name string + in upstreamPatchInput + want string + }{ + {"nothing to change", upstreamPatchInput{}, "at least one of"}, + {"empty command", upstreamPatchInput{Command: " ", CommandSet: true}, "--command must not be empty"}, + {"args and clear", upstreamPatchInput{Args: []string{"a"}, ClearArgs: true}, "--arg and --clear-args conflict"}, + {"command line and --command", upstreamPatchInput{CommandLine: []string{"npx"}, Command: "uvx", CommandSet: true}, "cannot be combined"}, + {"command line and --arg", upstreamPatchInput{CommandLine: []string{"npx"}, Args: []string{"a"}}, "cannot be combined"}, + {"command line and --clear-args", upstreamPatchInput{CommandLine: []string{"npx"}, ClearArgs: true}, "cannot be combined"}, + {"empty command line head", upstreamPatchInput{CommandLine: []string{" ", "a"}}, "command after -- must not be empty"}, + {"bad header", upstreamPatchInput{Headers: []string{"nocolon"}}, "invalid --header format"}, + {"bad env", upstreamPatchInput{Envs: []string{"noequals"}}, "invalid --env format"}, + {"bad timeout", upstreamPatchInput{InitTimeout: "soon"}, "invalid --init-timeout"}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + _, _, err := buildUpstreamPatchBody(tc.in) + require.Error(t, err) + assert.Contains(t, err.Error(), tc.want) + }) + } +} + +func TestSplitUpstreamPatchArgs(t *testing.T) { + cases := []struct { + name string + args []string + dash int + wantName string + wantLine []string + wantErr string + }{ + {"name only", []string{"sqlite"}, -1, "sqlite", nil, ""}, + {"name and command line", []string{"sqlite", "uvx", "pkg"}, 1, "sqlite", []string{"uvx", "pkg"}, ""}, + {"no name", []string{}, -1, "", nil, "exactly one server name"}, + {"two names", []string{"a", "b"}, -1, "", nil, "exactly one server name"}, + {"dash before name and command", []string{"uvx", "pkg"}, 0, "", nil, "exactly one server name"}, + // A name that starts with a dash can only be passed behind `--`; that + // form must keep working for --env / --header patches. + {"dash-leading name behind --", []string{"-sqlite"}, 0, "-sqlite", nil, ""}, + {"dash with nothing after", []string{"sqlite"}, 1, "", nil, "a command is required after --"}, + {"blank name", []string{" "}, -1, "", nil, "server name is required"}, + } + for _, tc := range cases { + t.Run(tc.name, func(t *testing.T) { + name, line, err := splitUpstreamPatchArgs(tc.args, tc.dash) + if tc.wantErr != "" { + require.Error(t, err) + assert.Contains(t, err.Error(), tc.wantErr) + return + } + require.NoError(t, err) + assert.Equal(t, tc.wantName, name) + assert.Equal(t, tc.wantLine, line) + }) + } +} diff --git a/docs/cli/management-commands.md b/docs/cli/management-commands.md index f8b850a2a..9f33f00d7 100644 --- a/docs/cli/management-commands.md +++ b/docs/cli/management-commands.md @@ -139,6 +139,49 @@ mcpproxy upstream enable server-name mcpproxy upstream disable server-name ``` +### Change Command / Args + +`mcpproxy upstream patch` also changes the program and the arguments of a +stdio server, so you do not have to remove and re-add it. + +```bash +# Replace the whole command line: everything after -- is the new command +mcpproxy upstream patch sqlite -- uvx mcp-server-sqlite --db-path /data/new.db + +# Change only the program; the stored arguments are kept +mcpproxy upstream patch sqlite --command /usr/local/bin/uvx + +# Replace only the arguments (repeat --arg, in order) +mcpproxy upstream patch sqlite --arg mcp-server-sqlite --arg=--db-path --arg /data/new.db + +# Remove all arguments +mcpproxy upstream patch sqlite --clear-args +``` + +| Flag | Semantics | +|---|---| +| `-- command [args...]` | Replace the command and all arguments. A bare command removes the stored arguments | +| `--command PROGRAM` | Replace the program only | +| `--arg VALUE` | One argument (repeatable, in order). Replaces **all** stored arguments; write `--arg=--flag` when the value starts with a dash | +| `--clear-args` | Remove all arguments | + +**Notes:** + +- Arguments are replaced as a whole list, never merged: give every + argument you want to keep. +- The `--` form cannot be combined with `--command`, `--arg` or + `--clear-args`. It can be combined with `--env` and `--header` flags, + which must come before the `--`. +- The server restarts with the new command line. +- `mcpproxy upstream list -o json` and the Web UI show the current + command line with credential-shaped arguments masked. A masked value + is refused on write: type the real value. +- A server whose name starts with a dash is named behind `--` + (`mcpproxy upstream patch --env A=b -- -name`); to change its command + use `--command` / `--arg`. +- The same change is available in the Web UI: **Servers → (server) → + Configuration → Process → Edit**. + ### Patch Headers / Env `mcpproxy upstream patch` updates HTTP `headers` and stdio `env` on an diff --git a/docs/configuration/upstream-servers.md b/docs/configuration/upstream-servers.md index f00f77c3b..dcbd50899 100644 --- a/docs/configuration/upstream-servers.md +++ b/docs/configuration/upstream-servers.md @@ -29,6 +29,17 @@ Local servers that communicate via standard input/output: } ``` +To change `command` or `args` of a server you already added, use the Web UI +(**Servers → (server) → Configuration → Process → Edit**, one argument per +line) or the CLI: + +```bash +mcpproxy upstream patch filesystem -- npx -y @modelcontextprotocol/server-filesystem /home/user/other +``` + +Arguments are replaced as a whole list, and the server restarts with the new +command line. See [Management Commands](../cli/management-commands.md#change-command--args). + ### HTTP Servers Remote servers accessible via HTTP/HTTPS: diff --git a/frontend/src/views/ServerDetail.vue b/frontend/src/views/ServerDetail.vue index a552bf9a3..f49a426fb 100644 --- a/frontend/src/views/ServerDetail.vue +++ b/frontend/src/views/ServerDetail.vue @@ -972,11 +972,83 @@ - -
+ +
-

Process

-
+
+

Process

+ +
+
+ + +

+ An argument of this server is empty, contains a line break, or starts or ends with a space, + so the arguments cannot be edited one per line. Use mcpproxy upstream patch to change them. +

+ +

+ Blank lines and spaces around a line are ignored; for an empty argument or one that starts or + ends with a space, use mcpproxy upstream patch. Saving restarts the server with + the new command line. A value shown masked is a hidden credential: if you change the + arguments, type its real value again. +

+
+ + +
+
+
Command
{{ server.command }}