A first tube connector and a second tube connector are to be automatically and mechanically attached to and detached from each other. Provided is an attaching/detaching device (100) including: a fixing portion (104) configured to fix a first tube connector (105); a holding portion (107) configured to hold a second tube connector (106); a moving portion configured to move the holding portion (107), which holds the second tube connector (106), in a direction of approaching the first tube connector (105) to connect the second tube connector (106) to the first tube connector (105), and move the second tube connector (106) after the connection in a direction of separating from the first tube connector (105) to release the connection of the second tube connector (106) and the first tube connector (105).