I have the script with throw a error_expressioneval. Runs fine in the script console.
Not sure where is the script error. Attached screenshot of expression tag.
Your code would then need to reference tagValues[0], etc.
You also need [ ] lists on the writeBlocking line. system.tag.writeBlocking([tagPaths[2]], [mpe])
In current Ignition version the functions work when only one parameter is supplied (not in a list) but it's undocumented and could be "fixed" in the future.
A further thought - and this might be the problem: The script needs to be on the gateway, not in your project, otherwise the tag event can't find it. Where have you stored the script?
I also don't see why this calculation needs to be in a script. Why not perform the calculation directly in the expression on the expression tag? Seems that all the input tags have the same base path which could be parameterised.