diff --git a/internal/api/handlers/v0/ui.go b/internal/api/handlers/v0/ui.go
new file mode 100644
index 00000000..32aadd4e
--- /dev/null
+++ b/internal/api/handlers/v0/ui.go
@@ -0,0 +1,13 @@
+package v0
+
+import (
+ _ "embed"
+)
+
+//go:embed ui_index.html
+var embedUI string
+
+// GetUIHTML returns the embedded HTML for the UI
+func GetUIHTML() string {
+ return embedUI
+}
diff --git a/internal/api/handlers/v0/ui_index.html b/internal/api/handlers/v0/ui_index.html
new file mode 100644
index 00000000..ba04a4b7
--- /dev/null
+++ b/internal/api/handlers/v0/ui_index.html
@@ -0,0 +1,519 @@
+
+
+
+
+
+ Official MCP Registry
+
+
+
+
+
+
+
+
+
+
+
Recently Updated
+
+
+
+
+
+
+
+
+
+
+ Loading servers...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/internal/api/router/router.go b/internal/api/router/router.go
index 73283a03..d951e602 100644
--- a/internal/api/router/router.go
+++ b/internal/api/router/router.go
@@ -184,14 +184,19 @@ func NewHumaAPI(cfg *config.Config, registry service.RegistryService, mux *http.
// Add /metrics for Prometheus metrics using promhttp
mux.Handle("/metrics", metrics.PrometheusHandler())
- // Add redirect from / to docs and 404 handler for all other routes
+ // Add UI and 404 handler for all other routes
mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path == "/" {
- http.Redirect(w, r, "https://github.com/modelcontextprotocol/registry/tree/main/docs", http.StatusTemporaryRedirect)
+ // Serve UI at root
+ w.Header().Set("Content-Type", "text/html; charset=utf-8")
+ _, err := w.Write([]byte(v0.GetUIHTML()))
+ if err != nil {
+ http.Error(w, "Failed to write response", http.StatusInternalServerError)
+ }
return
}
- // Handle 404 for all other routes
+ // Handle 404 for all non-matched routes
handle404(w, r)
})