According to the article page, the Magic Keyboard is only compatible with macOS, but according to some websites I found, it should also be possible to connect the keyboard with Windows - but of course Apple doesn't say so itself.
It doesn't matter whether you use the "built-in" Bluetooth or the adapter.