Add protocol convertor middleware.
Merge branch 'dev-protocol-convertor' into dev-fix-mc