Bocal
by benoitpetit
README.md
<h1 align="center">
<img src="assets/bocal-logo.png" alt="Bocal" width="360">
</h1>
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.
## Install
```sh
npm install --global bocal
bocal image fetch bocal-unkernel-aarch64-v1
bocal doctor
```
The image is downloaded separately from the
[Bocal GitHub release](https://github.com/benoitpetit/bocal/releases/latest).
`bocal doctor` verifies that the local runtime can boot the guest.
## Connect an MCP client
Configure your MCP client to start Bocal over stdio:
```json
{
"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 boots the pinned Unkernel WebAssembly kernel in
a browser worker using browser-side GSP framing.
## Manage sandboxes
```sh
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.
## Security
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. Read the
[security policy](SECURITY.md) before using it with untrusted work.
## Build from source
On Linux x86_64 with Node.js 24 or newer and pnpm 11.29.0:
```sh
pnpm setup:local
```
This builds or verifies the pinned guest image, installs the local CLI, and
runs `bocal doctor`. See [CONTRIBUTING.md](CONTRIBUTING.md) for development
commands.
## Licenses
Bocal-authored code is MIT-licensed. The npm package's dependency inventory is
in [`docs/licenses/npm/THIRD-PARTY.md`](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`](docs/licenses/unkernel/THIRD-PARTY.md).
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues