You can perform an engine swap on your 1998 Mazda MPV however you must warn you the procedure will not be simple. The requirements are that you install all the host engine's (Chevy 350) emission components in addition to the engine itself. This includes the entire exhaust system, all emission sensors, and most imporantly the ECU.
After the engine swap is complete your Mazda must undergo a smog inspection at a Smog Check Referee Station. The Smog Referee will ensure the engine change was done correctly, and the new engine passes a smog check. You may contact the referee's office by calling (800) 622-7733.