Bocal gives MCP clients disposable Linux workspaces running locally on your
machine. Manage sandboxes with the bocal CLI or connect an MCP client to the
local server.
The runtime uses an Alpine Linux AArch64 guest on Unkernel. The verified host platform is Linux x86_64 with Node.js 24 or newer.
npm install --global bocal
bocal image fetch bocal-unkernel-aarch64-v1
bocal doctorThe image is downloaded separately from the
Bocal GitHub release.
bocal doctor verifies that the local runtime can boot the guest.
Configure your MCP client to start Bocal over stdio:
{
"mcpServers": {
"bocal": {
"command": "bocal",
"args": ["serve", "--stdio"]
}
}
}The local daemon owns sandbox lifetimes, so a sandbox remains available when
an MCP client disconnects. An optional loopback HTTP transport is available with
bocal serve --http --port 3000 and BOCAL_HTTP_TOKEN; it requires a bearer
token, a loopback Host header and JSON POST bodies. The experimental
@bocal/browser-worker package is a browser-side toolkit that boots an Unkernel
WebAssembly kernel when an embedding application supplies the kernel factory;
it is not published on npm and is not executable through the local daemon.
bocal daemon start
bocal sandbox create
bocal sandbox list
bocal sandbox shell <sandbox-id>
bocal sandbox exec <sandbox-id> <command>The operator shell is interactive and local to the host-to-guest terminal channel. MCP tools provide sandbox lifecycle, command, job, and file operations.
Bocal is experimental and single-user. It is not designed as a boundary for
hostile workloads or multi-tenant use. On Linux, operators can set
host_isolation to "required" to fail closed when the hardened worker
namespaces and cgroup controls are unavailable. bocal doctor and
sandbox_capabilities report the effective mode. Three optional privileged
modes — verified package installation, guest UID 0 execution and a bounded
request tunnel — are disabled by default and require both an operator flag and
a matching capability. Guest root weakens guest isolation; the Bocal host
process is still never run as root. Read the
security policy before using it with untrusted work.
On Linux x86_64 with Node.js 24 or newer and pnpm 11.29.0:
pnpm setup:localThis builds or verifies the pinned guest image, installs the local CLI, and
runs bocal doctor. See CONTRIBUTING.md for development
commands.
Bocal-authored code is MIT-licensed. The npm package's dependency inventory is
in docs/licenses/npm/THIRD-PARTY.md.
The separately distributed guest image has its own notices and corresponding
source requirements in
docs/licenses/unkernel/THIRD-PARTY.md.
