Yes, a mountain bike can be used in the city.  The real question is how is the ride, and what can you do to make the ride better ...