iloveeyjafjalla opened a new issue, #6942:
URL: https://github.com/apache/rocketmq-dashboard/issues/6942

   ## Summary
   
   `rmqctl mcp config` emits a client snippet that starts `rmqctl mcp stdio` 
without `--config` when the config file was selected through `RMQCTL_CONFIG`, 
although `rmqctl` itself resolves `--config` > `RMQCTL_CONFIG` > 
`~/.rmqctl/config.yaml`. An MCP client launched from a GUI (Claude Desktop, 
Cursor, …) does not inherit a shell's exported variables, so the child process 
resolves the default file — a different context, or none at all — while the 
snippet looks like it reproduces the session that produced it.
   
   ## Why
   
   - Path resolution: `Store.Path` (`rmqctl/internal/config/config.go:59-71`).
   - The snippet mirrors only the flag: `newMCPConfigCommand` checks 
`runtime.options.configPath` and nothing else (`rmqctl/cmd/mcp.go:69-76`), so 
an environment-selected file never reaches the generated args.
   
   ## Reproduction
   
   `rmqctl/cmd/mcp_config_path_test.go` → 
`TestMCPConfigCarriesTheEnvironmentSelectedPath` sets 
`RMQCTL_CONFIG=env/selected.yaml` and runs `mcp config`:
   
   ```
   args = ["mcp" "stdio"]; want the selected config ["mcp" "stdio" "--config" 
"…/env/selected.yaml"]
   ```
   
   ## Expected
   
   The snippet carries the file the invocation actually selected, so the 
client's child process opens the same context.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to