Skip to content

[Server] SEP-2567: Remove session dependency for list endpoints; deprecate Mcp-Session-Id #341

@chr-hertel

Description

@chr-hertel

Implements SEP-2567 for the MCP Spec 2026-07-28 release.

Tracked by umbrella #334.

Spec summary

Removes protocol-level sessions: no session/create, no session/destroy, no Mcp-Session-Id header. tools/list / resources/list / prompts/list MUST NOT depend on per-connection or prior-call state — list endpoints become cacheable at (deployment, auth) granularity. Stateful workflows use server-minted opaque handles passed as parameters.

PHP SDK changes

  • src/Server/Session/* — entire directory becomes optional/internal-only. SessionManager, InMemorySessionStore, FileSessionStore, Psr16SessionStore, SessionInterface — keep for back-compat with old clients but cannot drive list responses.
  • src/Server/Transport/StreamableHttpTransport.php — stop minting/requiring Mcp-Session-Id; downgrade to optional legacy header.
  • src/Capability/Registry/Registry.php and all List*Handler.php — must produce identical results regardless of session. Audit handlers that read from $session->get(...).
  • RequestContext — sessions become optional, not guaranteed.
  • Documentation (docs/server-builder.md, docs/transports.md) — guide users toward stateless tool design with explicit handles.

Breaking change. Coordinate with deprecation policy (SEP-2596, umbrella #339).

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    2026-07-28All issues and PRs related to the spec release 2026-07-28P0Broken core functionality, security issues, critical missing featureServerIssues & PRs related to the Server componentbreaking changeBreaking the Backwards Compatibility PromiseenhancementRequest for a new feature that's not currently supportedimproves spec complianceImproves consistency with other SDKs such as TyepScriptneeds designValid issue but needs maintainer alignment on design or approach

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status
    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions