#988·mcp-go

feature: make legacy continuous-listening reconnect backoff configurable

Author: Yut0MiuraCreated Sep 25, 2026Updated Sep 25, 2026

Problem Statement

When using WithContinuousListening, the Streamable HTTP listener automatically reconnects if the connection drops.

This works well for short network interruptions, but if the server stays unavailable for a while, the listener keeps retrying at a fixed pace. It would be useful to have some control over the reconnect timing, for example by configuring a backoff and maximum delay.

I realize WithContinuousListening is deprecated for newer MCP protocol versions, but it is still useful when working with servers that rely on the legacy Streamable HTTP behavior.

Ideally, the current retry behavior could remain the default so this wouldn't change anything for existing users.

Example Usage

Something along these lines:

go
transport.NewStreamableHTTP(
    url,
    transport.WithContinuousListening(),
    transport.WithContinuousListeningBackoff(
        time.Second,
        30*time.Second,
    ),
)

I'm not attached to the exact option name or API. The main goal is just to have a way to control how often the continuous listener attempts to reconnect.

Alternatives/Workarounds Considered

One option is to wrap the client with custom retry or restart logic.

That works, but it gets a little awkward because the continuous listener already handles reconnects internally. Making the retry behavior configurable there seems like a cleaner approach.