An MQTT client for the MQTT Data API connects to TTN itself, so does not need the Pi to be accessible over the internet. Also, many Pi’s come with Node-RED installed, which has built-in support for MQTT. This does not need any configuration in TTN Console (though you could add an extra application Access Key for this specific client).