Depends where the JS is running. We let WebUI pages access Mojo IDL natives like Mojo.bindInterface(), which essentially lets you pass an interface request to the document's RenderFrameHost. There are then generated JS bindings which you can use to build on top of that.
The detail of how your interface request gets routed to a service process is really up to you, since JS can only send requests to the frame host. You have to plug in browser-side code to, e.g., route specific requests onward to a service.