In the past year I built dedicated rigs for a PMP client (stock Intel i3-7100, 8GB RAM, GeForce 1050ti running Windows 10) as well as a new PMS rig that is just getting off the ground (AMD Threadripper 1920x, 16GB RAM/32GB eventually, cheap graphics card just to drive a display, also running Windows 10).
The hardware you need will depend on your streaming setup. If you’re streaming to less capable clients (generally weak CPU/GPU, or SoC) , the server needs to be more powerful; if your clients are more capable, then the server doesn’t need to be as powerful (since it can direct play/offload playback to the clients).
With my setup, my client GPU handles all the work (hardware decodes HEVC up to 12bit), so I don’t need a powerful server (I’m currently running PMS on a 2010 iMac, passmark ~5,300). As I add more and more 4k content (encoded with HEVC/x265) though, my friends and family who stream from me can’t handle that directly and thus the server needs to transcode. My 2010 iMac is woefully underequipped for 4k HEVC transcoding, which is why I invested in the 12 core Threadripper (passmark just under 18,000). If I took that external streaming out of the equation, I’d likely be able to run a cheap i5 on the server.
I don’t game much, aside from SNES emulation (hey old habits die hard), so I can’t give much help on that front. I’d think for stuff like Steam games, a capable graphics card would do the trick. I know Threadrippers are built more for hyperthreaded applications like video encoding, so an Intel CPU with a capable embedded GPU might be a better call there (I haven’t looked at AMD’s more gaming friendly CPU offerings).
For RAM, 16-32GB of the fastest RAM your mobo supports should do the trick.
…And here I’ve written the first chapter in a novel. Sorry for the long-winded response. This is what happens when I cut down on coffee during the week and overdo it on weekends!
EDIT: Plex has an article on how to pick a server CPU as well.