When you're talking about Ancient Egypt, that's a ridiculously long period of time. Also, like real roots, there are usually many cultural roots rather than a single one, and neighbouring cultures tend to cross-fertilise. That's a lot of roots! If you want to start, just look at Ancient Egypt's powerful neighbours, almost each one has influenced it in some way. So I'll try to categorise them instead of listing every single one.
Upper and Lower Egypt
Ancient Egypt is the product of the merger of two very ancient kingdoms: Upper and Lower Egypt. Before this there were separate towns. So the two biggest roots of Ancient Egypt are Upper and Lower Egypt. Perhaps the biggest cultural influence is in their mythology: Horus, associated with Upper Egypt, is said to have conquered Set, associated with Lower Egypt.
Mesopotamia
Mesopotamia, the Cradle of Civilisation and very close to Egypt, is obviously a big influence:
A new and distinctive pottery, which was related to the pottery in the Southern Levant, appeared during [the Early Dynastic Period]. The Mesopotamian process of sun-dried bricks, and architectural building principles—including the use of the arch and recessed walls for decorative effect—became popular during this time.
https://en.wikipedia.org/wiki/Early_Dynastic_Period_(Egypt)
Another example is the chariot, which passed into Egypt from Asia.
The Egyptian chariot betrayed its Asiatic origin in a number of ways, by the names of its parts which were Semitic and by its decorations which often took the form of date palm branches or animals opposing each other, both Syrian motifs.
http://www.reshafim.org.il/ad/egypt/timelines/topics/chariot.htm
Nubia
The region south of Ancient Egypt interacted with it in various ways, conquering and trading with each other. Nubia even contributed some pharaohs, who (along with Nubia itself, eventually) assimilated with Egypt because it was the "greater" culture. But there was a lot of Nubian influence:
As expected, strong Nubian features and dark coloring are seen in their sculpture and relief work.
https://en.wikipedia.org/wiki/Nubia#Nubia_and_Ancient_Egypt
Ancient Libya
Very little is known about lands west of Ancient Egypt, but they did at least contribute some pharaohs, who brought some Libyan practices to Egypt, at least for a time.
Ancient Greece
Even though you most often hear the cultural exchange being one-sided, Egypt to Greece, and Herodotus described the Ancient Egyptians as xenophobic, but there were large Greek settlements in Egypt, so there is probably a little bit of Greek influence. For example, there are some parallels between Homeric epics and the contemporary tales of Setna Khaemweset, although this is pretty weak evidence.
Obviously Egypt was later Hellenised after Alexander's conquest, but that also marks the end of Ancient Egypt.