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:
parent
a817f61412
commit
af893e8d1e
1 changed files with 40 additions and 19 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue