Coconut oil does not necessarily make your poop green. The green hue stems from the yellowish-green bile in your intestines. If your poop looks green after consuming coconut oil, this shows that the stool in your intestines is moving way too fast. Coconut oil is good at stimulating bowel movement. (Fractionated coconut oil like MCT oil has similar effect too.)
When stool moves at regular rate in your intestines, it'll gradually turn brown. Such contribution of brown hue comes mainly from dead red blood cells and the waste from gut bacteria.
If the stool moves too fast, it won't stay long enough to reel in more dead red blood cells. Not only that, your gut bacteria will have less food to feed on. When they eat lesser, they pass out lesser waste as well. Consequently, your poop looks less brownish but more greenish.
Additionally, if you were to eat lots of dark leafy greens, the contribution of green hue increases. And when coconut oil loosens your bowels, you pass out loose and green poop as a result.
If you think you're taking too much coconut oil (or MCT oil) and it causes green poop, just cut back on your coconut oil intake. But if your green poop stems from your large consumption of green vegetables, then you have nothing to worry about. That's normal.