Conversation
Route explicitly configured 2026-07-28 requests through a POST-only stateless adapter, while keeping discovery response shaping in the server layer and preserving legacy transport behavior. Add strict Origin, content negotiation, request metadata, and standard-header validation without creating protocol sessions. This is a dependent server slice for zoedsoupe#263, stacked on zoedsoupe#269. Co-authored-by: Codex (GPT-5)
faisalnazir7
force-pushed
the
feature/protocol-2026-07-28-dialect
branch
from
August 6, 2026 13:00
85fe48b to
40c3685
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
MCP
2026-07-28removes protocol sessions and the initialization handshake, so servers need a
stateless way to advertise identity, capabilities, and supported versions before
clients send operational requests through
server/discover.This is a draft stacked PR targeting your
feature/protocol-2026-07-28-dialectbranch directly. It contributes one child commit to
upstream PR #269, which adds
the stateless protocol dialect, era-aware registry, request metadata schema, and
reserved errors but intentionally exposes no modern behavior on the wire. This
PR advances, but does not close,
upstream issue #263.
Please review the focused child delta against zoedsoupe#269 here:
stateless discovery child diff.
Solution
Anubis.Server.Discoveryto construct the transport-independentserver/discoverresult from server metadata and protocol-filteredcapabilities.
HTTP Plug into a POST-only adapter while preserving the legacy GET/POST/DELETE
path.
Content-Type/Acceptmedia types, per-request MCPmetadata, and the standard
MCP-Protocol-Version,Mcp-Method, andMcp-Nameheaders. Base64 sentinel values are decoded before comparison.
unsupported versions, and unknown methods.
Mcp-Session-IdandLast-Event-IDrequest headers.This slice implements discovery only. Stateless tool/resource/prompt dispatch,
request-scoped SSE, subscriptions, MRTR, result caching,
Mcp-Param-*headers,and stateless client support remain follow-up work under
upstream issue #263.
Rationale
Discovery response shaping belongs to the server layer rather than the HTTP
adapter so future transports and clients can reuse the same contract. The HTTP
module remains responsible only for transport security, header/body consistency,
decoding, and status codes.
The modern path is explicit opt-in through
protocol_versions: ["2026-07-28"].Servers that advertise only legacy versions continue through the existing
session-oriented handlers and retain their previous unsupported-version response.
Validation
mix test test/anubis/server/discovery_test.exs test/anubis/server/transport/streamable_http/stateless_test.exs test/anubis/server/transport/streamable_http/plug_test.exs— 45 passed.mix test— 1,127 passed, 12 excluded.mix lint— formatting, strict Credo, and Dialyzer passed.git diff --check— passed.Impact & Risk
Risk: medium. The feature is opt-in and has focused plus full-suite coverage,
but it changes the shared Streamable HTTP entrypoint and externally observable
protocol negotiation/error behavior. Cicada traces the in-repository path to
Plug.call/2 → Stateless.handle/3 → Discovery.result/2; consumers of the publicPlug are primarily external or dynamically mounted and cannot be enumerated here.
The child delta contains six files with 692 additions and 20 deletions. It has no
persistence, migration, authorization-policy, or destructive data behavior.
Skills Used
developing-with-tddwriting-elixir-codeanalyzing-change-impactcommitting-changes-interactivelyopening-pull-requests