Harry is like Mephistopheles because he awakened everyone of Dorian's basic and instinctual evils, and lured him into committing all of them, no matter who gets hurt. Like the devil, he tempted Dorian into committing whatever acts entices his senses, sensations and fantasies. As a result, not only did Dorian ruin people's lives with his selfish acts, but he ended up experiencing opium dens, and much more.
James is a former friend of Dorian's presumably from his days at Oxford who apparently had done something quite shameful that Dorian knows. He reminds us of the character of Faust, by Goethe, in that he basically had to do what Dorian asked him to do (burn the body of Basil), and keep quiet. This would be the equivalent of selling his soul to the devil, like Faust did. In this case, by obeying Dorian, James was bound to him for good.