94 Ford Ranger running rough has a hard time accelerating engine light keeps coming on and going off

It starts up just fine has a little bit of a rough idle. When accelerating it's struggling to gain speed feels like it's going in and out of power like when I first accelerate it struggles and then about half way through it'll speed up if that makes any sense. Not sure what it is I've done some research some people suggest it's could be the MAF sensor or a fuel filter. I just replace the clutch master and slave cylinders which consisted of pulling transmission out before the slave / throw out bearing went out the truck had no acceleration problems has anyone had this problem I don't have a lot of money to just go by parts hoping it's the right one any suggestions would be appreciated thank you

Go to your local parts store and have them read the codes. They'll do it for free and it will give you an idea of what's wrong. Usually the check engine light being intermittent is related to the evap system.

Not the MAF sensor - your Ranger has a MAP (pressure instead of flow) sensor. Fuel filters are not consistent with it picking up; they are more trouble at higher power than lower power. You mention the Check Engine Light is going on and off but you don't say if that is on when struggling and off when it picks up. In any case, it is critical to know what code(s) the light is announcing.

Just as a guess, I suspect when the transmission was put back in a hose or connector was left off or misplaced. It doesn't have to be on the transmission itself - it can be one that was either removed or knocked off when the transmission was removed. The code(s) will tell us a lot more about what to look for. I'm not a fan of having codes read by auto parts stores but that is at least in your price range. Just don't buy any parts until there's a reason to. This is not likely to be a "bad part" thing.

Get an OBDII reader and get someone to read the live data as you drive along it might give a clue to what is happening

Always try the simplest first. It does sound like a dirty fuel filter.