  We describe how the quadratic Chabauty method may be applied to determine the
set of rational points on modular curves of genus $g$ whose Jacobians have
Mordell--Weil rank $g$. This extends our previous work on the split Cartan
curve of level 13 and allows us to consider modular curves that may have few
known rational points or nontrivial local height contributions away from our
working prime. We illustrate our algorithms with a number of examples where we
determine the set of rational points on several modular curves of genus 2 and
3: this includes Atkin--Lehner quotients $X_0^+(N)$ of prime level $N$, the
curve $X_{S_4}(13)$, as well as a few other curves relevant to Mazur's Program
B.
