The BSON spec includes support for UUID values, also known as GUID values.
The format of UUID values are defined in rfc4122.txt. For example,
Customers would like to work with UUID/GUID values in Compass as a fully supported data type, including search support in the RFC layout, ability to create new document fields of type UUID and the ability to edit UUID values in existing documents.
The mongo shell documentation provides this example: