Never Pollute Your Laptop Again: Wire a Remote Box into Claude Code as an MCP Server
Imagine telling an AI coding agent to spin up a database, compile a project, or install some heavy dependencies, but instead of cluttering your own computer, it does everything on a rented machine that's always on and ready. That's what you get when you connect a remote Linux box to your AI assistant.
You can give Claude Code a real, root-access environment without leaving your terminal. An xshellz.box is a hardened Ubuntu 24.04 sandbox built for exactly this: fake-root via userns-remap and a gVisor sandbox, not a raw VPS. It never idles down, so your agent's context stays alive. The root filesystem is ephemeral, but /home survives reboots. And you wire it into Claude Code as an MCP server with one command.
Step by step
First, grab a box. Get an always-on xshellz.box from xshellz.com. You'll receive a hostname and a unique port. Your SSH key will be injected automatically; you can also use the browser web terminal with no key at all.
Confirm you can reach it:
ssh -p 12345 [email protected]
Once you're in, poke around. It comes with git, Node 22, Python 3, ripgrep, tmux, build-essential, and agents like Claude Code, OpenAI Codex, Gemini CLI, and borg preinstalled. That means your remote box already has claude ready to go, but we're going to connect your local Claude Code instance to the box as an MCP server so commands run remotely.
Adding the MCP server
Run this on your laptop where you use Claude Code:
claude mcp add xshellz -- ssh -p 12345 [email protected] xshellz-mcp
Replace the port and host with your own. Once added, Claude Code can invoke tools on the remote box: it will run shell commands, install packages, and read or write files inside the sandbox, all over SSH. The agent user is set up with safe root permissions through the containerized environment.
Now when you ask Claude to, say, set up a Python virtual environment and install pandas, it can do that without touching your local machine. It can compile a project with make, start a development server on port 8080 inside the box, or even use the preinstalled one-click apps (WordPress, Hugo, Astro, and others) served on that port.
Keep it reproducible
Because the root filesystem is ephemeral, every reboot resets system packages. To make your environment consistent, drop an xshellz.box manifest file in your box's /home directory. It's one line per package: a bare name or apt: prefix for apt, pip: for Python, npm: for Node. On every boot, the box reinstalls everything in that manifest, so the environment is always the same.
apt: build-essential
apt: libssl-dev
pip: numpy
When this shines (and its limit)
This setup turns Claude Code from a local assistant into a remote build worker. It's perfect for running long installs, isolating project dependencies, or testing code that needs a real Linux kernel. The remote nature adds a tiny bit of latency per command, but for package installs, builds, and file operations, it's invisible. If you need millisecond response on every shell call, keep it local, but for everything else, one SSH command gives your agent a persistent playground that won't clutter your laptop.