Skip to content

Commit b65dbfe

Browse files
Document --network host / --isolate-network interaction
1 parent be1e38f commit b65dbfe

2 files changed

Lines changed: 33 additions & 0 deletions

File tree

SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Updated `docs/toolhive/guides-cli/network-isolation.mdx` to document the v0.40.0 reconciliation between `--isolate-network` and `--network host`/`--network none`: added an interaction table + change-note, plus a forward-reference in "How the default works".

docs/toolhive/guides-cli/network-isolation.mdx

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ accepted:
3131
thv run [--permission-profile </path/to/custom-profile.json>] <SERVER>
3232
```
3333

34+
Isolation requires bridge networking. If you also pass `--network host` or
35+
`--network none`, ToolHive drops isolation for that workload (see
36+
[Interaction with `--network host` and `--network none`](#interaction-with---network-host-and---network-none)).
37+
3438
:::info[Changed in v0.30.1]
3539

3640
Earlier versions of ToolHive required `--isolate-network` to turn on network
@@ -201,6 +205,34 @@ thv run --isolate-network=false <SERVER>
201205
The container's own network namespace still isolates it from the host; only
202206
ToolHive's allowlist enforcement is disabled.
203207

208+
## Interaction with `--network host` and `--network none`
209+
210+
Network isolation is a bridge-network construct: the egress, DNS, and ingress
211+
sidecars only work when the MCP container lives on a container-runtime bridge.
212+
When you pass `--network host` or `--network none`, the container shares the
213+
host network namespace or has no network at all, so the isolation sidecars have
214+
no way to intercept traffic. In v0.40.0 and later, ToolHive reconciles the two
215+
flags automatically:
216+
217+
| `--network` mode | `--isolate-network` source | Behavior |
218+
| -------------------------- | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
219+
| bridge (unset or `bridge`) | any | Isolation as designed. |
220+
| `host` or custom | default (implicit) | Isolation is dropped with a warning in the run log, restoring outbound connectivity for host-networked workloads. |
221+
| `host` or custom | explicit `--isolate-network=true` | `thv run` fails fast with an error naming both flags. Drop `--network host` to keep enforced isolation, or set `--isolate-network=false` to keep host networking. |
222+
| `none` | any | Isolation is silently dropped (`none` is already maximally confined; isolation would be redundant). |
223+
224+
:::info[Changed in v0.40.0]
225+
226+
Before v0.40.0, `thv run --network host` silently built the isolation sidecars
227+
against an internal-only network, which broke outbound DNS and connectivity on
228+
the next re-create. Isolation is now dropped for `host`/`none` modes so
229+
host-networked workloads keep working. If you rely on host networking, no change
230+
is needed on your side; if you previously combined `--isolate-network` with
231+
`--network host` explicitly, split them into two invocations depending on which
232+
one you actually need.
233+
234+
:::
235+
204236
## Example: Enable network isolation using registry defaults
205237

206238
Many MCP servers in the ToolHive registry have default permission profiles that

0 commit comments

Comments
 (0)