Skip to content

upstream add/remove/etc. ignore -c/--config and load the default config #1396

Closed

Description

@Dumbris

mcpproxy upstream add (and every other upstream subcommand except list and logs) silently ignores -c/--config.

Cause: loadUpstreamConfig() (cmd/mcpproxy/upstream_cmd.go, ~line 916) reads the package variable upstreamConfigPath, which is only bound to -c on the list and logs subcommands (~lines 339/347). All other subcommands fall back to config.Load(), i.e. ~/.mcpproxy/mcp_config.json, while still honouring --data-dir for where the result is written.

Impact (observed during live QA): mcpproxy upstream add --config <scratch>/mcp_config.json --data-dir <scratch> ... loaded the user's real 26-server production config, wrote all of it plus the new server into the scratch location, and a test instance using that scratch config started connecting to the real upstream servers with their configured credentials. The real config file itself was not modified.

Fix: bind -c/--config on every upstream subcommand (or read the global configFile the way loadActivityConfig/loadCredentialConfig do), and add a test that upstream add --config X never reads the default config.

Activity

  1. added
    kind/bug
    area/cli
    priority/high
    triage/accepted
    on Sep 26, 2026
  2. added a commit that references this issue on Sep 27, 2026
    565408e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/clikind/bugpriority/hightriage/accepted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions