A minimal perfect hash function maps a set S of n keys into the set {0,1,..., n−1} bijectively. Classical results state that minimal perfect hashing is possible in constant time using a structure occupying space close to the lower bound of log e bits per element. In monotone minimal perfect hashing the bijection is required to preserve the lexicographical ordering of the keys. A monotone minimal perfect hash function can be seen as a very weak form of index that provides ranking just on the set S (and answers randomly outside of S). Our goal is to minimise the description size of the hash function: we show that, for a set S of n elements out of a universe of 2^w elements, O(n log log w) bits are sufficient to hash monotonically with evaluation time O(log w). Alternatively, we can get space O(n log w) bits with O(1) query time. As a consequence, it is possible to search a sorted table with O(1) accesses to the table (using additional O(n log log w) bits). Our results are based on the z-fast trie, a new, truly linear kind of trie that lends itself easily to probabilistic or blind versions. We also discuss briefly how a variant of the z-fast trie provides space-optimal results for weak prefix searches (i.e., prefix searches with a guarantee that the result will be non-empty).