Convert port to int for pymongo plugin