How to get macOS Server download code in Apple Developer Portal?
You can download OS X Server from the Mac App Store.  Per this Apple Support page:


  OS X Server brings even more power to your business, home office, or school. Designed for OS X and iOS, OS X Server makes it easy to collaborate, develop software, host websites and wikis, configure Mac and iOS devices, and remotely access a network. It’s also remarkably simple to install, set up, and manage. Add OS X Server to your Mac from the Mac App Store.


I think the name has been changed to macOS Server but I'm not sure.  If someone knows for sure they can edit this answer.

Update: per discussion in comments, it appears Apple has discontinued offering a code to developers for a free copy.  All downloads, except for betas or discontinued versions, are in the MAS now and must be purchased (if applicable).