It can both anchor and dock. They are big ships, not much smaller than an aircraft carrier IIRC. They are actually converted supertankers.
Clearly you need a channel deep enough for the vessel, and appropriate port facilities. They tied up to the pier in NYC only a couple days after 9/11.
For the Haiti earthquake, they anchored off. I think this was due to a combination of aids to navigation (buoys etc) being displace, a lack of good port facilities and an uncertain security situation.
They have a fully capable helicopter pad. I'm not sure how big of an asset they can land, but I know Coast Guard Jayhawks can land on it (same as a Blackhawk) and I suspect bigger aircraft. They can also receive patients via small boat, or just bring them aboard from the pier.
The Mercy and Comfort are both capable of underway replenishment, where they steam next to another ship, shoot lines across and haul over supplies.
The capabilities of those two vessels are awesome and in my opinion represent some of the best things the US has to offer the world in a time of crisis.