Crystal Palace are close to completing the signing of Republic of Ireland midfielder James McCarthy from Everton for £3m.