Skip to content

Inconsistency between [Transports: Backwards Compatibility] and SDKs #1519

Closed

Description

@nathan-williams

Describe the bug
Spec explains under Transports: Backwards Compatibility that clients wanting to support older servers (i.e. using HTTP+SSE transport) should attempt to connect to a remote MCP server assuming the Streaming HTTP transport (via POST request), and if that fails with a response code of 4xx, then try the HTTP+SSE transport path (via GET request).

The client implementations in the various SDKs seem to expect status code 405 specifically in response to a GET request when SSE is not supported (see example from TypeScript SDK). The client SDKs may also be following an SSE-first approach instead of trying the Streamable HTTP transport type first.

To Reproduce
Discovered this in a client using the Kotlin SDK working against an MCP server that was returning a 400 status code for GET requests to the /mcp endpoint.

Steps to reproduce the behavior:

  1. Create an MCP server that 400s for GET requests to the MCP endpoint, but does support Streamable HTTP
  2. Use one of the SDK's client implementations to connect to the MCP server

Expected behavior
Client connects to MCP server via Streamable HTTP and POST request(s).

OR perhaps the phrasing of the specification can be revised.

OR this subtlety in the relationship between Streamable HTTP and HTTP+SSE came in a revision that is not yet reflected in the SDKs.

Activity

  1. jonathanhefner commented on Oct 2, 2025

    @jonathanhefner
    Member

    OR perhaps the phrasing of the specification can be revised.

    OR this subtlety in the relationship between Streamable HTTP and HTTP+SSE came in a revision that is not yet reflected in the SDKs.

    Git indicates that currently defined behavior has been in place since the introduction of Streamable HTTP.

    My understanding of the spec: HTTP+SSE-only servers should reject the initialize POST if the client has not first opened an SSE connection (and received an endpoint event) per the HTTP+SSE diagram. Based on that rejection, the client determines whether it should fall back to HTTP+SSE or continue with Streamable HTTP.

    Spec phrasing aside, I don't think the behavior is underspecified, but I might be misunderstanding.

    Perhaps some servers are overly permissive, making the determination mechanism unreliable, leading to the current SDK behavior? Would you mind opening an issue in the affected SDK repositories to ascertain the cause?

  2. nathan-williams commented on Oct 8, 2025

    @nathan-williams
    Author

    Thanks for the reply @jonathanhefner. I could have been less verbose in my original post.

    I think you're right that the issue is likely better taken up in the SDK repos. Agreed that the spec is clear about the expected behavior.

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions