A system for forming an anastomosis between first and second sections of a digestive tract, comprising: an optical scope device including a lumen extending therethrough configured to be positioned at a first target site within the first section, the optical scope device including an imaging component at a distal end thereof for viewing the first target site; a first endoscope (110; 116) including a working channel (108; 148) extending therethrough configured to be positioned at a second target site within the second section; a capture device extending from a proximal end to a distal end including a loop , the capture device configured to extend through the lumen of the optical scope device ; a first flexible element configured to extend through the first endoscope (110; 116), the first flexible element including a coupling element at a distal end thereof, the coupling element being configured to be passed through the loop to couple the first flexible element to the capture device, connecting the first and second sections, the coupling element being movable between an insertion configuration in which the coupling element is sized to pass through the loop of the capture device and a locking configuration in which the coupling element is configured to prevent an expandable element from passing through the loop , removably locking the first flexible element wire to the capture device; a stent including a body portion , a proximal flange and a distal flange , the body portion including a lumen extending therethrough and configured to extend through walls of the first and second target sites so that the lumen provides fluid communication between the first and second sections; and a stent delivery system including a catheter extending from a distal end to a proximal end coupled to a handle , the catheter including a working channel configured to receive the stent therein, the stent delivery system configured to position the stent within the target anastomosis site. an optical scope device including a lumen extending therethrough configured to be positioned at a first target site within the first section, the optical scope device including an imaging component at a distal end thereof for viewing the first target site; a first endoscope (110; 116) including a working channel (108; 148) extending therethrough configured to be positioned at a second target site within the second section; a capture device extending from a proximal end to a distal end including a loop , the capture device configured to extend through the lumen of the optical scope device ; a first flexible element configured to extend through the first endoscope (110; 116), the first flexible element including a coupling element at a distal end thereof, the coupling element being configured to be passed through the loop to couple the first flexible element to the capture device, connecting the first and second sections, the coupling element being movable between an insertion configuration in which the coupling element is sized to pass through the loop of the capture device and a locking configuration in which the coupling element is configured to prevent an expandable element from passing through the loop , removably locking the first flexible element wire to the capture device; a stent including a body portion , a proximal flange and a distal flange , the body portion including a lumen extending therethrough and configured to extend through walls of the first and second target sites so that the lumen provides fluid communication between the first and second sections; and a stent delivery system including a catheter extending from a distal end to a proximal end coupled to a handle , the catheter including a working channel configured to receive the stent therein, the stent delivery system configured to position the stent within the target anastomosis site. <EOS>