Versions in this module Expand all Collapse all v1 v1.1.2 Nov 25, 2026 v1.1.1 Nov 25, 2026 Changes in this version + const DefaultEndpoint + const DefaultHeartbeat + const DefaultIdleTimeout + const DefaultMaxBodyBytes + const DefaultMaxConcurrent + const DefaultMaxSessions + const DefaultReadHeaderTimeout + const DefaultReadTimeout + const DefaultSessionIdleTimeout + const DefaultWriteTimeout + const HeaderProtocolVersion + const HeaderSessionID + var ErrUnauthenticatedExposure = errors.New(...) + func CheckOptions(opts Options) error + type Handler interface + HandleRequest func(ctx context.Context, req *mcp.Request) (*mcp.Response, error) + OpenSession func(notify mcp.NotifyFunc) (*mcp.ClientSession, func()) + type Options struct + Addr string + AllowedHosts []string + AllowedOrigins []string + Endpoint string + Heartbeat time.Duration + IdleTimeout time.Duration + Logger *slog.Logger + MaxBodyBytes int64 + MaxConcurrent int + MaxSessions int + ReadHeaderTimeout time.Duration + ReadTimeout time.Duration + SessionIdleTimeout time.Duration + Token string + WriteTimeout time.Duration + type Server struct + func New(h Handler, opts Options) (*Server, error) + func (s *Server) Addr() string + func (s *Server) Authenticated() bool + func (s *Server) SessionCount() int + func (s *Server) Shutdown(ctx context.Context) error + func (s *Server) Start() error + func (s *Server) URL() string