Skip to content

feat(client-compat): add explicit legacy HTTP+SSE compatibility #19

Description

@kauandotnet

Context

The built-in transport definitions intentionally cover Streamable HTTP and stdio. Some legacy endpoints still require HTTP+SSE, but compatibility must not mask authentication, network, or modern protocol failures.

Scope

  • Add an explicit legacy SSE transport definition or isolated compatibility subpath.
  • Offer opt-in Streamable HTTP to SSE fallback only for clear transport-mismatch responses.
  • Construct a fresh official client and transport for every fallback attempt.
  • Never fall back after generic network errors, authorization failure, OAuth failure, or an established modern exchange.
  • Integrate typed failure classification, abort, reconnect policy, and deterministic shutdown.
  • Emit a compatibility warning and document the deprecation posture.
  • Keep legacy implementation code out of the default client entrypoint when practical.

Acceptance criteria

  • Legacy SSE is never selected without explicit configuration or explicit fallback opt-in.
  • Fallback preserves the primary failure when the fallback also fails.
  • No credentials or authorization state cross an origin or issuer boundary.
  • A retired or aborted primary attempt cannot publish the fallback client.
  • Tests cover mismatch, authentication, outage, dual failure, abort, and cleanup.
  • Modern Streamable HTTP behavior remains unchanged.

Dependencies

Non-goals

  • Making legacy SSE the default transport.
  • Retrying every failed HTTP connection with GET.
  • Session resumption or event replay.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:client-roleMCP client-host capabilities and behaviorarea:compatibilityDeprecated or legacy interoperabilityarea:runtimeFramework-neutral client runtime and lifecycleenhancementNew feature or requestpriority:p2Optional, compatibility, or release follow-up

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions