We consider a single-server queuing model with energy harvesting. Customers and energy units arrive in the marked Markovian arrival flow. Buffers for customers and energy are finite. There are several service modes distinguished by the number of required units of energy, the service rate and the quality of service. The choice of the service mode for the next customer depends on the current number of energy units in the system. The quality of system operation is assumed to be defined by a customer's loss probability. Loss can occur due to buffer overflow, low-quality service or impatience during the waiting time. The control strategy is of a multi-threshold type with thresholds defined by the amount of available energy. Under the fixed values of the thresholds, the behaviour of the system is described by a multi-dimensional Markov chain. The generator of this chain is derived. The main performance measures are calculated. The distribution of the waiting time is derived in explicit form. A numerical study of the model via extensive experiments that provide insight into the quantitative behaviour of the system is presented. © 2018 Elsevier B.V.