Skip to content

fix(mcp): explain managed add https rule applies to every agent - #6986

Merged
cv merged 3 commits into
mainfrom
fix/6971-managed-mcp-https-clarity
Jul 16, 2026
Merged

fix(mcp): explain managed add https rule applies to every agent#6986
cv merged 3 commits into
mainfrom
fix/6971-managed-mcp-https-clarity

Conversation

@Dongni-Yang

@Dongni-Yang Dongni-Yang commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

nemoclaw <sandbox> mcp add rejects plain-HTTP and local MCP URLs and requires HTTPS. Issue #6971 reported this as a Hermes-specific limitation because OpenClaw appeared to accept the same URL. In fact the managed mcp add URL validator is shared and rejects HTTP identically for every agent; OpenClaw's acceptance comes from its own in-sandbox mcporter registration, which bypasses NemoClaw's credential replacement and egress policy. This PR clarifies that parity in the rejection message and documents it — it does not change the validation boundary.

Related Issue

Fixes #6971

The issue asked for one of two resolutions: (a) make Hermes accept local HTTP like OpenClaw, or (b) document the Hermes-only HTTPS requirement and the recommended local-development setup. This PR takes (b): the HTTPS + public-DNS + host-alias rejection is a deliberate, reviewed security boundary (credential-bearing MCP over TLS; OpenShell v0.0.72 cannot pin host aliases), and the reported behavior is not actually Hermes-specific — the shared managed validator rejects HTTP for every agent, while OpenClaw's apparent acceptance comes from its unvalidated in-sandbox mcporter path. Clarifying the rejection message and documenting the boundary + local-dev path resolves the reported confusion without weakening the boundary, so this closes the issue rather than only referencing it.

Changes

  • Enrich the HTTPS rejection in normalizeMcpServerUrl (src/lib/actions/sandbox/mcp-bridge-url-validation.ts) to state that managed mcp add enforces HTTPS for every agent and that an agent-native registration path may accept a plain-HTTP URL but bypasses NemoClaw credential replacement and egress policy. The must use https:// behavior is unchanged.
  • Add a "Local or Plain-HTTP MCP URL Is Rejected" troubleshooting section (docs/reference/troubleshoot-mcp-servers.mdx) documenting the managed-vs-agent-native parity and the local-development path (expose the server over HTTPS on a public DNS endpoint).
  • Add assertions in mcp-bridge-input-targets.test.ts that lock the new parity wording (the diagnostic that should have prevented the Hermes-specific misread).

Type of Change

  • Code change with doc updates

Quality Gates

  • Tests added or updated for changed behavior
  • Docs updated for user-facing behavior changes
  • Sensitive paths changed (security, policy, credentials, preflight, onboarding, inference, runner, sandbox, or messaging)
  • Sensitive-path review completed or maintainer-approved waiver recorded — justification: touches the MCP URL validation file (sandbox), but only the rejection message string; the HTTPS / public-DNS / host-alias validation boundary is byte-for-byte unchanged and covered by existing tests.

Verification

  • PR description includes a Signed-off-by: line and every commit appears as Verified in GitHub
  • Normal pre-commit, commit-msg, and pre-push hooks passed, or npm run check:diff passed when hooks were skipped or unavailable — hooks passed on commit and push (scoped to the 3 changed files; hadolint is not installed locally and is not exercised — no Dockerfile in this diff).
  • Targeted behavior tests pass for the current change set — npx vitest run src/lib/actions/sandbox/mcp-bridge-input-targets.test.ts (5 passed); full mcp-bridge unit suite (145 passed); npm run typecheck:cli clean.
  • No secrets, API keys, or credentials committed
  • npm run docs builds without warnings (doc changes only) — check-docs-published-routes: OK, 0 errors; test/check-docs-links.test.ts + test/check-docs-published-routes.test.ts (27 passed).
  • Doc pages follow the style guide (doc changes only)

Signed-off-by: Dongni Yang dongniy@nvidia.com

Summary by CodeRabbit

  • Documentation
    • Added troubleshooting guidance for MCP servers rejected when using local or plain-HTTP URLs.
    • Clarified managed-registration requirements (HTTPS and publicly resolvable endpoints) and highlighted managed vs agent-native differences.
  • Bug Fixes
    • Improved error messaging for non-HTTPS MCP server URLs and clarified managed enforcement behavior.
  • Tests
    • Added coverage to ensure plain-HTTP URLs are rejected with the expected managed-vs-agent-native messaging variants.

Managed `mcp add` rejects plain-http and local URLs for every agent, but the
rejection read as a Hermes-specific limitation because an agent-native path
(OpenClaw `mcporter`) accepts the same URL while bypassing NemoClaw credential
replacement and generated egress policy.

Enrich the https rejection to name the managed-vs-agent-native parity, and add
a troubleshooting section documenting the requirement and the local-development
path (expose the server over https on a public DNS endpoint). The validation
boundary itself is unchanged.

Refs #6971

Signed-off-by: Dongni Yang <dongniy@nvidia.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 23d03875-3121-44cf-bfd9-44d1cc30fe5d

📥 Commits

Reviewing files that changed from the base of the PR and between 1dbb6b8 and 26ce40c.

📒 Files selected for processing (2)
  • docs/reference/troubleshoot-mcp-servers.mdx
  • src/lib/actions/sandbox/mcp-bridge-input-targets.test.ts
🚧 Files skipped from review as they are similar to previous changes (2)
  • src/lib/actions/sandbox/mcp-bridge-input-targets.test.ts
  • docs/reference/troubleshoot-mcp-servers.mdx

📝 Walkthrough

Walkthrough

Plain-HTTP and local MCP URL handling now includes expanded validation messaging, parity tests for registration paths, and troubleshooting guidance describing HTTPS and public endpoint requirements.

Changes

MCP URL enforcement

Layer / File(s) Summary
URL validation and troubleshooting guidance
src/lib/actions/sandbox/mcp-bridge-url-validation.ts, src/lib/actions/sandbox/mcp-bridge-input-targets.test.ts, docs/reference/troubleshoot-mcp-servers.mdx
Non-HTTPS URL errors explain managed and agent-native registration behavior; tests assert both rejection messages; troubleshooting documentation describes HTTPS, public endpoint, and local development requirements.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Suggested labels: area: cli, area: integrations

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title is concise and accurately summarizes the main change about documenting the managed add HTTPS rule.
Linked Issues check ✅ Passed The PR addresses #6971 by documenting the HTTPS requirement and local-development guidance while clarifying managed-versus-agent-native behavior.
Out of Scope Changes check ✅ Passed The changes stay within scope, limited to the diagnostic message, troubleshooting docs, and matching tests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/6971-managed-mcp-https-clarity

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

@github-code-quality

github-code-quality Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Code Coverage Overview

Languages: TypeScript

TypeScript / code-coverage/plugin

The overall coverage remains at 96%, unchanged from the main branch.

TypeScript / code-coverage/cli

The overall coverage in the fix/6971-managed-mcp... branch remains at 80%, unchanged from the main branch.

Show a code coverage summary of the most impacted files.
File main c1bda80 fix/6971-managed-mcp... 0e3f4c2 +/-
src/lib/state/gateway.ts 93% 91% -2%
src/lib/securit...ntial-filter.ts 98% 99% +1%

Updated July 16, 2026 07:36 UTC
Code Coverage is in Public Preview. Learn more and provide us with your feedback.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/reference/troubleshoot-mcp-servers.mdx`:
- Around line 93-100: Update the generic MCP registration guidance in the shared
troubleshooting page to use the full sandbox-scoped command format “$$nemoclaw
<sandbox> mcp add ...” instead of referring only to “mcp add”. Keep
agent-specific registration commands inside AgentOnly blocks, and ensure the
surrounding endpoint guidance remains unchanged.
- Around line 94-100: The troubleshooting guidance around managed `mcp add`
currently narrows accepted endpoints to public DNS endpoints. Update that
wording to describe a publicly reachable HTTPS endpoint, allowing either a
public hostname or public IP address, while preserving the existing TLS and
egress-policy requirements.

In `@src/lib/actions/sandbox/mcp-bridge-input-targets.test.ts`:
- Around line 119-126: Update the test containing the normalizeMcpServerUrl HTTP
rejection assertions to use a focused behavior-oriented title and suffix that
title with (`#6971`), or add the suffix to its enclosing describe. Keep the
existing rejection assertions and managed-versus-agent-native behavior
unchanged.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: a77da63a-1665-4329-bb16-1f2ce49ef82b

📥 Commits

Reviewing files that changed from the base of the PR and between d03e9d7 and 1dbb6b8.

📒 Files selected for processing (3)
  • docs/reference/troubleshoot-mcp-servers.mdx
  • src/lib/actions/sandbox/mcp-bridge-input-targets.test.ts
  • src/lib/actions/sandbox/mcp-bridge-url-validation.ts

Comment thread docs/reference/troubleshoot-mcp-servers.mdx Outdated
Comment thread docs/reference/troubleshoot-mcp-servers.mdx Outdated
Comment thread src/lib/actions/sandbox/mcp-bridge-input-targets.test.ts Outdated
@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

PR Review Advisor — Informational

Advisor assessment: Informational / high confidence
Next action: No advisor follow-up needed.
Findings: 0 blockers · 0 warnings · 0 suggestions
Status: No actionable findings remain in the canonical review ledger.

Model lanes

  • GPT-5.6 Terra (primary): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Nemotron 3 Ultra (second opinion): Completed · high confidence · 0 blockers · 0 warnings · 0 suggestions
  • Model comparison: normalized findings match; normalized E2E selections differ; severity counts match.

Nemotron output stays in workflow artifacts and does not change the assessment above.

E2E guidance

Advisory only. E2E / PR Gate selects and runs jobs independently.

Recommended E2E: onboard-repair, onboard-resume

2 optional E2E recommendations
  • mcp-bridge
  • ubuntu-repo-cloud-openclaw

Workflow run details

This automated review informs maintainers. Warnings and suggestions do not require a response. A maintainer decides whether to merge.

Address review on the mcp add https clarification:

- Use the $$nemoclaw <sandbox> mcp add host CLI token in the shared
  troubleshooting page so the executable and sandbox context are shown.
- Broaden "public DNS endpoint" to "a publicly reachable endpoint — a
  public hostname or IP address with public address records" because
  managed mcp add also accepts public IP literals.
- Split the parity assertions into a focused, behavior-oriented test
  titled with the (#6971) suffix instead of an inline comment.

Signed-off-by: Dongni Yang <dongniy@nvidia.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@cv cv left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed exact head 0e3f4c2 against current base c1bda80. The branch refresh is a mechanical merge, the documentation clarification matches accepted issue #6971, all current checks including selected E2E are green, CodeRabbit has no unresolved major/critical findings, and DCO/Verified gates pass.

@cv
cv merged commit 994c102 into main Jul 16, 2026
53 checks passed
@cv
cv deleted the fix/6971-managed-mcp-https-clarity branch July 16, 2026 08:11
cv pushed a commit that referenced this pull request Jul 17, 2026
<!-- markdownlint-disable MD041 -->
## Summary

Add the canonical dated changelog entry required before the v0.0.85
release plan can be generated.
The entry summarizes the user-visible OpenShell, DGX Station, inference,
MCP, onboarding, and recovery changes merged since v0.0.84 and links to
their owning guides.

## Changes

- Add `docs/changelog/2026-07-16.mdx` with the exact `## v0.0.85`
heading, parser-safe SPDX comment, release summary, and detailed
bullets.
- Link every documented theme to its most specific published OpenClaw
guide routes.
- Reconcile the release entry with these merged source PRs:
- #6726 -> `docs/changelog/2026-07-16.mdx`: Document the supported
OpenShell v0.0.85 upgrade, immutable consumed artifacts, multiline exec,
credential rewrite diagnostics, and child-process TLS boundary.
- #6986 -> `docs/changelog/2026-07-16.mdx`: Document managed MCP
behavior shared across supported agents.
- #6991 and #7045 -> `docs/changelog/2026-07-16.mdx`: Document qualified
DGX Station host preparation and the interactive-terminal boundary for
`--station-deepseek`.
- #6992, #7001, #7006, and #7044 -> `docs/changelog/2026-07-16.mdx`:
Document managed-model reasoning behavior, safe inference route
mutation, and verified vLLM served aliases.
- #6865, #7010, and #7028 -> `docs/changelog/2026-07-16.mdx`: Document
onboarding DNS recovery, explicit notice acceptance, and upgrades with
user-local OpenShell.
- #7005, #7021, #7029, and #7049 -> `docs/changelog/2026-07-16.mdx`:
Document rebuild backup safety, no-dashboard state, managed gateway
discovery, and Hermes shields topology checks.

## Type of Change

- [ ] Code change (feature, bug fix, or refactor)
- [ ] Code change with doc updates
- [x] Doc only (prose changes, no code sample modifications)
- [ ] Doc only (includes code sample changes)

## Quality Gates

- [ ] Tests added or updated for changed behavior
- [x] Existing tests cover changed behavior — justification:
`test/changelog-docs.test.ts` validates the canonical heading,
parser-safe SPDX comment, and detailed entry structure; the docs build
validates published routes.
- [ ] Tests not applicable — justification:
- [x] Docs updated for user-facing behavior changes
- [ ] Docs not applicable — justification:
- [ ] Sensitive paths changed (security, policy, credentials, preflight,
onboarding, inference, runner, sandbox, or messaging)
- [ ] Sensitive-path review completed or maintainer-approved waiver
recorded — reviewer/approval link/justification:
- [ ] Non-success, skipped, or missing CI check accepted by maintainer —
check name, approval link, and follow-up issue:

## Verification

- [x] PR description includes a `Signed-off-by:` line and every commit
appears as `Verified` in GitHub
- [x] Normal `pre-commit`, `commit-msg`, and `pre-push` hooks passed, or
`npm run check:diff` passed when hooks were skipped or unavailable
- [x] Targeted behavior tests pass for the current change set, or tests
are marked not applicable above — `npx vitest run
test/changelog-docs.test.ts` passed 6/6.
- [ ] Applicable broad gate passed — `npm test` for broad
runtime/test-harness changes; `npm run check` for repo-wide
validation/coverage changes — not applicable to this doc-only entry.
- [x] Quality Gates section completed with required justifications or
waivers
- [x] No secrets, API keys, or credentials committed
- [ ] `npm run docs` builds without warnings (doc changes only) — passed
with 0 errors and 2 pre-existing Fern warnings.
- [x] Doc pages follow the [style
guide](https://github.com/NVIDIA/NemoClaw/blob/main/docs/CONTRIBUTING.md)
(doc changes only)
- [x] New doc pages include SPDX header and frontmatter (new pages only)
— native changelog entries use the required parser-safe MDX SPDX comment
instead of frontmatter.

---
Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Documentation**
  * Added release notes for NemoClaw v0.0.85.
* Documented improvements to compatibility, credential handling, setup
validation, recovery workflows, endpoint configuration, gateway
discovery, and runtime validation.
  * Added links to relevant user-guide sections.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Charan Jagwani <cjagwani@nvidia.com>
@wscurran wscurran added area: cli Command line interface, flags, terminal UX, or output bug-fix PR fixes a bug or regression integration: hermes Hermes integration behavior labels Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: cli Command line interface, flags, terminal UX, or output bug-fix PR fixes a bug or regression integration: hermes Hermes integration behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hermes MCP registration rejects local HTTP MCP URLs while OpenClaw accepts them

3 participants