You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After #5760 lands, add black-box end-to-end coverage for MCP 2026-07-28 using the official Python MCP SDK v2 against the ported live stack's public Nginx endpoint.
This is a concrete implementation task under #5557. It complements the official conformance runner with real Python SDK interoperability; it does not replace conformance.
Pin an exact v2 release in the test environment. The current release is v2.0.0b2; use stable v2 if it has shipped when implementation starts.
Use the real mcp.Client for positive flows, not a mocked client or a hand-written JSON-RPC substitute.
Add a Python SDK v2 MCPServer fixture to the existing live-stack profile where a modern/dual-era upstream is required. Register it through the same control-plane APIs and wait for publisher visibility before dataplane tests.
Raw HTTP may be used only for malformed-message and header-mismatch deny paths that the SDK intentionally cannot emit.
Run the same assertions through both public routes:
Lane
Public route
Required backend
Control plane
/mcp
controlplane
Dataplane
/servers/{virtual_host_id}/mcp
dataplane (never silent fallback)
Exercise these Python SDK v2 connection modes:
mode="auto": server/discover selects 2026-07-28 on the modern fixture.
mode="2026-07-28": the client uses a pinned modern connection without a negotiation round trip.
mode="2026-07-28", prior_discover=...: reconnect reuses the saved discovery result while preserving capabilities and server identity.
mode="legacy": the dual-era fixture remains usable through the initialization-based path.
mode="auto" against a legacy-only fixture: the SDK falls back from server/discover to initialize and reports the negotiated legacy version.
Protocol scenarios
Modern stateless core
server/discover returns the supported protocol versions, server info, and capabilities through both lanes.
A modern connection performs useful requests without initialize, notifications/initialized, or Mcp-Session-Id.
Independent requests and reconnects can be served without sticky sessions.
tools/list and tools/call work through the SDK and preserve structured content.
resources/list, resources/read, prompts/list, and prompts/get work when advertised by the fixture.
Pagination cursors round-trip through the gateway without mutation.
Tool input/output using full JSON Schema 2020-12, including composition/$defs and non-object structuredContent, round-trips unchanged.
Resource-not-found uses JSON-RPC -32602.
HTTP routing and validation
Modern SDK requests carry MCP-Protocol-Version: 2026-07-28 plus the required Mcp-Method and, where applicable, Mcp-Name headers.
Nginx and both gateway lanes preserve these headers end to end.
Missing or body-mismatched Mcp-Method/Mcp-Name is rejected with HTTP 400.
Dataplane assertions fail if X-CF-Integration-Backend reports controlplane-fallback.
Client info and supported trace-context metadata in _meta survive proxying without leaking credentials.
Modern response behavior
ttlMs and cacheScope metadata survive list/resource responses, and the Python client's cache behavior is exercised for one deterministic fixture.
At least one multi-round-trip InputRequiredResult flow is completed by the Python SDK v2 client when the corresponding ContextForge capability is available.
Known protocol gaps discovered by these tests are recorded as linked implementation issues; do not make permanent expected failures the success condition for this task.
Security and failure paths
Unauthenticated requests are rejected.
A token scoped to the wrong team cannot access the test virtual server.
✅ Test Summary
After #5760 lands, add black-box end-to-end coverage for MCP
2026-07-28using the official Python MCP SDK v2 against the ported live stack's public Nginx endpoint.This is a concrete implementation task under #5557. It complements the official conformance runner with real Python SDK interoperability; it does not replace conformance.
Dependency
Remove the
blockedlabel when #5760 is complete and the in-repository split-stack targets are available.SDK and fixture requirements
v2.0.0b2; use stable v2 if it has shipped when implementation starts.mcp.Clientfor positive flows, not a mocked client or a hand-written JSON-RPC substitute.MCPServerfixture to the existing live-stack profile where a modern/dual-era upstream is required. Register it through the same control-plane APIs and wait for publisher visibility before dataplane tests.Coverage matrix
Run the same assertions through both public routes:
/mcpcontrolplane/servers/{virtual_host_id}/mcpdataplane(never silent fallback)Exercise these Python SDK v2 connection modes:
mode="auto":server/discoverselects2026-07-28on the modern fixture.mode="2026-07-28": the client uses a pinned modern connection without a negotiation round trip.mode="2026-07-28", prior_discover=...: reconnect reuses the saved discovery result while preserving capabilities and server identity.mode="legacy": the dual-era fixture remains usable through the initialization-based path.mode="auto"against a legacy-only fixture: the SDK falls back fromserver/discovertoinitializeand reports the negotiated legacy version.Protocol scenarios
Modern stateless core
server/discoverreturns the supported protocol versions, server info, and capabilities through both lanes.initialize,notifications/initialized, orMcp-Session-Id.tools/listandtools/callwork through the SDK and preserve structured content.resources/list,resources/read,prompts/list, andprompts/getwork when advertised by the fixture.$defsand non-objectstructuredContent, round-trips unchanged.-32602.HTTP routing and validation
MCP-Protocol-Version: 2026-07-28plus the requiredMcp-Methodand, where applicable,Mcp-Nameheaders.Mcp-Method/Mcp-Nameis rejected with HTTP 400.X-CF-Integration-Backendreportscontrolplane-fallback._metasurvive proxying without leaking credentials.Modern response behavior
ttlMsandcacheScopemetadata survive list/resource responses, and the Python client's cache behavior is exercised for one deterministic fixture.InputRequiredResultflow is completed by the Python SDK v2 client when the corresponding ContextForge capability is available.Security and failure paths
Live-stack integration
make test-mcp-2026-07-28-e2e.live-protocolandlive-allgroups.Acceptance criteria
2025-11-25live tests and official conformance targets continue to pass.References