Hii Majormajor
You can't put pipes direct to the magma (1200-1300 celsius), but in many countries we put pipes to hot springs, or geisers. For example - all the buildings in Iceland recieves hot water from a central huge reservoir that is conected to a hot springs in very high pressure. Even in my country (Israel) we use these hot springs (containing sulfur) for healthy baths (in En-Gedi, Tiberias , En-Bokek...and more).