Skip to content

Stateless HTTP transport and routing #2970

Description

@g2vinay

Make HTTP mode compliant with the stateless protocol and explicit routing contract.

Work items:

  1. Verify that the HTTP transport emits and accepts MCP-Protocol-Version, Mcp-Method, and Mcp-Name correctly.
  2. Add negative tests for header/body disagreement.
  3. Review the Azure HTTP startup path in core/Microsoft.Mcp.Core/src/Areas/Server/Commands/ServiceStartCommand.cs and servers/Azure.Mcp.Server/src/Program.cs for any transport-specific assumptions that only existed because of session affinity.
  4. Decide whether core/Microsoft.ModelContextProtocol.HttpServer.Distributed/src/SessionAffinityEndpointFilter.cs should be:
    • retired from the MCP path,
    • kept only for legacy compatibility experiments, or
    • refactored into a generic state-routing package with no MCP-specific contract names.
  5. Remove any deployment guidance that tells operators to treat session affinity as a protocol requirement.

Acceptance criteria:

  • HTTP requests are routable without any session store or sticky routing requirement.
  • Gateway/operator docs describe header-based routing instead of session-based routing.
  • Tests cover both success and rejection of malformed headers.

Metadata

Metadata

Assignees

No one assigned
    No fields configured for Feature.

    Projects

    Status
    Untriaged

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions