mcp: Upgrade conformance test to latest available deployoment (#1021)

Upgrade conformance test to the 0.2.0-alpha.5 version, and differentiate
legacy from 20260728 servers.
This commit is contained in:
Guglielmo Colombo 2026-06-24 14:28:10 +02:00 • committed by GitHub
commit af893e8d1e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -27,7 +27,8 @@ import (
)
var (
httpAddr = flag.String("http", "", "if set, use streamable HTTP at this address, instead of stdin/stdout")
httpAddr = flag.String("http", "", "if set, use streamable HTTP at this address, instead of stdin/stdout")
stateless = flag.Bool("stateless", true, "use stateless streamable HTTP mode")
)
const watchedResourceURI = "test://watched-resource"
@ -60,7 +61,7 @@ func main() {
if *httpAddr != "" {
handler := mcp.NewStreamableHTTPHandler(func(*http.Request) *mcp.Server {
return server
}, nil)
}, &mcp.StreamableHTTPOptions{Stateless: *stateless})
log.Printf("Conformance server listening at %s", *httpAddr)
log.Fatal(http.ListenAndServe(*httpAddr, handler))
} else {