Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
4b34b63
fix(mcp): reuse shared-host address pins on mcp add
deepujain Nov 17, 2026
39776db
fix(mcp): complete shared-host recovery and integration coverage
deepujain Nov 17, 2026
364ad2d
fix(mcp): refuse conflicting shared-host pin refreshes
deepujain Nov 17, 2026
2361e81
fix(mcp): preserve shared-host pins during policy updates
deepujain Nov 17, 2026
2ff2908
docs(mcp): preserve live denied tools during recovery
deepujain Nov 17, 2026
88494d1
fix(mcp): normalize recorded public pins before replay
deepujain Nov 17, 2026
72cbc96
test(mcp): cover shared-host composition for every agent
deepujain Nov 17, 2026
7452a0e
merge(main): include the image publication permission fix
deepujain Nov 18, 2026
a30fc9e
merge(main): reconcile approved E2E assertion records
deepujain Nov 19, 2026
c8c8a45
fix(mcp): reconcile shared pins across policy conflicts
deepujain Nov 19, 2026
ea02fe3
fix(mcp): limit endpoint conflicts to shared authorities
deepujain Nov 19, 2026
2a10ea1
fix(mcp): scope unknown endpoint conflicts to matching hosts
deepujain Nov 19, 2026
267b682
test(mcp): verify configured-peer credential withholding
deepujain Nov 19, 2026
56189a3
merge: integrate current MCP recovery prerequisites
deepujain Nov 19, 2026
d6f96fb
test(mcp): keep credential probes out of Hermes startup
deepujain Nov 19, 2026
b31fd19
test(mcp): keep shared-host status DNS deterministic
deepujain Nov 19, 2026
ca23c78
test(mcp): control bounded status DNS in shared-host coverage
deepujain Nov 20, 2026
8867a01
chore(mcp): merge main and reconcile assertion inventory
deepujain Nov 20, 2026
e9b593f
test(rebuild): load shared source dependencies in lock checks
deepujain Nov 20, 2026
fa7c542
test(sandbox): prepare catalog for rebuild lock regression
deepujain Nov 20, 2026
a523938
test(mcp): keep distinct-endpoint setup in its scenario
deepujain Nov 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions ci/e2e-assertion-budget.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,30 @@
},
"limits": {
"testFileCount": 76,
"liveFileCount": 187,
"liveFileCount": 188,
"direct": {
"expectCalls": 1329,
"matcherAssertions": 1314,
"nodeAssertions": 109,
"namedAssertionHelpers": 433,
"namedAssertionHelpers": 434,
"failCalls": 0,
"throwGuards": 50,
"objectFieldAssertions": 184,
"assertionPoints": 2090,
"assertionPoints": 2091,
"generatedProbeBlocks": 91,
"generatedProbeConditions": 214
},
"unique": {
"expectCalls": 1759,
"matcherAssertions": 1739,
"expectCalls": 1765,
"matcherAssertions": 1745,
"nodeAssertions": 132,
"namedAssertionHelpers": 680,
"namedAssertionHelpers": 687,
"failCalls": 1,
"throwGuards": 531,
"throwGuards": 533,
"objectFieldAssertions": 267,
"assertionPoints": 3350,
"generatedProbeBlocks": 220,
"generatedProbeConditions": 728
"assertionPoints": 3365,
"generatedProbeBlocks": 221,
"generatedProbeConditions": 729
},
"fileMetricOrder": [
"directExpectCalls",
Expand Down Expand Up @@ -84,7 +84,7 @@
"test/e2e/live/managed-image-activation-e2e.test.ts": [0,0,12,25,0],
"test/e2e/live/managed-image-multiarch-startup.test.ts": [1,3,1,9,0],
"test/e2e/live/managed-image-protected-runtime.test.ts": [0,0,39,81,16],
"test/e2e/live/mcp-bridge.test.ts": [39,138,193,518,46],
"test/e2e/live/mcp-bridge.test.ts": [39,139,199,533,47],
"test/e2e/live/messaging-compatible-endpoint.test.ts": [13,19,13,28,2],
"test/e2e/live/messaging-providers.test.ts": [0,11,6,51,11],
"test/e2e/live/native-runtime-qualification-case.test.ts": [0,0,9,84,0],
Expand Down
6 changes: 5 additions & 1 deletion ci/e2e-assertion-growth-exceptions.json

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions docs/manage-sandboxes/add-mcp-server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ NemoClaw records the normalized host and every validated address as OpenShell po
The raw bearer value passes transiently to the OpenShell provider and remains absent from NemoClaw state, sandbox configuration, command arguments, and logs.
The sandbox configuration contains only an OpenShell resolver placeholder for `LOCAL_MCP_TOKEN`, not the raw bearer value.
You can unset the host variable after `mcp add` returns because OpenShell retains the credential.
To replace it, remove and re-add the server with the replacement exported under the same host variable name. `mcp remove` detaches the provider, and sandbox destroy may leave the detached provider for explicit operator cleanup.
To replace it, follow [Rotate a Credential](manage-mcp-servers#rotate-a-credential), including explicit cleanup of the retained provider before re-adding.

Inspect the registration after the add returns:

Expand Down Expand Up @@ -208,7 +208,12 @@ Deep Agents Code supports at most 64 managed MCP servers in one sandbox.
Endpoint paths cannot contain percent escapes, backslashes, semicolons, or OpenShell glob metacharacters.
Endpoint URLs cannot use port `0`.

NemoClaw resolves hostnames before registration and pins the validated addresses in the generated policy.
NemoClaw validates current DNS answers before registration.
If another managed server shares the hostname and port, a public add reuses its previously recorded public pins.
Otherwise, the generated policy pins the validated DNS addresses.
Reused pins can differ from the current DNS answers.
NemoClaw refuses the add before mutation if sibling pin sets conflict or trusted-private pins would need to change.
Refer to [Refresh Shared-Host Registrations](manage-mcp-servers#refresh-shared-host-registrations) to change pins for every registration on that hostname and port.
Public endpoints need no trusted-private declaration.
Private endpoints require a trust declaration and can use only RFC1918, CGNAT, or IPv6 unique local addresses.
Supply the declaration with `--trusted-private-host` or the generic `NEMOCLAW_TRUSTED_PRIVATE_HOSTS` environment variable.
Expand Down
63 changes: 47 additions & 16 deletions docs/manage-sandboxes/manage-mcp-servers.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -139,20 +139,37 @@ The bare `mcp list` and `mcp status` forms never probe, so they stay fast. Endpo

## Rotate a Credential

Export the replacement under the same host environment name used by `mcp add`, remove the native registration, and add it again so NemoClaw creates a fresh provider binding:
Before removal, inspect the live policy with `openshell policy get --full my-sandbox`.
Record the server's current denied-tool selectors from the `tool` fields of its `tools/call` deny rules.
These selectors can differ from the original add options after `mcp update`.
Keep the URL, credential variable name, and reviewed `--trusted-private-host` declaration.

Export the replacement under the same host environment name used by `mcp add`, then remove the native registration:

```bash
export GITHUB_MCP_TOKEN='replacement-value'
$$nemoclaw my-sandbox mcp remove github
```

`remove` deletes the agent-native registration and detaches the exact managed provider, but preserves the provider object.
Confirm that no sandbox uses that provider before you delete it with `openshell provider delete <provider-name>`.
Add the server again to create a fresh provider binding.
Append one `--deny-tool '<selector>'` option for each recorded selector to this command:

```bash
$$nemoclaw my-sandbox mcp add github \
--url https://api.githubcopilot.com/mcp/ \
--env GITHUB_MCP_TOKEN
unset GITHUB_MCP_TOKEN
```

`remove` deletes the agent-native registration and detaches the exact managed provider, but conservatively preserves the provider object. Remove that preserved provider explicitly after confirming no sandbox uses it; then `add` creates a new provider with the replacement credential and reconnects the native registration.
Inspect the live policy again and confirm that its denied-tool selectors match your record.
Tool discovery does not verify denied-tool enforcement.

For a trusted-private entry, pass the same reviewed `--trusted-private-host` value to `add`; NemoClaw resolves and records the replacement pins again. For a public entry, `add` resolves the hostname and creates a policy for the current validated public addresses.
For a trusted-private entry, pass the same reviewed `--trusted-private-host` value to `add`.
For a public entry, `add` validates current DNS answers, then reuses previously recorded public pins if another managed server shares the hostname and port.
Remove-and-add therefore does not independently refresh shared public pins.
Refer to [Change Endpoint Pins](#change-endpoint-pins) for pin changes.

The raw value passes only through the OpenShell provider command's process environment and is not added to argv, NemoClaw state, or sandbox config. Revoke the old credential upstream after the new add succeeds.

Expand All @@ -174,7 +191,12 @@ $$nemoclaw my-sandbox mcp update doordash \

The command changes only the live OpenShell policy. It does not change the agent-native endpoint, credential reference, provider, attachment, or agent adapter. Live policy is the enforcement source of truth; NemoClaw does not retain a second denied-tool intent record.

NemoClaw validates the current source entry and endpoint pins, removes the existing route, and then applies the replacement. This keeps an interrupted stricter update fail-closed. If replacement activation fails, the MCP route remains blocked and the error prints the exact `mcp update` command to retry. Rebuild captures and restores the complete live policy, including denied-tool rules, without regenerating it from registry state.
NemoClaw validates the current source entry and endpoint pins before replacing the route.
For public endpoints, it validates current DNS answers and checks that the retained recorded pins are public IP addresses.
Conflicting sibling pins stop the update before route removal.
This keeps an interrupted stricter update fail-closed.
If replacement activation fails, the MCP route remains blocked and the error prints the exact `mcp update` command to retry.
Rebuild captures and restores the complete live policy, including denied-tool rules, without regenerating it from registry state.

Clear every denied-tool rule explicitly:

Expand Down Expand Up @@ -204,21 +226,30 @@ Correct a reported source conflict before retrying.
If the write cannot be confirmed, inspect `mcp status` and the live OpenShell policy before retrying.
Successful tool discovery verifies that the endpoint is reachable through its existing credential binding.

For a trusted-private server, review every destination change before NemoClaw records new pins. Neither status, restart, rebuild, nor restore changes the recorded address set.
### Refresh Shared-Host Registrations

If the endpoint moves to another address, remove and re-add the server:
Registrations on one hostname and port must use identical address pins, even when their paths and credentials differ.
A per-server refresh stops before mutation if its new DNS answers differ from a sibling's recorded pins or the siblings already disagree.
Adding or re-adding one public registration reuses the sibling pins instead of refreshing them.

```bash
export LOCAL_MCP_TOKEN='replace-with-secret-manager-value'
$$nemoclaw my-sandbox mcp remove local-tools
$$nemoclaw my-sandbox mcp add local-tools \
--url https://mcp-host.corp.example/mcp \
--env LOCAL_MCP_TOKEN \
--trusted-private-host mcp-host.corp.example
unset LOCAL_MCP_TOKEN
```
To change the shared pin set, plan an interruption for every affected registration.
Before the first removal, record every server's endpoint options and current denied-tool selectors from live policy.
Re-export each credential from your secret manager.
Remove every registration on that hostname and port, and complete the [retained-provider cleanup](#rotate-a-credential) for each one.
Add the servers again with their endpoint options and recorded selectors, passing one `--deny-tool` option per selector.
The first public add records current validated DNS addresses; later adds reuse that set.
Confirm that each restored live denied-tool list matches your record.
Run `mcp status <server> --tools` for each server and confirm readiness and successful discovery.
If DNS still differs from the recorded pins, coordinate the endpoint's DNS before repeating the procedure.

### Change Trusted-Private Pins

For a trusted-private server, review every destination change before NemoClaw records new pins. Neither status, restart, rebuild, nor restore changes the recorded address set.

Removing the server deletes the agent-native entry, removes its generated key from the current OpenShell policy, and detaches the provider. The provider itself is preserved for explicit cleanup. The re-add performs a new DNS preflight and records the reviewed exact address set.
If the endpoint moves, follow [Rotate a Credential](#rotate-a-credential) to preserve current denied-tool selectors and replace the registration.
Pass the reviewed `--trusted-private-host` declaration and every recorded `--deny-tool` selector on re-add.
The re-add performs a new DNS preflight and records the reviewed address set.
For registrations sharing a hostname and port, follow [Refresh Shared-Host Registrations](#refresh-shared-host-registrations) so their reviewed pins agree.

## Remove a Server

Expand Down
Loading
Loading