Brainwaves from human participants activated a tiny light which had been implanted in mice.
This LED then activated light-sensitive genes which had been genetically engineered to respond in this way.
The authors report that the technology could one day be used to control pain management or pre-empt epileptic seizures.
Though they noted that this paper was a proof of concept and that any potential therapeutic applications were still a long way off.
Senior author of the work, Martin Fussenegger at ETH Zurich in Switzerland, said it was a huge step forward.
"At first you may ask why should I think something and then control my genes? I could push a button and [also] induce the LED.
"The reason is, we've designed it for potential application for locked-in patients who can no longer communicate with the outside world other than with their mental activities and brainwaves.
"This sounds like science fiction but it's an obvious interconnection of different technologies."
Brainwaves wirelessly activated these lights
The team placed an electroencephalography device (EEG) on participants' foreheads to record their brainwaves. They asked them to adopt three different mental states, such as concentration versus relaxation.
The resulting electrical signals were then used to switched on the infrared LED light which activated a gene. The resulting proteins could then be monitored in the blood stream.
"In all of these three different mental states we saw very specific brain activities and these were translated via the LED to very specific illumination of the designer cells. In response those (genes) produced proteins that were then circulating in the animal," Prof Fussenegger explained.
Though this study used a simple brain computer interface (BCI) device, this field of research has been steadily progressing. Developments include a thought powered remote control helicopter and paralysed humans have used their thoughts to power a robotic arm.
The optogenetic implants could be seen through the skin of the mice
Previous studies have also shown that genes can be expressed using light - a process which uses optogenetics where cells or genes are engineered to respond to light.
The new study, the first to merge these two fields, is published in Nature Communications.
"We can control several things with the mind but there has never been a link to the molecular biology of gene transcription." Prof Fussenegger said.
Commenting on the study Prof Geraint Rees of University College London's Institute of Neuroscience, said the research showed an interesting way to trigger gene activation but added that it was unclear how useful the technology could be, especially because "optogenetics is entirely limited to experimental animals".
He said there was also still a long way to go to fully understand how to decode brainwaves from BCIs.
"We don't yet have a complete understanding of how to translate what we can record on the surface of somebody's scalp into a pattern of thought," Prof Rees told the BBC.
The implants were custom made by the team.
Another independent researcher, Dr Janis Daly from the University of Florida's College of Medicine, said the study was an outstanding example of what could be achieved with interdisciplinary work.
"The team integrated sophisticated principles and knowledge from the fields of engineering, genetics and neuroscience to design and successfully test their mind-controlled, wireless-powered optogenetic designer cell.
"A potential implication of this system is that it will employ purposeful mind/brain function control that is intact in the individual in order to treat brain pathology," she added.