Fixed some errors in new agMCP api; now builds without warnings and errors