Repository navigation
feat(connect): support stateless MCP 2026 - #4040
reachjalil wants to merge 11 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Test evidence — openwork-connect-and-the-agent-endpoint-implement-stateless-mcp-2026 — 0/0 screenshots passed · 5 assertions✅ 0/0 screenshots passed · 5 assertions · 5 expectations passed · 0 failed · 0 pending
ℹ️ ASSERTION — 1. OpenWork Connect negotiates the current stateless protocolThe outbound client uses automatic SDK negotiation, reaches a 2026-07-28 server through server/discover without initialize or Mcp-Session-Id, and does not misclassify authorization or server failures as legacy-protocol signals.
ℹ️ ASSERTION — 2. The public agent MCP is stateless on the modern wireThe HTTP witness observes a fresh server for every server/discover, tools/list, and tools/call request; 2026 protocol, method, name, client, and capability metadata; and no request or response session identifier.
ℹ️ ASSERTION — 3. Compatibility and notification behavior remain explicitA 2025 SDK client completes initialize and tools/list without a session identifier even when the SDK clones its Request, while modern listeners receive catalog changes through subscriptions/listen only for their authenticated organization and user audience.
ℹ️ ASSERTION — 4. Protocol and authorization boundaries fail closedThe server rejects a protocol header/body mismatch with JSON-RPC error -32020. OAuth prefers resource-specific scopes, rejects unadvertised selections, independently verifies a canonical issuer behind a resource discovery alias, discards alias-supplied endpoints, binds persisted client and token records to their issuer, and preserves issuer-mismatch diagnostics over a captured HTTP 401.
ℹ️ ASSERTION — 5. Managed Connect failures preserve safe API boundariesAn unreachable server plus DCR rejection and modern discovery or legacy initialize failures return the bounded managed-MCP 502 without provider secrets or telemetry noise, while malformed internal SDK data remains a captured generic 500.
Test run created 2026-08-24T23:53:25.835Z · Source: |
b78090d to
6a54010
Compare
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (6a54010869ab50de6f8a6aca5e2bf13a953a596f). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
6a54010 to
8cbda04
Compare
There was a problem hiding this comment.
Warden security clearance: clear. No blocking findings (security or desktop↔den sync) in this diff (8cbda049a3275950782132d59525c829ad769084). Automated clearance satisfies the required-review gate only — a human still reviews and merges. Analysis run
|
Superseded by #4055 after the source branch was renamed to the outcome-based |
Summary
/mcp/agentendpoint through the official v2 stateless HTTP handler with a fresh server per request, strict protocol validation, andsubscriptions/listenSafety hardening
Preserved Connect optimizations
/mcp/agentsurface compact: ordinary provider tools remain behind boundedsearch_capabilitiesandexecute_capabilityinstead of being projected into the client contextserver/discoveradvertises protocol capabilities only and does not include the provider tool catalogopenwork/mcpApplaunch reference, then re-list and revalidate the exact connection, tool visibility, and liveui://binding before the unchanged Desktop sandbox renderer loads itVerification
pnpm evals:pr specs/mcp-stateless-2026-transport.test.ts— passed at8cbda049a3275950782132d59525c829ad769084: 5/5 evidence assertions, 0 failed, 0 pending, 0 skippeddistoutput presentpnpm --filter @openwork/enterprise-mcp-client test— 83/83 passedpnpm --filter openwork-server exec bun test src/local-managed-mcp.e2e.test.ts— 8/8 passed, 147 assertionspnpm --filter @openwork/desktop test— 259 passed, 0 failed, 1 expected platform skipwindow.matchMediasuite-order failures remain. The same seven failures were reproduced on untouchedorigin/dev, while all 43 affected tests pass together in isolation. This PR changes noapps/appsource.sharp@0.34.5advisory already present ondevScaling note
Request handling is stateless across replicas. Subscription notifications use an in-process, authenticated-audience-scoped event bus; this matches the current one-replica Den API deployment default. A future multi-replica Den API topology will need a shared event bus for cross-replica notification fan-out.