I asked my AI agent for a private LLM client/server. It built one out of MQTT and 1,000 lines A developer built a private LLM chat client and server using MQTT as the transport, letting a phone reach an Ollama instance on a home GPU PC without opening any inbound ports. The system consists of a static browser page (420 lines), a small service on the PC (94 lines), and a Python plugin (536 lines), all routed through a rented Linux box running a mosquitto broker and nginx. The developer chose MQTT over Tailscale, Cloudflare Tunnel, and port forwarding because it requires no client install and keeps the GPU box unreachable from the internet. I have a PC in my home office with an Nvidia GPU and Ollama on it, and I wanted to ask it questions from my phone while I am out. Every guide I found said roughly the same thing: run something in Docker, put a reverse proxy in front of it, forward a port on the router or install a VPN, provision TLS, add an auth layer, and keep it patched. All of that works. It is also more moving parts than I want between me and a chat box — and if I hand that list to an AI agent, most of its effort goes into YAML rather than into the thing I actually wanted. So I asked for something different: the smallest possible surface. What we ended up with is a browser page, a small service on the PC, and one rented Linux box running an MQTT broker. Neither the page nor the PC accepts an incoming connection from the internet. Nothing in my house has a port open. Here's what it looks like: MQTT is a publish/subscribe message bus. Clients connect to a broker , subscribe to topics , and receive whatever is published to those topics. It is a decades-old piece of infrastructure with excellent servers, and it has a property I wanted: it is a meeting point that both ends can reach without either end being reachable. phone / laptop broker PC with the model ┌──────────────┐ ┌──────────────────┐ ┌──────────────────────┐ │ the page │ ask ─────▶│ │─────────▶│ mqttchat-server.as │ │ static │ │