A device (1) for disinfecting a port of a medical device in fluid communication with a patient is disclosed. The device comprises a portion (2) adapted for connection to the port. The external surface of the portion is coated with a composition (5) in a solid or solid-like state that comprises a disinfectant, and the disinfectant composition is able to release the disinfectant upon contact with a liquid. A method for disinfecting a port of a medical device in fluid communication with a patient is also disclosed.