Repository navigation
Description
Corrected 2026-08-31. This issue originally claimed that
upstream_servers patchdisabled isolation. That was wrong — verified below. The persisted config is correct; the reporting is not. Title and body rewritten to the actual defect.
Summary
IsolationConfig.IsEnabled() returns false when Enabled is nil, but nil means "inherit global" — as the field's own comment says, and as the spawn path implements. Every read surface (REST API, CLI, Web UI, tray) therefore reports Docker isolation as disabled for servers that are actually running isolated.
The contradiction
internal/config/config.go:801 — the field is explicitly tri-state:
Enabled *bool `json:"enabled,omitempty"` // nil = inherit globalinternal/config/config.go:833 — but the accessor collapses inherit to off:
func (ic *IsolationConfig) IsEnabled() bool {
if ic == nil || ic.Enabled == nil {
return false // <-- "inherit global" reported as "disabled"
}
return *ic.Enabled
}internal/upstream/core/isolation.go:219 — meanwhile the spawn path gets it right, downgrading only on an explicit false:
// (3) Global isolation active: honor a per-server bool opt-out.
if serverConfig.Isolation != nil &&
serverConfig.Isolation.Enabled != nil && !*serverConfig.Isolation.Enabled {
return config.IsolationModeNone
}
return globalModeSo with global isolation on and a per-server isolation object that has an image but no enabled, the server is containerized while every UI says isolation is off.
Verification
Isolation object built by unmarshalling {"image": "…bookworm"} and merged onto a server with no prior isolation:
after unmarshal: Enabled=<nil> (nil=true) Image="ghcr.io/astral-sh/uv:python3.13-bookworm"
after merge: Enabled=<nil> (nil=true) Image="ghcr.io/astral-sh/uv:python3.13-bookworm"
IsEnabled()=false <-- the bug
marshalled: {"image":"ghcr.io/astral-sh/uv:python3.13-bookworm"}
MergeServerConfig preserves the tri-state correctly and the persisted JSON has no enabled key. Confirmed against the live process too — docker ps shows the container running:
ghcr.io/astral-sh/uv:python3.13-bookworm "uvx --from gcore-mc…"
while mcpproxy upstream list reported "isolation": {"enabled": false, …} for that same server.
Blast radius
internal/contracts/converters.go:73 feeds IsEnabled() into contracts.IsolationConfig.Enabled, which is a plain bool — the tri-state is destroyed at the API boundary, so no downstream consumer can recover it. Same flattening at runtime.go:2434 and mcp.go:3864.
Consequences:
- Operators misread their own security posture — the UI says a server is unisolated when it is isolated. For a feature whose entire purpose is containment, the status display being wrong in the reassuring-to-scary direction is bad; being wrong at all is worse than not showing it.
- Likely write-back corruption. The Web UI / tray populate an isolation form from this flattened
false. Saving any other isolation field (say, the image) would submitenabled: false— turning a display artifact into a real, persisted opt-out that genuinely disables isolation. The REST writer (httpapi/server.go:1783IsolationRequest.toConfig) preserves nil correctly, so the corruption would come from the client sending an explicitfalseit never meant. Worth confirming infrontend/srcas part of the fix.
Suggested fix
The reported value must be the effective mode, which needs the global config — something ConvertServerConfig doesn't currently receive. Options:
- (a) Have the read surfaces report the resolved mode from
IsolationManager.ResolveMode(server), which is already the single source of truth for the spawn decision. The payload already carries anisolation_defaultsblock, so there is precedent for resolving global context on the read path. - (b) Make
contracts.IsolationConfig.Enableda*boolpassthrough and let clients resolve it — preserves information but is an API break and pushes the precedence logic into every client. - (c) Keep
Enabledas the raw override and add an expliciteffective_enabled(oreffective_mode) field. Most informative, no API break, and makes "inherit" visible as its own state rather than a guess.
(c) or (a) preferred. Whichever is chosen, IsEnabled()'s nil case should stop meaning "false" — rename it to IsExplicitlyEnabled(), or delete it in favour of the resolver, so the next caller can't reintroduce the same flattening.
A test asserting that a server with isolation:{image:…} and global isolation on reports as isolated on every read surface (contracts, CLI JSON, /api/v1/servers) would lock this down.
Related: #1146 — found while auditing the same patch operation.
Activity
[-]upstream_servers patch silently disables Docker isolation when creating the isolation object[/-][+]isolation.enabled: nil (inherit global) is reported as false, so isolated servers display as unisolated[/+]fix(isolation): report effective isolation state instead of treating …
fix(upstream): stop retrying deterministic connection failures forever (
fix(security): derive the mask net from its renderers, and walk neste…
fix(security): mask shared servers on the server edition's per-user door
fix(isolation): separate scanner isolation mode from process isolatio…