The relation between the gut microbiota and mental health is one of the most intriguing and controversial topics in microbiome research. While it is currently a major focus of investigation and public interest, still little is known about the mechanisms of microbiota-gut-brain (MGB) interaction, and specially the ways through which the gut microbiota could affect brain functioning and contribute to mental health conditions. Most research has been performed in animal models, with translation to humans lagging behind. In addition, the taxonomic and functional composition of the gut microbiota are often assessed with little depth. High-throughput sequencing technologies such as metagenomics could both facilitate the translation process and help gain insight into the specific roles of the microbiota in the MGB, but systematic data annotation and interpretation in the MGB context is hampered by the lack of dedicated reference databases and tools to study the microbial metabolism of neuroactive compounds. In this thesis, I developed a framework describing the metabolism of compounds produced by the gut microbiota and that can interact with the brain, which facilitates the functional analysis of metagenomes in the MGB context. This framework allowed assembling the first reference catalogue of neuroactivity of human gut microorganisms, and identifying microbial functions that potentially play a role in interacting with the host. As depression is the most prevalent mental disorder in industrialized societies, I first applied the tool to study associations between gut microbiota properties and depression and quality of life (QoL) in the Flemish Gut Flora Project (FGFP) large-scale population cohort, while performing extensive validation in independent datasets and confounder analyses. I identified several microbial taxa, including butyrate-producing bacteria (with reported anti-inflammatory properties), positively associated with QoL indicators and reduced in patients with depression. In addition, microbiota potential to synthesize a metabolite of the neurotransmitter dopamine was linked to better QoL. Following up on butyrate producers being identified as mental health-associated taxa, I then assessed and demonstrated the safety and tolerability of one such potential next-generation butyrate-producing probiotic in healthy volunteers (exploratory phase I trial). The study paves the way for the development of Butyricicoccus pullicaecorum 25-3T as a psychobiotic. I also detected a microbiota configuration that we previously found linked to intestinal inflammatory diseases, associated with lower mental and physical QoL and prevalent in depression. By applying the recently-developed quantitative microbiome profiling (QMP) method, we further characterised this configuration as an inflammation-associated, low microbial load community type, and disentangled microbiota signals of inflammation from disease-specific ones. Finally, following indications of family aggregation of psychiatric disorders and increasing evidence of microbiota transmission across generations, I examined transgenerational transmission patterns of MGB-associated microbiota features. In healthy females, transmission was limited but detectable. In conclusion, the metagenomic annotation framework developed in this doctoral thesis, together with the methodological advances and the targeted analyses presented contribute to a better understanding of the role of the human gut microbiota in mental health.