Repository navigation
Closed
Research 🔎
7 / 77 of 7 issues completed
Copy link
Labels
enhancementNew feature or request
Description
User outcome
A user running mecatl as a local Buzz ACP runtime can connect to an OAuth-protected streaming-HTTP MCP server without Buzz implementing ACP URL elicitation. Mecatl owns the standard authorization-code flow: the official MCP Go SDK handles discovery, challenge, PKCE, token exchange, refresh, and transport retry; mecatl owns browser/callback UX, credential custody, lifecycle, and diagnostics. Later Buzz launches reuse the credential silently.
A noninteractive or headless process never opens a browser or waits for consent. It either uses cached or pre-provisioned credentials, uses the existing static bearer path, or fails the affected MCP connection promptly with an actionable login-required error.
Scope
- Operator-configured global streaming-HTTP MCP servers.
- Official MCP Go SDK
auth.AuthorizationCodeHandler, retained per OAuth identity/server and attached tomcp.StreamableClientTransport.OAuthHandler. - Authorization code + PKCE with a runtime-owned browser and loopback callback for explicitly interactive local deployments.
- A dedicated pre-login operation for unattended later launches.
- Persistent access/refresh/client state with CAS-safe refresh-token rotation.
- Explicit noninteractive behavior for
mecated,mecatequi, andmecak8s. - Existing streamable-HTTP reconnect behavior remains the only MCP reconnect path (
docs/adr/0056-mcp-client-reconnect.md).
Non-goals
- ACP URL elicitation, ACP
authMethods, ACP terminal authentication, or a Buzz-specific wire extension. - MCP URL elicitation for MCP client authorization.
- stdio MCP or spawning MCP server processes.
- OAuth for ACP-supplied per-session MCP entries, inline agent-definition MCP entries, or dynamically discovered MCP sources in the first release.
- Device Authorization Grant, a custom OAuth protocol stack, background refresh polling, token revocation UI, or RFC 7592 client-registration management.
- A Kubernetes, distributed, multi-replica, or multi-tenant credential backend. The first encrypted backend is explicitly local-workstation storage.
- MCP configuration reload or per-run external identity injection.
Architecture constraints
- Keep OAuth out of
engine/; implementation belongs underinternal/adapter,internal/cliconfig,internal/app, and composition roots. No provider-neutral LLM or protobuf widening. - Use the official protocol engine. Mecatl supplies
AuthorizationCodeFetcher,InitialTokenSource,NewTokenSource, and a hardened OAuth HTTP client; it does not duplicate discovery, PKCE, exchange, or transport retry. - Retain one SDK handler per OAuth identity/server across
Server.dialandinternal/adapter/mcp/reconnect.go. - Static MCP headers remain origin-scoped. OAuth discovery/token requests use a separate hardened client and never inherit MCP static headers. Static bearer and OAuth are mutually exclusive for one server in the MVP.
- Credential identity includes a stable principal/profile, canonical MCP resource, authorization-server issuer, and OAuth client identity; it is never keyed only by a configured server name.
- Tokens, client secrets, authorization codes, callback queries, state, PKCE verifiers, cookies, raw token responses, and authorization-URL queries never enter diagnostics, ACP, model context, config dumps, or errors.
- Browser/callback behavior is explicitly enabled. Headless, one-shot, and Kubernetes paths are cache/pre-provision only and return a typed login-required error when credentials are absent or unusable.
- No stdio MCP.
- Inventory the credential store, retained handlers, authorization singleflight state, callback listener, key source, and OAuth HTTP client in
docs/adr/0027-cloud-native.md. - The local encrypted backend is documented as node/user-account scoped and sits behind a backend-neutral contract.
Dependency order
- Native credential-store kernel and hardened local backend.
- Official MCP SDK authorization profile qualification; safe to run in parallel with 1.
- MCP OAuth controller, persistence, refresh, and reconnect reuse.
- Runtime-owned browser/loopback login UX.
- Operator configuration and headless policy wiring.
- Cross-boundary acceptance gate and rollout documentation.
Relationship to existing issues
- MCP client: credential-source seam for refreshing short-lived bearer tokens #342 remains the credential-source seam for externally supplied short-lived bearer tokens under the dark-factory epic. Native interactive OAuth is complementary and does not re-parent or duplicate it.
- MCP auth + config lifecycle: rotating credentials, interactive OAuth, validated config reload #399 retains its configuration-reload scope under #391. This Epic extracts the native OAuth track. Both efforts must converge on one explicit MCP auth-mode model rather than introducing parallel configuration surfaces.
Completion criteria
- A clean local profile completes authorization through a browser/loopback callback and lists tools from an offline OAuth-protected MCP fixture.
- A restarted Buzz-style ACP runtime using the same profile connects without browser interaction or ACP elicitation/auth requests.
- Expiring credentials refresh through the official SDK; rotated refresh state persists with CAS and survives another restart.
- A dropped MCP session reconnects through the existing path without losing OAuth state.
- A headless clean profile returns a classified, redacted login-required result promptly and opens no browser/listener.
- Static bearer behavior remains byte-compatible; selecting static bearer and OAuth together fails validation.
- Offline tests, race checks,
task lint && task test,go run ./cmd/mecademo, docs generation/check, andtask site:buildare green.
Sub-issues
Collapse Sub-issuesSub-issues
Loading 7 sub-issues
Metadata
Metadata
Assignees
Labels
enhancementNew feature or request
Activity
JAORMX commentedon Aug 14, 2026
Dependency update: #542 adds the backend-polymorphic headless credential-source track requested for remote/Kubernetes deployments. The credential boundary now separates read-only
Readerfrom mutable CASStore: local encrypted storage is one adapter; Kubernetes Secret-backed env/mounted-file sources may be read-only. #542 should land after #521 defines the envelope and before #523 finalizes headless composition. Durable refresh rotation across restarts still requires a writable CAS backend; env/file bootstrap must not claim that guarantee.feat(credentialstore): add versioned encrypted CAS store (#536)
test(mcp): qualify SDK OAuth profile (#537)
feat(mcp): add durable OAuth controller (#559)
feat(mcp): add host-owned OAuth login runtime (#561)
feat(credentialstore): add Kubernetes env source (#560)
feat(mcp): wire operator OAuth profiles (#562)
test(mcp): add OAuth lifecycle acceptance gate (#564)
JAORMX commentedon Aug 15, 2026
Completed. All seven subissues are merged with green CI: credential Reader/Store + hardened local backend (#536), official SDK qualification (#537), durable OAuth controller (#559), host-owned loopback login (#561), Kubernetes Secret-backed environment Reader (#560), operator profiles and
mecated mcp login(#562), and the full lifecycle acceptance gate (#564). The acceptance suite proves login, warm restart, refresh-token rotation and persisted rotated-token consumption, another restart, reconnect, headless/ACP boundaries, static/none regressions, and secret-canary coverage. The current SDK pin is intentionally retained: agents verified latest unreleased upstream leaves OAuth limitations unchanged and changes ErrRejected semantics in a way that can cause mecatl to reconnect/replay rejected calls; upgrade waits for a release plus classifier regression tests.