Brain tissue is a complex material made of interconnected neural, glial, and vascular networks. While the physics and biochemistry of brain’s cell types and their interactions within their networks have been studied extensively, only recently the interactions of and feedback among the networks have started to capture the attention of the research community. Thus, a good understanding of the coupled mechano-electrochemical processes that either provide or diminish brain’s functions is still lacking. One way to increase the knowledge on how the brain yields its functions is by developing a robust controlled feedback engineering system that uses fundamental science concepts to guide and interpret experiments investigating brain’s response to various stimuli, aging, trauma, diseases,... treatment and recovery processes. Recently, a mathematical model for an implantable neuro-glial-vascular unit, named brain-on-a-chip, was proposed that can be optimized to perform some fundamental cellular processes that could facilitate monitoring and supporting brain’s functions, and highlight basic brain mechanisms. In this paper we use coupled elastic, viscoelastic and mass elements to model a brain-on-a-chip made of a neuron and its membrane, and astrocyte’s endfeet connected to an arteriole’s wall. We propose two constrained Lagrangian formulations that link the Hodgkin-Huxley model of the neuronal membrane, and the mechanics of the neuron, neuronal membrane, and the glia’s endfeet. The effects of the nitric oxide produced by neurons and endothelial cells on the proposed brain-on-a-chip are investigated through numerical simulations. Our numerical simulations suggest that a non-decaying synthesis of nitric oxide may contribute to the onset of a cerebral microaneurysm.