MongoDB is licenses as SSPL which is non Open Source license all together
BUT this is only if you are not paying for MongoDB. If you do chances are you're using MongoDB Enterprise which is licensed under commercial license or MongoDB Atlas all together
SSPL is a nearly verbatim copy of AGPL, except one section. It is more restrictive than the AGPL, in a way that many feel is anti-competitive, which is why it's not considered Open Source by many, but also in a way which doesn't really change the argument here IMO.
BUT this is only if you are not paying for MongoDB. If you do chances are you're using MongoDB Enterprise which is licensed under commercial license or MongoDB Atlas all together