fix(installer): read the persisted MCP port on update instead of the wizard default

RegisterMcpStep built the registration URL from ctx.ExternalMcpPort, which the
Update pipeline never repopulates from the existing installation, so any
update silently re-registered the wizard default (47822) even when
worker.config.json had a different port configured. InstallerWorkerConfig was
also missing external_mcp_port entirely, so the installer had no way to read
it back. Port 0 (external listener disabled) now skips registration instead
of pointing Claude at 127.0.0.1:0/mcp.
This commit is contained in:
mika kuns
2026-08-06 11:04:38 +02:00
parent 0f187d8e82
commit 3462ca1355
3 changed files with 88 additions and 1 deletions
@@ -52,6 +52,9 @@ public sealed class InstallerWorkerConfig
[JsonPropertyName("claude_bin")]
public string ClaudeBin { get; set; } = "claude";
[JsonPropertyName("external_mcp_port")]
public int ExternalMcpPort { get; set; } = 47_822;
private static readonly JsonSerializerOptions ReadOpts = new()
{
ReadCommentHandling = JsonCommentHandling.Skip,