Skip to content

fix(installer): automate custom MCP providers and keyed headers - #92

Draft
LinoyBitan1 wants to merge 2 commits into
validatedpatterns-sandbox:mainfrom
LinoyBitan1:incluster-mcp
Draft

LinoyBitan1 wants to merge 2 commits into
validatedpatterns-sandbox:mainfrom
LinoyBitan1:incluster-mcp

Conversation

@LinoyBitan1

@LinoyBitan1 LinoyBitan1 commented Oct 11, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Allow a SAW-BOM to configure custom MCP providers automatically, so a sandbox can use a named in-cluster MCP Service through Option A without manual provider creation and attachment. Support both no-key and API-key authentication.

JIRA: APPENG-6573

Changes

  • Accept custom governance profiles using credentialFree: true or credentialEnv with credentialSecret. Validate them against the gateway's live profile catalog, skip transient missing profiles without pruning, and keep MCP/search providers separate from inference providers.
  • Configure native MCP headers for OpenClaw 2026.9.6, whose bundle HTTP client passes ${VAR} header strings literally. Store only placeholders inside the sandbox; the real key stays with OpenShell. Native entries override same-name bundle defaults; retain mcp.json for the bundle's mcpServers capability.
  • Track managed native entries in the existing ledger, remove obsolete entries and credentials, and preserve unrelated manual MCP configuration. Validate credential key names before cleanup.
  • Give catalog read failures an actionable governance diagnostic. Defer failed native config reads to verification and accumulate native drift alongside bundle/plugin failures.
  • Document the governance profile, BOM, bundle and Secret configuration, including host, port, binary and negotiated MCP-version checks for 403 policy_denied.
  • Add installer regression tests. The change does not deploy an MCP Service or enable a concrete profile by default.

Validation

  • All 491 installer tests validated: the restricted full run passed 477 and hit 14 loopback-socket permission failures; all 92 tests in the affected modules passed when rerun with socket access. Nine new review regression cases passed before the full run. git diff --check passed.
  • Fresh Argo deployment into a new VM and sandbox succeeded without manual provider creation, attachment or native-header configuration.
  • Real agent discovery and tool calls succeeded for in-cluster no-key, in-cluster keyed, optional-key and external DeepWiki MCP servers. All four runs had zero tool failures.
  • The keyed server confirmed authorization. The sandbox credential comparison confirmed it received a placeholder rather than the real Kubernetes Secret value.
  • An Argo update from optional-key to credential-free mode automatically cleared the stored credential and obsolete native override.
  • Review fixes have local regression coverage; the live Argo scenarios above were run before this review update.

Separate gateway lifecycle follow-up

The first agent call after the live update timed out because OpenClaw's gateway restart encountered StateDatabaseCoordinatorContentionError: another OpenClaw process owns gateway-lifecycle. The installer reported Done while the gateway was unavailable. Fresh-install validation passed; post-update agent validation failed.

The restart function is unchanged from this PR's base commit fc385020014e51f1341b49a6bfe3819c3e09d246 (Python AST comparison). This pre-existing gateway lifecycle and success-reporting defect is tracked separately in #94 and does not block the custom MCP changes in this PR.

@LinoyBitan1
LinoyBitan1 marked this pull request as ready for review October 12, 2026 12:58
@LinoyBitan1
LinoyBitan1 marked this pull request as draft October 12, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant