Some random observations: Doesn't McCoy have the rank of lieutenant commander or commander too? It may be that he's passed the bridge officer exam that we see Troi take, so he's entitled to be there.
McCoy makes it pretty clear in "A Taste of Armageddon" that, unlike Scotty, he is not an officer "of the line" and isn't qualified to make command decisions. That shouldn't make a difference as to whether he can be on the bridge, though. If it's OK with the captain that he hangs around there, who's going to say different?