# Your first Sandscale sandbox from Codex: config.toml, login and a Go command in a microVM

> A first-run walkthrough: create a Sandscale account, add the remote MCP server to Codex's config.toml, run codex mcp login, and have Codex start a Go sandbox, run go version in it and stop it.

A first-run walkthrough: create a Sandscale account, add the remote MCP server to Codex's config.toml, run codex mcp login, and have Codex start a Go sandbox, run go version in it and stop it.

November 29, 2026 · 4 min read · The Sandscale team

Codex runs commands in your working copy. This walkthrough gives it a separate place to run them: a Sandscale sandbox, a Firecracker microVM with its own kernel. You will create an account, add a few lines to `config.toml`, sign in with `codex mcp login`, and ask Codex to start a sandbox, run `go version` in it and stop it.

It is a first-run guide. For tool allow lists and approval modes in depth, read the longer [Codex setup guide](https://sandscale.dev/blog/sandscale-mcp-server-in-codex?ref=blog). If you want Codex itself to run on a cloud machine, see [codex exec in a cloud workspace](https://sandscale.dev/blog/codex-exec-in-a-cloud-workspace?ref=blog).

Sandscale facts are from the [Quickstart](https://sandscale.dev/docs/quickstart?ref=blog), the [Connect Claude or ChatGPT guide](https://sandscale.dev/docs/guides/connect-claude-chatgpt?ref=blog), which covers every remote MCP client, the [plans reference](https://sandscale.dev/docs/reference/plans?ref=blog) and the CLI’s `sandscale help`. Codex facts are from OpenAI’s [Codex MCP documentation](https://developers.openai.com/codex/mcp), as of November 2026.

## 1. Sign up

[Create a Sandscale account](https://cloud.sandscale.dev/auth/signup?ref=blog). You start on the Free plan: 100 awake vCPU-hours a month, 3 boxes at once and up to 2 vCPU per box, per the Quickstart. That is enough for this guide. Pro and up need a payment method; Free does not.

## 2. Add the server to config.toml

Codex keeps MCP servers in `~/.codex/config.toml`, or in `.codex/config.toml` inside a trusted project. Add a table for the remote Sandscale server:

```toml
[mcp_servers.sandscale]
url = "https://mcp.sandscale.dev/mcp"
tool_timeout_sec = 600
```

The first line is the address from the Quickstart. The second is optional. Per the Codex docs, each MCP tool call has a time limit, `tool_timeout_sec`, which defaults to 60 (the value is in seconds). A sandbox command that runs longer would look like a timeout to the agent even though it may still be running. `go version` is quick, but you will want the higher limit for the first real task.

No token goes in the file. If you have the Sandscale CLI installed, `sandscale mcp connect codex` prints this same snippet.

## 3. Sign in

```sh
codex mcp login sandscale
```

Codex opens the authorization URL. Sandscale’s sign-in page asks you to approve the app; the approval page names it and says it is not made by Sandscale. After that each tool call runs as you. On a machine without a browser, use `codex mcp login sandscale --no-browser`: Codex prints the URL, you open it anywhere, sign in, and paste the full redirect URL back into the terminal even if the callback page does not load.

Check it:

```sh
codex mcp list
```

Inside the Codex TUI, `/mcp` shows the active servers.

## 4. Run your first sandbox command

Start Codex in any directory and give it this prompt:

```text
Start a sandbox from the Go template that ends by itself after 10 minutes.
Run `go version` in it and tell me the exit code and the exact output.
Then stop the sandbox.
```

The Go template has the Go toolchain installed, along with Python 3, Node.js, git and curl, which is why this prompt needs no setup step. Per the Connect guide, the remote server’s tools for this are `sandbox_create`, `sandbox_run` and `sandbox_stop`. The list Codex shows may differ from the guide’s, so check it.

Codex asks before calling a tool its settings do not already allow. Read the arguments:

- `sandbox_create` should name the Go template and carry a time limit.
- `sandbox_run` should run `go version` and nothing else.
- `sandbox_stop` should name the id that `sandbox_create` returned. The reference marks stop as not undoable: it deletes the sandbox’s disk.

If you want every write-type tool to prompt while you are learning, add this line to the same table. Per the Codex docs, `writes` prompts for any tool not marked read-only:

```toml
default_tools_approval_mode = "writes"
```

When it finishes, Codex should report an exit code and the output of `go version`. That ran inside the sandbox. If Go is installed on your machine, compare the two lines.

## What to check next

- **Nothing is left running.** Ask Codex to list your sandboxes. The one from this run should be gone. A sandbox also ends on its own when its time limit passes.
- **The run is on the record.** Open the [audit log](https://sandscale.dev/docs/concepts/audit?ref=blog) in the console. Per the Connect guide it records each remote MCP call’s tool, region, outcome and app, not the arguments.
- **The network.** A new sandbox has no network by default, and the modes you can start depend on your plan and your organization’s policy. Until you start one with a network mode, a command that downloads modules or packages will not work, so plan your first real task around files you upload.
- **Region.** The remote server answers for the United States and refuses another region with `region_unavailable`.
- **Signing out.** Removing the server from `config.toml` stops Codex using it but does not revoke what was issued. The Connect guide describes revoking with `DELETE /api/v1/me/mcp-connectors/{id}`.
- **A real task.** Try the longer first task in the [Codex setup guide](https://sandscale.dev/blog/sandscale-mcp-server-in-codex?ref=blog): upload `go.mod`, `go.sum` and the files under `internal/`, run `go vet ./... && go test ./...` and read the result.

If you have not created an account yet, [sign up for Sandscale](https://cloud.sandscale.dev/auth/signup?ref=blog) and start at step 2.

**On this page**

1. 1. Sign up
2. 2. Add the server to config.toml
3. 3. Sign in
4. 4. Run your first sandbox command
5. What to check next

**Run your agents in a box of their own**

Each sandbox is a Firecracker microVM. Free includes 100 awake vCPU-hours a month.

[Start free](https://cloud.sandscale.dev/auth/signup)

## Keep reading

- [November 29, 2026 · **Your first Sandscale sandbox from Claude Code: sign up, connect, run one command** · A first-run walkthrough: create a Sandscale account, install the CLI, connect Claude Code with claude mcp add, and have it start a sandbox, run node --version inside it and stop it.](https://sandscale.dev/blog/claude-code-first-sandbox-tutorial)
- [November 28, 2026 · **A Codex workspace that keeps your hours: schedules, time zones and overnight codex exec runs** · Set a Sandscale workspace to start with your workday in Tokyo, Taipei or Singapore, keep Codex's config in your dotfiles, and leave a codex exec run going in tmux overnight. Commands are checked against CLI 1.3.0.](https://sandscale.dev/blog/codex-workspace-on-your-time-zone)

---
Source: https://sandscale.dev/blog/codex-first-sandbox-tutorial
