Those functions act on the default MCP settings in the config file. More...
Classes | |
| struct | CmdLineOverrides |
Functions | |
| CmdLineOverrides | parseCmdLineOverrides (const std::vector< std::string > &commandArgs) |
| int | getPort () |
| void | setPort (int port) |
| bool | getEnableByDefault () |
| Returns whether the MCP server should start on program startup, according to the config file. | |
| void | setEnableByDefault (bool enable) |
| Sets whether the MCP server should start on program startup, in the config file. | |
| void | applyToServer () |
| bool | isPortLockedFromCmdLine () |
Those functions act on the default MCP settings in the config file.
| void MR::McpSettings::applyToServer | ( | ) |
Sends those settings to the MCP server. This restarts it if necessary, e.g. to update the port. This ignores getEnableByDefault().
|
nodiscard |
Returns whether the MCP server should start on program startup, according to the config file.
|
nodiscard |
Returns the MCP port from the config file, or the default value. Note that this acts on the config file and not on the actual MCP server that might be running.
|
nodiscard |
True iff -mcpPort N was passed on the command line. The config-backed port is then ignored for this session, and the GUI shows the port read-only.
|
nodiscard |
Pure parse: scans commandArgs for MCP-related flags and returns the resolved overrides. Last occurrence of each flag wins (matches shell convention). -mcpPort N forces the server port to N (overriding the config). -mcpDumpFile <path> requests writing the tool cache to that path; the caller (typically ViewerSetup::setupMcp) is expected to skip starting the live server in that case so a prime spawn does not collide with a real backend on the port.
| void MR::McpSettings::setEnableByDefault | ( | bool | enable | ) |
Sets whether the MCP server should start on program startup, in the config file.
| void MR::McpSettings::setPort | ( | int | port | ) |
Sets the MCP port in the config. Note that this acts on the config file and not on the actual MCP server that might be running.