Background The aim of our study was to assess the feasibility of minimally invasive digestive anastomosis using a modular flexible magnetic anastomotic device made up of a set of two flexible chains of magnetic elements. The assembly possesses a non-deployed linear configuration which allows it to be introduced through a dedicated small-sized applicator into the bowel where it takes the deployed form. A centering suture allows the mating between the two parts to be controlled in order to include the viscerotomy between the two magnetic rings and the connected viscera. Methods and procedures Eight pigs were involved in a 2-week survival experimental study. In five colorectal anastomoses, the proximal device was inserted by a percutaneous endoscopic technique, and the colon was divided below the magnet. The distal magnet was delivered transanally to connect with the proximal magnet. In three jejunojejunostomies, the first magnetic chain was injected in its linear configuration through a small enterotomy. Once delivered, the device self-assembled into a ring shape. A second magnet was injected more distally through the same port. The centering sutures were tied together extracorporeally and, using a knot pusher, magnets were connected. Ex vivo strain testing to determine the compression force delivered by the magnetic device, burst pressure of the anastomosis, and histology were performed. Results Mean operative time including endoscopy was 69.2 ± 21.9 min, and average time to full patency was 5 days for colorectal anastomosis. Operative times for jejunojejunostomies were 125, 80, and 35 min, respectively. The postoperative period was uneventful. Burst pressure of all anastomoses was C110 mmHg. Mean strain force to detach the devices was 6.1 ± 0.98 and 12.88 ± 1.34 N in colorectal and jejunojejunal connections, respectively. Pathology showed a mild-to-moderate inflammation score. Conclusions The modular magnetic system showed enormous potential to create minimally invasive digestive anastomoses, and may represent an alternative to stapled anastomoses, being easy to deliver, effective, and low cost.