We present a scheme for a single-photon transistor which can be implemented with only minor modifications of existing superconducting circuits. The proposal employs a three-level anharmonic ladder atom, e. g., a transmon qubit, placed in a cavity to mimic a Lambda-type atom with two long-lived states. This configuration may enable a wide range of effects originally studied in quantum optical systems to be realized in superconducting systems, and in particular allow for single-photon transistors. We study analytically and numerically the efficiency and the gain of the proposed transistor as a function of the experimental parameters, in particular of the level anharmonicity and of the various decay and decoherence rates. State-of-the-art values for these parameters indicate that error probabilities of similar to 1% and gains of the order of hundreds can be obtained.