A magnetic anastomosis assembly includes a magnet with a passageway and a guidewire passing through the passageway. The passageway can be external or internal to the magnet body.