We present a flexible, one-dimensional magnetotelluric (MT) inversion algorithm based on inverse scattering theory. The algorithm easily generates different classes of conductivity-depth profiles so the interpreter may choose models that satisfy any external geologic or geophysical constraints. The two-stage process is based on the work of Weidelt. The first stage uses the MT frequency-domain data to construct an impulse response analogous to a deconvolved seismogram with or without a free-surface assumption. Since this is a linear problem (a Laplace transform), numerous impulse responses may be generated by linear inverse techniques which handle data errors robustly. We minimize four norms of the impulse response in order to construct varied classes of limited-structure earth models. We choose such models to prevent overinterpreting the limited number of inaccurate MT observations. The second stage of the algorithm maps the impulse response to the conductivity model using any of four Fredholm integral equations of the second kind. We evaluate the performance of each of the four mappings and recommend the Burridge and Gopinath-Sondhi formulations. We also evaluate three approximations to the second-stage equations. These approximations are fast and easy to implement on small computers. We find the one which includes first-order multiple reflections to be the most accurate.