Localhost-only MCP server used cross-machine via reverse encrypted tunnel, zero exposed ports

XVX109 · reddit · 2026-08-21

The author demos an interesting transport pattern: an MCP server bound to 127.0.0.1 on a Mac is driven by a self-hosted agent (Hermes, controlled via self-hosted Mattermost from a phone) on a Linux box on another VLAN, creating tasks, setting statuses, tagging and commenting in the Mac desktop app.

The trick: the Mac opens an outbound encrypted link to the Linux box, and the server then appears on that box's loopback — the agent adds it as an ordinary Streamable HTTP MCP server with a bearer token. No inbound connections, no relay, no open ports.

Both read and write work, and the server's read-only mode correctly refuses writes from the remote agent. The author discloses being on the closed-source desktop app's dev team but posts for the transport pattern, which works with any local MCP server.

Original post →

More from coding & agent

coding & agent channel →