I am borderline away from having a minor in Middle Eastern studies. Trust me, it is considered part of the Middle East.
My major was History, once you get past the BS of racism, Egypt yes, culturally, Politically is part of the M. E, but not geographically, It is Part of African and on the African Continental Plate
Just as Christianity is a Western Religion, yet based in the Middle East?
The Leafy Bug is 100% correct and Parker is a bit simple. Politically, culturally and geographically North Africa is considered part of the middle east. The blacks that you see in those countries are from centuries of slavery . Arabs were some of the biggest slavers in history.
North African is part of Africa, as I said once you get past the BS of racism, Colonialism, Imperialism, and your own clouded views, Africa is Africa. Europe is Europe.
Slavers mean very little, in this context, there were Africans in North Africa before the East African Slaver trade (Muslims had big hand in that)