We have developed extension addon-sdk with js-ctypes.
Is there anything in firefox what can get some data from external application.
May be need use this https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/test_httpd ?
There are a bunch of possibilities... E.g.
nsISocketTransport
and/or nsIServerSocket
.XHR
and/or nsIHttpServer
(you kinda already found that one).js-ctypes
.