diff --git a/pkg/mcp/server.go b/pkg/mcp/server.go index be2945b..487e490 100644 --- a/pkg/mcp/server.go +++ b/pkg/mcp/server.go @@ -193,8 +193,8 @@ func (s *Server) registerDefaultHandlers() { if s.GetHandler("initialize") == nil { s.RegisterHandler("initialize", s.handleInitialize) } - if s.GetNotificationHandler("initialized") == nil { - s.RegisterNotificationHandler("initialized", s.handleInitialized) + if s.GetNotificationHandler("notifications/initialized") == nil { + s.RegisterNotificationHandler("notifications/initialized", s.handleInitialized) } if s.GetHandler("tools/list") == nil { s.RegisterHandler("tools/list", s.handleToolsList) diff --git a/pkg/mcp/server_test.go b/pkg/mcp/server_test.go index add111f..a572a30 100644 --- a/pkg/mcp/server_test.go +++ b/pkg/mcp/server_test.go @@ -142,7 +142,7 @@ func TestServerStart(t *testing.T) { t.Error("Initialize handler not registered") } - if _, exists := server.notifications["initialized"]; !exists { + if _, exists := server.notifications["notifications/initialized"]; !exists { t.Error("Initialized notification handler not registered") } }