This appears to be SM6T36CA, a bidirectional transient voltage suppressor, marked as MV. "GP" appears to be the assembly location, "931" the date code.. Datasheet.
How you find these things out is a mix of guesswork, looking things up, and luck. The single most helpful thing is to know the manufacturer, so you can find out what marking schemes it uses. In this particular case it's ST, which often uses the same marking scheme: specifically a short identifier for the part, followed by a longer production and date code. Your part matched this pattern. ST publishes the markings very clearly in its datasheets, and so finding "MV" was possible; and the fact that the PCB is marked D but the part has no cathode marker reinforces bidirectional. Some other manufacturers are not as helpful. Be aware that sometimes different parts have the same markings, though not usually from the same manufacturer, and you have to check that the part makes sense in the portion of the circuit you're looking out. Often you can see traces to ground or pullups or a known transistor's base or whatever, to confirm the identification you've made.