The 25-year old goalkeeper will join Boro on loan for the remainder of the season once he receives his international clearance.
Madrid-born Mejias has come through Real's youth academy and made over 150 appearances for the 'B' and 'C' teams of the Spanish giants. His senior debut came in a La Liga match in 2011.
Paperwork for Mejias' loan was submitted on transfer deadline day but Middlesbrough boss Aitor Karanka is still waiting on the clearance.
For breaking stories and all the great banter like us on Facebook: facebook.com/tribalfootball