Is there an existing issue for the same feature?
Is your feature request related to a problem?
Memoria currently implements MCP manually and always advertises protocol version 2024-11-05. Its stdio and HTTP paths duplicate RPC dispatch logic, and the HTTP endpoint does not implement the stateless request envelope and routing headers introduced by MCP 2026-07-28.
Changing only the protocolVersion string would produce a non-conformant server because the 2026-07-28 revision contains breaking lifecycle, transport, request, and response changes.
Describe the feature you would like
Add MCP 2026-07-28 support while retaining compatibility with existing handshake-era clients during a migration period.
Recommended behavior:
- Legacy clients using 2024-11-05 continue to use initialize and notifications/initialized.
- Modern clients use the stateless 2026-07-28 request model.
- Protocol selection is explicit and shared across stdio and Streamable HTTP transports.
- Business tool implementations remain independent of the wire protocol version.
Implementation / design notes
Protocol lifecycle
- Implement the required server/discover method.
- Do not require initialize or notifications/initialized for 2026-07-28 requests.
- Parse and validate per-request metadata, including protocol version and client capabilities.
- Continue the legacy handshake only for supported pre-2026 protocol versions.
Streamable HTTP
- Validate MCP-Protocol-Version, Mcp-Method, and Mcp-Name headers.
- Reject missing or mismatched headers according to the 2026-07-28 specification.
- Preserve the existing authentication and group write-guard behavior.
- Plan removal of the deprecated legacy HTTP+SSE transport separately or as a documented migration step.
Responses and discovery
- Add resultType to all successful modern-protocol results.
- Add ttlMs and cacheScope to tools/list responses.
- Return supported versions, capabilities, server information, and caching fields from server/discover.
- Keep legacy response shapes unchanged for legacy clients.
Architecture
- Consolidate the duplicated dispatch logic in memoria/crates/memoria-mcp/src/server.rs before or during the migration.
- Separate protocol decoding/encoding from tool execution.
- Evaluate using an official MCP SDK versus maintaining the handwritten protocol layer.
Testing
Add conformance-focused tests for:
- modern server/discover
- direct modern tools/list and tools/call without initialize
- required request metadata
- HTTP header/body mismatch errors
- resultType and cache fields
- legacy 2024-11-05 compatibility
- stdio and HTTP protocol selection
- authentication and notification behavior
Additional information
MCP 2026-07-28 release overview:
https://blog.modelcontextprotocol.io/posts/2026-07-28/
MCP 2026-07-28 schema:
https://modelcontextprotocol.io/specification/2026-07-28/schema
Related legacy compatibility issue:
#235
Acceptance criteria
- Memoria passes the agreed 2026-07-28 protocol conformance tests for tools over supported transports.
- Existing supported legacy clients continue to function during the documented migration window.
- Protocol-version-specific behavior is tested and is not duplicated across transport dispatchers.
- Documentation states supported protocol versions and transport deprecations.
Is there an existing issue for the same feature?
Is your feature request related to a problem?
Memoria currently implements MCP manually and always advertises protocol version 2024-11-05. Its stdio and HTTP paths duplicate RPC dispatch logic, and the HTTP endpoint does not implement the stateless request envelope and routing headers introduced by MCP 2026-07-28.
Changing only the protocolVersion string would produce a non-conformant server because the 2026-07-28 revision contains breaking lifecycle, transport, request, and response changes.
Describe the feature you would like
Add MCP 2026-07-28 support while retaining compatibility with existing handshake-era clients during a migration period.
Recommended behavior:
Implementation / design notes
Protocol lifecycle
Streamable HTTP
Responses and discovery
Architecture
Testing
Add conformance-focused tests for:
Additional information
MCP 2026-07-28 release overview:
https://blog.modelcontextprotocol.io/posts/2026-07-28/
MCP 2026-07-28 schema:
https://modelcontextprotocol.io/specification/2026-07-28/schema
Related legacy compatibility issue:
#235
Acceptance criteria