Claude Code runs its commands on your own machine. Its sandbox mode can limit what those commands touch, but they still use your laptop's CPU, your disk and your network, and they stop when you close the lid.
Sometimes you want the work somewhere else: a Linux machine for a project you develop on a Mac, a dev server you can send someone a link to, a dependency you'd rather not install at home, or a heavy build that shouldn't slow everything else down. This guide connects Claude Code to a cloud VM through MCP in about two minutes, so Claude can create the machine, run commands on it, edit its files and share a preview link.
It works the same way with Codex and Cursor; their setup is at the end.
What you get
BoxCompute's MCP server gives Claude Code tools to:
- Create, start and stop Linux VMs in your account, from Small (0.5 vCPU, 1 GiB RAM) to Large (1.5 vCPU, 3 GiB), with XL and XXL on Starter.
- Run commands, either waiting up to 60 seconds for the result or in the background for up to 15 minutes.
- Read, write and edit files under
/workspace. - Open a preview link: a public HTTPS URL for a port a server in the VM listens on, valid for one hour.
Each VM keeps its /workspace files and installed packages when it stops, so Claude can come back to the same machine tomorrow.
Before you start
You need Claude Code and a BoxCompute account with credit. Eligible new accounts get $5 of free credit, valid for 14 days. That's about 100 hours of a Small VM. Sign up here.
1. Add the server
In a terminal:
claude mcp add --transport http boxcompute https://mcp.boxcompute.ai/mcp
2. Sign in
Start Claude Code, run /mcp, select boxcompute and choose Authenticate. Your browser opens a BoxCompute page that names Claude Code and lists what it will be able to do. Choose Allow access.
That creates an API key called MCP · Claude Code on your API keys page. Claude Code acts as that key, and every request appears in your API activity. Revoke the key to disconnect it.
3. Ask for a machine
Now ask in plain words. For example:
Create a small BoxCompute VM called notes-api. Clone https://github.com/you/notes-api into /workspace, install dependencies and run the tests.
Claude creates the VM, waits for it to boot (about 30 seconds), and works through the steps with command_run. Test runs longer than a minute go to process_start, and Claude checks back on the output.
Then:
Start the dev server on port 3000 and give me a preview link.
You get an https://… URL you can open on your phone or send to someone. Anyone with the link can reach that port until it expires an hour later.
Some other things that work well:
- “Profile this script on a Large VM and tell me where the time goes.”
- “Try upgrading the project to Node 24 on a fresh VM, run the tests and tell me what breaks. Don't touch my local checkout.”
- “Scrape these ten pages into a CSV on the VM, then show me the first rows.”
- “Stop the VM when you're done.”
What it costs
A running VM is billed by the second, about $0.05 an hour for Small and $0.15 for Large, with a one-minute minimum. A stopped VM costs nothing.
A VM stops on its own 30 minutes after Claude last used it, and keeps its files. That also means a server you started stops with it, even if it's still running. Ask Claude to stop a VM when you're finished, or let the idle stop do it.
Claude Code's own model usage is billed by Anthropic as usual. BoxCompute charges only for VM time.
Things to know
- Boot time. A new VM takes about 30 seconds and a stopped one about 20 to resume. Once it's running, each command is quick.
- Where it runs. VMs run in Cyberjaya, Malaysia. From Europe or the Americas, each command adds a round trip; it's fine for agent work, but noticeable if you type into a terminal by hand.
- Long-running work. Background processes run for up to 15 minutes, and a VM stops 30 minutes after its last use. This setup is for development work, not for hosting a service around the clock.
- Limits. A free account runs two VMs at once, or three with added credit. Starter runs all of them at once.
- Secrets. Don't paste keys into the chat. Put them in an environment file on the VM yourself, or use a key scoped to what the project needs.
- Sandbox mode still matters locally. The VM keeps the project's commands off your machine, but Claude Code itself still runs on your laptop. Keep its local sandbox and permission settings on.
Codex
codex mcp add boxcompute --url https://mcp.boxcompute.ai/mcp
codex mcp login boxcompute
codex mcp login opens the same sign-in page.
Cursor
Add the server to ~/.cursor/mcp.json with an API key:
{
"mcpServers": {
"boxcompute": {
"url": "https://mcp.boxcompute.ai/mcp",
"headers": { "Authorization": "Bearer ${env:BOXCOMPUTE_API_KEY}" }
}
}
}
The MCP server docs cover every tool, the limits and the API-key setup for other clients.
Sources
- Claude Code: Sandboxing, Connect Claude Code to tools via MCP
- BoxCompute: MCP server, pricing, limits and errors