feat: HTTP Header Standardization for method and name (#907)

## Description

Implements SEP-2243
(https://modelcontextprotocol.io/seps/2243-http-standardization) (HTTP
Header Standardization) for Mcp-Method and Mcp-Name standard headers
(x-mcp-param custom headers will be covvered in separate PR).

Fixes #905
This commit is contained in:
Guglielmo Colombo 2026-04-29 17:33:39 +02:00 • committed by GitHub
commit e01639a318
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -70,7 +70,7 @@ func (s *fakeStreamableServer) ServeHTTP(w http.ResponseWriter, req *http.Reques
key := streamableRequestKey{
httpMethod: req.Method,
sessionID: req.Header.Get(sessionIDHeader),
lastEventID: req.Header.Get("Last-Event-ID"), // TODO: extract this to a constant, like sessionIDHeader
lastEventID: req.Header.Get(lastEventIDHeader),
}
var jsonrpcReq *jsonrpc.Request
if req.Method == http.MethodPost {