MCPcopy Create free account
hub / github.com/ajitpratap0/GoSQLX / Handler

Method Handler

pkg/mcp/server.go:48–51  ·  view source on GitHub ↗

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).

()

Source from the content-addressed store, hash-verified

46// without starting an HTTP server. Use this when you need to wrap
47// the handler with additional middleware (e.g., rate limiting).
48func (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.
54func (s *Server) Cfg() *Config {

Callers 1

runHTTPFunction · 0.80

Calls 1

BearerAuthMiddlewareFunction · 0.85

Tested by

no test coverage detected