Given an infinite cardinal $\kappa$, Gödel's function is a well-known bijection $p:\kappa^2\to\kappa$. 

Is $p$ definable in the structure $\langle\kappa;\in\rangle$? 

Is $p$ definable in a bigger 2nd order structure $\langle\kappa;\mathcal P(\kappa);\in\rangle$?

It looks like any typical attempt to code something like this (even + on ordinals) somehow refers to a pairing function.