Skip to content

Streamable HTTP upstreams never deliver notifications/tools/list_changed (no GET stream), so tool changes wait for the discovery poll #1910

Closed

Description

@luutuankiet

Summary

For upstream servers using the streamable HTTP transport, mcpproxy never receives notifications/tools/list_changed. The handler added for #209 is in place, but the HTTP transport is built without a standalone GET stream, so server-initiated notifications have nowhere to arrive. In practice, tool adds, removes and description/schema changes reach downstream clients only on the next tool-discovery poll (default 5 minutes, observed 6 to 7 minutes).

Upstreams using protocol: sse are not affected: with the same probe server on SSE, changes reached mcpproxy in about 0.1 s.

Version

  • mcpproxy-go v0.73.0 (linux-amd64 release binary)
  • mark3labs/mcp-go v1.0.0 (from go.mod)

Cause

internal/transport/http.go builds the streamable HTTP transport without transport.WithContinuousListening():

https://github.com/smart-mcp-proxy/mcpproxy-go/blob/v0.73.0/internal/transport/http.go#L430

httpTransport, err := transport.NewStreamableHTTP(cfg.URL, opts...)

Without that option, mcp-go never opens the standalone GET SSE stream that the MCP spec uses for server-to-client messages outside a request (client/transport/streamable_http.go:38 in mcp-go v1.0.0). The notification handler in internal/upstream/core/connection_lifecycle.go (the MethodNotificationToolsListChanged case) therefore never fires for HTTP upstreams.

Reproduction

  1. Run a streamable HTTP MCP server (TypeScript SDK 1.32.2) with capabilities.tools.listChanged: true that can add, remove or change a tool on demand and sends notifications/tools/list_changed when it does.
  2. Add it to mcpproxy as protocol: http with trust_mode: auto. Keep default intervals.
  3. Connect a client to /mcp/all and keep its GET stream open.
  4. Add a tool on the upstream.

Observed:

step upstream sent list_changed mcpproxy re-listed downstream client got list_changed
add tool 17:40:30.434 17:46:28.999 (+358 s, discovery poll) 17:46:36.205
remove tool 17:49:58 17:56:28.898 (+391 s, discovery poll) 17:56:37.717
  • The upstream's request log shows no GET from mcpproxy at any point, only POSTs.
  • Control: a plain client connected directly to the same upstream with a GET stream received the notification 2.9 s after the change.
  • Same probe server exposed over SSE and added as protocol: sse: add, remove and description/schema change were each reflected in mcpproxy's tool list within 0.1 s.

So the downstream side (mcpproxy to clients) works; only the upstream HTTP receive path is missing.

Expected

An HTTP upstream that advertises tools.listChanged should have its changes picked up within seconds, as SSE upstreams already are.

Suggested fix

Pass transport.WithContinuousListening() when building the streamable HTTP transport (perhaps only when the upstream's initialize result advertises tools.listChanged). The spec allows a server to answer the GET with 405 Method Not Allowed, so that case should fall back quietly to polling.

Why the poll is not a good workaround

  • tool_discovery_interval cannot go below 30 s, and neither the REST server endpoints nor mcpproxy upstream add can set it per server; only a whole-config PATCH /api/v1/config can.
  • Polling a large upstream is costly: one of our upstreams (another mcpproxy aggregating many servers) returns a ~178 KB tools/list, so a 30 s poll is about 0.5 GB a day for no change.
  • For scale-to-zero upstreams (Cloud Run), any polling keeps waking the service.

Activity

  1. Dumbris commented on Nov 16, 2026

    @Dumbris
    Member

    Fixed in #1915.

    mcpproxy now keeps one standalone GET stream open to a streamable-HTTP upstream, but only when the upstream's initialize result advertises capabilities.tools.listChanged. Other upstreams get no extra held connection, which matters for scale-to-zero hosts.

    If the upstream refuses the stream (405, 400, 406, 401, 403, a cross-origin redirect, or an answer that isn't an event stream), mcpproxy logs one INFO line and falls back to the discovery poll. Transient failures back off from 1s up to 2 minutes. The stream also follows session re-initialize, reconnect and server removal.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions