Yeah, MTL is one approach to abstract this even more using constraints to pass the 'contexts'. There are other options, like algebraic effects that can be implemented using free monads, or ontop of monad transformers, or using delimited continuations like in Hasura's Eff library.