Skip to content

notifications/tools/list_changed handler apparently times out over Streamable HTTP #1239

@janwilch

Description

@janwilch

Describe the bug
Registering a handler of the notifications/tools/list_changed method (both via the McpClientOptions.Handlers.NotificationHandlers and via the McpSession.RegisterNotificationHandler(...) method) on a client that is connected to a server over Streamable HTTP works only for ca. 2-3 minutes after creation. If no notification is sent by the server for a longer time, the handler is no longer invoked. The problem does not happen while a debugger is attached.

I have validated that the notifications continue to be received by the MCP Inspector, when it is connected at the same time as my client.

I assume that an HTTP connection is being dropped somewhere along the way, but I haven't found the root cause yet.

Steps To Reproduce

  1. Set up an ASP.NET MCP Server as shown in the samples.
  2. Have the server send sporadic notifications/tools/list_changed to all connected clients.
  3. Connect an MCP Client via Streamable HTTP as shown in the samples.
  4. Launch both applications without a debugger attached

Expected behavior
Notifications are received for as long as the MCP connection persists, even if they happen rarely.

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