The quest to understand how neural circuits process information in order to drive behavioral output has been greatly aided by recently-developed optical methods for manipulating and monitoring the activity of neurons in vivo. These types of experiments rely on two main components: 1) implantable devices that provide optical access to the brain, and 2) light-sensitive proteins that change neuronal excitability or provide a readout of neuronal activity. There are a number of ways to express light-sensitive proteins, but stereotaxic injection of viral vectors is currently the most flexible approach because expression can be controlled with genetic, anatomical, and temporal precision. Despite the great utility of viral vectors, delivering the virus to the site of optical implants poses numerous challenges. Stereotaxic virus injections are demanding surgeries that increase surgical time, increase the cost of studies, and pose a risk to the animal's health. The surrounding tissue can be physically damaged by the injection syringe, and by immunogenic inflammation caused by the abrupt delivery of a bolus of high-titer virus. Aligning injections with optical implants is especially difficult when targeting small regions deep in the brain. To overcome these challenges, we describe a method for coating multiple types of optical implants with films composed of silk fibroin and Adeno-associated viral (AAV) vectors. Fibroin, a polymer derived from the cocoon of Bombyx mori, can encapsulate and protect biomolecules and can be processed into forms ranging from soluble films to ceramics. When implanted into the brain, silk/AAV coatings release virus at the interface between optical elements and the surrounding brain, driving expression precisely where it is needed. This method is easily implemented and promises to greatly facilitate in vivo studies of neural circuit function.