This could be done fairly easily, perhaps more easily, as a standalone program, i think. Something that exposes a MongoDB-compatible API, and translates requests into libpq to go to a PostgreSQL backend.
You could run it either on the PG host, or on the same host as the apps wanting to talk to PG.