In this paper, we study Markov fluid queues where the net fluid rate to a single-buffer system varies with respect to the state of an underlying continuous-time Markov chain. We present a novel algorithmic approach to solve numerically for the steady-state solution of such queues. Using this approach, both infinite- and finite-buffer cases are studied. We show that the solution of the infinite-buffer case is reduced to the solution of a generalized spectral divide-and-conquer (SDC) problem applied on a certain matrix pencil. Moreover, this SDC problem does not require the individual computation of any eigenvalues and eigenvectors. Via the solution for the SDC problem, a matrix-exponential representation for the steady-state queue-length distribution is obtained. The finite-buffer case, on the other hand, requires a similar but different decomposition, the so-called additive decomposition (AD). Using the AD, we obtain a modified matrix-exponential representation for the steady-state queue-length distribution. The proposed approach for the finite-buffer case is shown not to have the numerical stability problems reported in the literature.