There's no API that exposes this. But because you're on a server, you can check what process is running.
I.e. on Windows (Task Manager) and Firebird 2.5: