The techniques of optogenetic stimulation and neural signal recording can be coupled together in order to realize a closed loop neural interface. An improved multifunction system has been presented that is able to generate single or multi-wavelength optical pulses as well as measure evoked neural potentials. The optical stimulator is based on blue (470 nm) and yellow (592 nm) LEDs. The neural recording amplifier consists of a low noise chip with an analog-To-digital converter (ADC), an impedance measurement hardware and a digital communication logic. In addition, wireless power and data transfer capabilities makes the system useful for a range of in-vivo studies. A safety feature against high temperature induced neural damage has also been incorporated. The entire system weighs approximately 4 gms and is packaged using an FDA-compliant biocompatible polymer for reliable and waterproof operation. In-vivo stimulation and recording experiments have been performed in the visual and motor cortices of transgenic CHR2 mice under anesthetized and partially awake conditions.