Inbound (ie. returning to Canada), you will have to claim your bags to clear customs, but you don't take them though security. You'll clear immigration, pick up the bags, walk through customs (handing your declaration form to the customs officer) and then immediately re-check on the other side. Just make sure you have your boarding passes for the connecting flight handy, as you'll need them to re-check the bags.
Outbound, you should NOT have to pick up your bags in either Montreal or Toronto. US customs agents have the ability to "recall" your bags if necessary. In Toronto this is a recent change. You can see details at the following websites:
www
-dot-admtl.com/Passengers/Formalities/ConnectingFlight.aspx
www
-dot-torontopearson.com/Connecting.aspx#
www
-dot-aircanada.com/en/news/130218.html
(Sorry about the formatting, you'll have to replace the
-dot- with an actual dot. Everything else I tried got auto-formatted into a link, which it would then refuse to post since apparently I don't have enough prior posts for that. How irritating. So much for trying to be helpful.

Maybe someone else can repost them in a more friendly format.)