Molecular communication is a novel paradigm that uses molecules as an information carrier to enable nanomachines to communicate with each other, Controlled molecule delivery between two nanomachines is one of the most important challenges which must be addressed to enable the molecular communication. Therefore, it is essential to develop an information theoretical approach to find out communication capacity of the molecular channel. In this paper, we develop an information theoretical approach for capacity of a. molecular channel between two nanomachines. Using the principles of mass action kinetics, we first introduce a molecule delivery model for the molecular communication between two nanomachines called as Transmitter Nanomachine (TN) and Receiver Nanomachine (RN). Then, we derive a closed form expression for capacity of the channel between TN and RN. Furthermore, we propose an adaptive Molecular Error Compensation (MEC) scheme for the molecular communication between TN and RN. MEC allows TN to select an appropriate molecular bit transmission probability to maximize molecular communication capacity with respect to environmental factors such as temperature and distance between nanomachines. Numerical analysis show that selecting appropriate molecular communication parameters such as concentration of emitted molecules, duration of molecule emission, and molecular bit transmission probability it can be possible to achieve. high molecular communication capacity for the molecular communication channel between two nanomachines. Moreover, the numerical analysis reveals that MEC provides more than % 100 capacity improvement in the molecular communication selecting the most appropriate molecular transmission probability.