MacFarlane replaces Ralph Du Plessis, who is due to leave the agency next month.
Media Contacts has also hired Brian McNamara, previously head of search at online data company RedEye, to become an account director.
MacFarlane worked at Google for five years and was instrumental in establishing the AdWords advertising platform in the UK, working alongside former Google UK managing director Kate Burns. He will report to Media Contacts' head of digital Paul Frampton.
Media Contacts managing director John McLoughlin said: "Naturally, we're very pleased to have secured someone of Grant's calibre. His knowledge of paid- search is second to none."
At Google, MacFarlane oversaw client services and ad operations. At Media Contacts he will take responsibility for search in the UK and Northern Europe and become one of the members of the Media Contacts global search Centre of Excellence, a programme to service clients across the MPG global network. Media Contacts operates in 22 countries around the world.
McNamara will work on the TUI account at Media Contacts, the travel group that includes the Thomson brand. He started his career at Yahoo! Search Marketing before moving to RedEye to establish the search operation.