An anastomosis device includes magnets coupled to a wire capable of changing shape from a straight wire into a coil when deployed within a body. The coil exerts compressive force upon layers of tissue caught between loops of the coil. The compressive force is enhanced by attractive forces between magnets coupled with adjacent loops of the coil and causes the coil to cut through the tissue layers, creating an anastomosis. One end of the wire is preferably provided with a connecting member, such as a screw or a nut, for connecting with a delivery device. Positioned on or around the anastomosis device is an expandable drainage mechanism, such as a stent.