diff --git a/internal/commands/http.go b/internal/commands/http.go index d6bc79f..4d7e5e3 100644 --- a/internal/commands/http.go +++ b/internal/commands/http.go @@ -39,6 +39,8 @@ func (c *HTTPCmd) Run(ctx context.Context, globals *Globals) error { mux := http.NewServeMux() srv := newServerWithTimeouts(mux) + mux.HandleFunc("/health", healthHandler) + if c.UseSSE { handler := mcpserver.NewSSEServer(mcpServer) mux.Handle("/sse", handler) @@ -61,3 +63,7 @@ func newServerWithTimeouts(mux *http.ServeMux) *http.Server { IdleTimeout: 60 * time.Second, } } + +func healthHandler(w http.ResponseWriter, _ *http.Request) { + w.WriteHeader(http.StatusOK) +}