For some reason, MDCS can't upload service definition with credentials in JSON (mdcs-py/Parameter/Credentials/server1.json).
Thus, it's better to stop MDCS at creating service definition and use another script for uploading.
Step-by-step guide
- Create service definition file using MDCS.
- Upload using arcpy function.
If upload.py fails with strange error message, restart the ArcGIS Server.