HMP Peterborough is a Category B prison, external run by Sodexo and is the only prison in England that holds both men and women, although they are kept separate.
It currently holds about 360 women and 944 men.
At the latest inspection, CQC inspectors looked at how safe, effective, and well-led the healthcare service was.
They found clear improvements in how risks and problems were identified and managed., external
It also found checks for prisoners detoxing from drugs and alcohol, now followed national guidance, and funding for additional mental health staff had been approved.
In addition, plans were in place to expand the pharmacy across other sites, offering benefits such as shared staff resources.
The watchdog also said healthcare and prison staff work well together, and healthcare staff had responded proactively to a recent rise in overdose emergencies at the prison.
They trained 336 prison staff to use Naloxone, a medicine that reverses opioid overdoses, and made sure it was available on every wing.
It also noted that an improved referral and triage system allowed more effective oversight of patients awaiting a mental health assessment.
Patient records now clearly showed when a medicine was given, and follow-ups for missed medicines had improved.
HMP Peterborough and the Northamptonshire Healthcare NHS Foundation Trust were contacted for a comment.