Detailed samples on the now (since Windows 8.1 Update) possible communication between Windows Store client connected to a local server hosted in local Desktop application.
It only works for side loaded applications. If you don’t know everything about this kind of app, all you need to know is available on technet here.
EDIT: This is now simplified by project templates: Brokered WinRT component project templates now available.
EDIT: And now how to distribute C++ Runtime for Sideloaded Windows 8.1 apps (when C++ runtime cannot be provided by Windows 8 Store).