Skip to content

Stateless HTTP server should not advertise listChanged capabilities #1486

Closed

Description

@mikekistler

Description:

When configuring an MCP server with Stateless = true on the HTTP transport, the server still advertises listChanged: true for tools, resources, and prompts in the initialize response.

Server configuration:

builder.Services.AddMcpServer()
    .WithHttpTransport(options =>
        options.Stateless = true
    )
    .WithTools<MyTools>()
    .WithResources<MyResources>()
    .WithPrompts<MyPrompts>();

Actual initialize response:

{
  "result": {
    "protocolVersion": "2025-11-25",
    "capabilities": {
      "logging": {},
      "prompts": { "listChanged": true },
      "resources": { "listChanged": true },
      "tools": { "listChanged": true }
    },
    "serverInfo": { "name": "Stateless", "version": "1.0.0.0" }
  },
  "id": 1,
  "jsonrpc": "2.0"
}

Expected initialize response:

The listChanged capability should not be advertised (or should be false) for tools, resources, and prompts when the server is configured in stateless mode. In stateless mode, each request creates a new server instance, so there is no persistent session to receive notifications/tools/list_changed, notifications/resources/list_changed, or notifications/prompts/list_changed notifications.

{
  "result": {
    "protocolVersion": "2025-11-25",
    "capabilities": {
      "logging": {},
      "prompts": {},
      "resources": {},
      "tools": {}
    },
    "serverInfo": { "name": "Stateless", "version": "1.0.0.0" }
  },
  "id": 1,
  "jsonrpc": "2.0"
}

Rationale:

The listChanged capability indicates that the server may send list-changed notifications to the client during a session. In stateless mode, there is no persistent session — each HTTP request creates a new server instance and the server cannot send unsolicited notifications to the client. Advertising listChanged: true is misleading because the server will never actually send these notifications.

Version: ModelContextProtocol.AspNetCore 1.1.0

Activity

  1. halter73 commented on Apr 2, 2026

    @halter73
    Contributor

    Good call out. It will never work in stateless. I wonder if this shouldn't be opt-in in general, since the pattern of modifying a tools/prompts/resource list at runtime in general is pretty niche.

  2. added
    bugSomething isn't working
    ready for workHas enough information to start
    P2Moderate issues, valuable feature requests
    on Apr 4, 2026
  3. jayaraman-venkatesan commented on Apr 8, 2026

    @jayaraman-venkatesan
    Contributor

    Anyone working on this? If not can I pick up for contribution?

  4. jayaraman-venkatesan commented on Apr 9, 2026

    @jayaraman-venkatesan
    Contributor

    I have created a pull request for this, I also added the triage in PR description, please help review

    @mikekistler / @halter73

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

    P2Moderate issues, valuable feature requestsbugSomething isn't workingready for workHas enough information to start

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions