We study Josephson junctions made of semiconducting nanowires with Rashba spin-orbit coupling, where superconducting correlations are induced by the proximity effect. In the presence of a suitably directed magnetic field, the system displays the anomalous Josephson effect: a nonzero supercurrent in the absence of a phase bias between two superconductors. We show that this anomalous current can be increased significantly by tuning the nanowire into the helical regime. In particular, in a short junction, a large anomalous current is a signature for topologically nontrivial superconductivity in the nanowire.