- Status: Accepted
- Date: 2026-06-18
- Deciders: Serverless Harness team
- Spec:
../specs/2026-06-18-m10-mcp-code-mode-design.md
MCP servers are separate kagenti components with their own identities; the harness must hold no MCP backend credentials and must fit the zero-trust spine. The open question was the invocation locus — brain, hands, or gateway. At the pinned Pi commit there is no MCP client, so MCP must be built regardless of locus, and "fits Pi as-is" favors no option.
We will have the model author and run scripts in the sandbox that call MCP over HTTP against real backend hostnames, with the AuthBridge Envoy egress waypoint transparently injecting per-user credentials, appending per-call audit entries, and enforcing a hard per-session cap — so the harness imports no MCP SDK and registers no forwarding tools.
- Harness-registered
registerToolforwarding tools — adds a Pi integration and dumps tool defs into context; the parent §3.3 approach, now superseded. - Standalone terminating MCP gateway — replaced by the transparent waypoint; kagenti's
mcp-gatewayleaves the sandbox→backend data path. - Live inbound user token for scoping — impossible for offline/unattended sessions; subject comes from a pre-authorized Keycloak delegation (RFC 8693 §4.1).
- Supersedes: the parent research doc's MCP gateway (M10) — MCP becomes code run in the sandbox, not a harness-forwarded gateway call.
- Positive: Near-zero Pi surface; large token savings (progressive disclosure + filter-in-code); credentials confined to the waypoint.
- Negative / accepted cost: Isolation relaxes to "reachable only through the mediating waypoint"; static MCP roster per sandbox image; HTTP/SSE-only.
- Follow-up owed: The unattended actor-token delegation plane (M7–M9) is a hard dependency AuthBridge has not yet wired.
Assisted-By: Claude (Anthropic AI) noreply@anthropic.com