Stop Playing Configuration Tetris: Use MCP to Wire Claude Code to Your xShellz Box
Most remote AI agent setups force you to juggle SSH keys, open ports, and manage configuration files before a single command runs. The Model Context Protocol (MCP) cuts through that by letting a local agent talk directly to a server over a simple, standard channel. With an xShellz agent shell box, that channel is already set up, you just wire it in.
An xShellz box is an always-on Ubuntu sandbox with a fake‑root environment that's safe for agents to play in but separate from your actual machine. It already runs Claude Code (claude) by default, but the real trick is making your local Claude Code instance treat the remote box as its own terminal. One command does it.
The one‑command setup
You need an active xShellz box. Get its hostname and port from the dashboard, then run this locally:
claude mcp add xshellz -- ssh -p <port> agent@<host> xshellz-mcp
That's it. The xshellz-mcp process on the box exposes a pre‑built set of tools, file operations, shell execution, and more, through the same SSH connection you'd use to log in. Claude Code discovers them instantly, and you never touch an SSH config file or a bastion host.
Putting it to work
Now open Claude Code (claude) on your laptop and start talking to the remote box as if it were a local shell:
$ claude
> List the contents of my home directory on the xshellz box.
[Claude Code runs /home/agent via the MCP server]
.ssh
.xshellz
BORG.md
my-project
You can go further. Because the box is a persistent, always‑on sandbox, you can ask Claude to install packages, spin up a development server, or pre‑configure a one‑click app like Astro or MkDocs. The agent just runs the commands inside the box and reports back. You never need to paste a command or open a separate terminal window.
When this really shines
This pattern works best when you want an AI agent to own a safe, remote workspace that outlives your laptop's sleep cycle. It's not for high‑throughput automation or workflows that require a permanent system daemon, the MCP server is tied to your active SSH connection, but for ad‑hoc sysadmin, exploration, and keeping a side project running while you move around, it fits like a glove.