Handler returns the HTTP handler chain (MCP server + auth middleware) without starting an HTTP server. Use this when you need to wrap the handler with additional middleware (e.g., rate limiting).
()
| 46 | // without starting an HTTP server. Use this when you need to wrap |
| 47 | // the handler with additional middleware (e.g., rate limiting). |
| 48 | func (s *Server) Handler() http.Handler { |
| 49 | streamSrv := mcpserver.NewStreamableHTTPServer(s.mcpSrv) |
| 50 | return BearerAuthMiddleware(s.cfg, streamSrv) |
| 51 | } |
| 52 | |
| 53 | // Cfg returns the server configuration. |
| 54 | func (s *Server) Cfg() *Config { |
no test coverage detected